Modules | |
USB software Events Management | |
Macros to manage USB events detected under interrupt. | |
Standard requests defines | |
Macros | |
#define | g_usb_mode USB_MODE_DEVICE |
#define | USB_HIGH_SPEED_SUPPORT false |
#define | USB_MODE_DEVICE 0x01 |
#define | USB_MODE_HOST 0x02 |
#define | USB_MODE_UNDEFINED 0x00 |
Functions | |
U32 | host_get_timeout (void) |
void | usb_task (void *pvParameters) |
Entry point of the USB mamnagement. More... | |
void | usb_task_init (void) |
This function initializes the USB process. More... | |
Variables | |
volatile U16 | g_usb_event |
Public: U16 g_usb_event usb_connected is used to store USB events detected upon USB general interrupt subroutine Its value is managed by the following macros (See usb_task.h file) Usb_send_event(x) Usb_ack_event(x) Is_usb_event(x) Usb_clear_all_event() More... | |
#define g_usb_mode USB_MODE_DEVICE |
Referenced by usb_general_interrupt_non_naked(), and usb_task().
#define USB_HIGH_SPEED_SUPPORT false |
#define USB_MODE_DEVICE 0x01 |
Referenced by usb_general_interrupt_non_naked(), and usb_task().
#define USB_MODE_HOST 0x02 |
Referenced by usb_general_interrupt_non_naked(), and usb_task().
#define USB_MODE_UNDEFINED 0x00 |
U32 host_get_timeout | ( | void | ) |
void usb_task | ( | void * | pvParameters | ) |
Entry point of the USB mamnagement.
Depending on the mode supported (HOST/DEVICE/DUAL_ROLE) the function calls the corresponding USB management function
References Disable_global_interrupt, Enable_global_interrupt, g_usb_mode, INTC_register_interrupt(), Is_usb_id_device, usb_device_task_init(), usb_device_tsk, Usb_enable_id_interrupt, Usb_enable_id_pin, Usb_force_device_mode, Usb_force_host_mode, usb_general_interrupt(), usb_host_task_init(), USB_INT_LEVEL, USB_MODE_DEVICE, USB_MODE_HOST, Usb_raise_id_transition, vTaskDelete(), and xSemaphoreTake.
Referenced by usb_task_init().
void usb_task_init | ( | void | ) |
This function initializes the USB process.
This function enables the USB controller and init the USB interrupts. The aim is to allow the USB connection detection in order to send the appropriate USB event to the operating mode manager. Depending on the mode supported (HOST/DEVICE/DUAL_ROLE) the function calls the corresponding USB mode initialization function
Depending on the mode supported (HOST/DEVICE/DUAL_ROLE) the function calls the corresponding USB mode initialization function
References configTSK_USB_NAME, configTSK_USB_PRIORITY, configTSK_USB_STACK_SIZE, usb_task(), vSemaphoreCreateBinary, and xTaskCreate.
Referenced by main().
volatile U16 g_usb_event |
Public: U16 g_usb_event usb_connected is used to store USB events detected upon USB general interrupt subroutine Its value is managed by the following macros (See usb_task.h file) Usb_send_event(x) Usb_ack_event(x) Is_usb_event(x) Usb_clear_all_event()