Collaboration diagram for USB pipe drivers:
![]() |
Defines | |
#define | Host_select_pipe(p) (UPNUM = (U8)p) |
selects pipe for CPU interface | |
#define | Host_enable_pipe() (UPCONX |= (1<<PEN)) |
enables pipe | |
#define | Host_disable_pipe() (UPCONX &= ~(1<<PEN)) |
disables pipe | |
#define | Host_set_token_setup() (UPCFG0X = UPCFG0X & ~MSK_TOKEN_SETUP) |
sets SETUP token | |
#define | Host_set_token_in() (UPCFG0X = (UPCFG0X & ~MSK_TOKEN_SETUP) | MSK_TOKEN_IN) |
sets IN token | |
#define | Host_set_token_out() (UPCFG0X = (UPCFG0X & ~MSK_TOKEN_SETUP) | MSK_TOKEN_OUT) |
sets OUT token | |
#define | Host_get_endpoint_number() (UPCFG0X & (1<<MSK_PEPNUM)) |
returns the number of the endpoint associated to the current pipe | |
#define | Host_set_interrupt_frequency(frq) (UPCFG2X = (U8)frq) |
sets the interrupt frequency | |
#define | Is_pipe_configured() (UPSTAX & (1<<CFGOK)) |
tests if current pipe is configured | |
#define | Is_host_one_bank_busy() ((UPSTAX & (1<<MSK_NBUSYBK)) != 0) |
tests if at least one bank is busy | |
#define | Host_number_of_busy_bank() (UPSTAX & (1<<MSK_NBUSYBK)) |
returns the number of busy banks | |
#define | Host_reset_pipe(p) (UPRST = 1<<p , UPRST = 0) |
resets the pipe | |
#define | Host_write_byte(dat) (UPDATX = dat) |
writes a byte into the pipe FIFO | |
#define | Host_read_byte() (UPDATX) |
reads a byte from the pipe FIFO | |
#define | Host_freeze_pipe() (UPCONX |= (1<<PFREEZE)) |
freezes the pipe | |
#define | Host_unfreeze_pipe() (UPCONX &= ~(1<<PFREEZE)) |
un-freezees the pipe | |
#define | Is_host_pipe_freeze() (UPCONX & (1<<PFREEZE)) |
tests if the current pipe is frozen | |
#define | Host_reset_pipe_data_toggle() (UPCONX |= (1<<RSTDT) ) |
resets data toggle | |
#define | Is_host_setup_sent() ((UPINTX & (1<<TXSTPI)) ? TRUE : FALSE) |
tests if SETUP has been sent | |
#define | Is_host_control_in_received() ((UPINTX & (1<<RXINI)) ? TRUE : FALSE) |
tests if control IN has been received | |
#define | Is_host_control_out_sent() ((UPINTX & (1<<TXOUTI)) ? TRUE : FALSE) |
tests if control OUT has been sent | |
#define | Is_host_stall() ((UPINTX & (1<<RXSTALLI)) ? TRUE : FALSE) |
tests if a STALL has been received | |
#define | Is_host_pipe_error() ((UPINTX & (1<<PERRI)) ? TRUE : FALSE) |
tests if an error occurs on current pipe | |
#define | Host_send_setup() (UPINTX &= ~(1<<FIFOCON)) |
sends a setup | |
#define | Host_send_control_in() (UPINTX &= ~(1<<FIFOCON)) |
sends a control IN | |
#define | Host_send_control_out() (UPINTX &= ~(1<<FIFOCON)) |
sends a control OUT | |
#define | Host_ack_control_out() (UPINTX &= ~(1<<TXOUTI)) |
acks control OUT | |
#define | Host_ack_control_in() (UPINTX &= ~(1<<RXINI)) |
acks control IN | |
#define | Host_ack_setup() (UPINTX &= ~(1<<TXOUTI)) |
acks setup | |
#define | Host_ack_stall() (UPINTX &= ~(1<<RXSTALLI)) |
acks STALL reception | |
#define | Host_send_out() (UPINTX = 0x7B) |
sends a OUT | |
#define | Is_host_out_sent() ((UPINTX & (1<<TXOUTI)) ? TRUE : FALSE) |
tests if OUT has been sent | |
#define | Host_ack_out_sent() (UPINTX = 0xFB) |
acks OUT sent | |
#define | Is_host_in_received() ((UPINTX & (1<<FIFOCON)) ? TRUE : FALSE) |
tests if IN received | |
#define | Host_ack_in_received() (UPINTX = 0x7E) |
acks IN reception | |
#define | Is_host_read_enabled() (UPINTX&(1<<RWAL)) |
tests if endpoint read allowed | |
#define | Is_host_write_enabled() (UPINTX&(1<<RWAL)) |
tests if endpoint read allowed | |
#define | Host_standard_in_mode() (UPCONX &= ~(1<<INMODE)) |
sets IN in standard mode | |
#define | Host_continuous_in_mode() (UPCONX |= (1<<INMODE)) |
sets IN in continuous mode | |
#define | Host_in_request_number(in_num) (UPINRQX = (U8)in_num) |
sets number of IN requests to perform before freeze | |
#define | Host_get_in_request_number() (UPINRQX) |
returns number of remaining IN requests | |
#define | Host_data_length_U8() (UPBCLX) |
returns number of bytes (8 bits) | |
#define | Host_data_length_U16() ((((U16)UPBCHX)<<8) | UPBCLX) |
returns number of bytes (16 bits) | |
#define | Host_byte_counter() Host_data_length_U16() |
for device compatibility | |
#define | Host_byte_counter_8() Host_data_length_U8() |
for device compatibility | |
#define | Host_get_pipe_length() ((U16)0x08 << ((UPCFG1X & MSK_PSIZE)>>4)) |
returns the size of the current pipe | |
#define | Host_error_status() (UPERRX & MSK_ERROR) |
tests if error occurs on pipe | |
#define | Host_ack_all_errors() (UPERRX = 0x00) |
acks all pipe error | |
#define | Host_enable_transmit_interrupt() (UPIENX |= (1<<TXOUTE)) |
Enable pipe end transmission interrupt. | |
#define | Host_disable_transmit_interrupt() (UPIENX &= ~(1<<TXOUTE)) |
Disable pipe end transmission interrupt. | |
#define | Host_enable_receive_interrupt() (UPIENX |= (1<<RXINE)) |
Enable pipe reception interrupt. | |
#define | Host_disable_receive_interrupt() (UPIENX &= ~(1<<RXINE)) |
Disable pipe recption interrupt. | |
#define | Get_pipe_token(x) ((x & (0x80)) ? TOKEN_IN : TOKEN_OUT) |
#define | Host_set_device_supported() (device_status |= 0x01) |
#define | Host_clear_device_supported() (device_status &= ~0x01) |
#define | Is_host_device_supported() (device_status & 0x01) |
#define | Host_set_device_ready() (device_status |= 0x02) |
#define | Host_clear_device_ready() (device_status &= ~0x02) |
#define | Is_host_device_ready() (device_status & 0x02) |
#define | Host_set_configured() (device_status |= 0x04) |
#define | Host_clear_configured() (device_status &= ~0x04) |
#define | Is_host_configured() (device_status & 0x04) |
#define | Host_clear_device_status() (device_status = 0x00) |
|
selects pipe for CPU interface
Definition at line 685 of file usb_drv.h. Referenced by host_disable_all_pipe(). |
|
enables pipe
Definition at line 688 of file usb_drv.h. Referenced by host_config_pipe(). |
|
disables pipe
Definition at line 690 of file usb_drv.h. Referenced by host_disable_all_pipe(). |
|
sets SETUP token
|
|
sets IN token
|
|
sets OUT token
|
|
returns the number of the endpoint associated to the current pipe
|
|
sets the interrupt frequency
|
|
tests if current pipe is configured
Definition at line 706 of file usb_drv.h. Referenced by host_config_pipe(). |
|
tests if at least one bank is busy
|
|
returns the number of busy banks
|
|
resets the pipe
Definition at line 713 of file usb_drv.h. Referenced by host_disable_all_pipe(). |
|
writes a byte into the pipe FIFO
|
|
reads a byte from the pipe FIFO
|
|
freezes the pipe
|
|
un-freezees the pipe
|
|
tests if the current pipe is frozen
|
|
resets data toggle
|
|
tests if SETUP has been sent
|
|
tests if control IN has been received
|
|
tests if control OUT has been sent
|
|
tests if a STALL has been received
|
|
tests if an error occurs on current pipe
|
|
sends a setup
|
|
sends a control IN
|
|
sends a control OUT
|
|
acks control OUT
|
|
acks control IN
|
|
acks setup
|
|
acks STALL reception
|
|
sends a OUT
|
|
tests if OUT has been sent
|
|
acks OUT sent
|
|
tests if IN received
|
|
acks IN reception
|
|
tests if endpoint read allowed
|
|
tests if endpoint read allowed
|
|
sets IN in standard mode
|
|
sets IN in continuous mode
|
|
sets number of IN requests to perform before freeze
|
|
returns number of remaining IN requests
|
|
returns number of bytes (8 bits)
|
|
returns number of bytes (16 bits)
|
|
for device compatibility
|
|
for device compatibility
|
|
returns the size of the current pipe
|
|
tests if error occurs on pipe
|
|
acks all pipe error
|
|
Enable pipe end transmission interrupt.
|
|
Disable pipe end transmission interrupt.
|
|
Enable pipe reception interrupt.
|
|
Disable pipe recption interrupt.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|