|
PER Firmware
|
Host enumeration and endpoint-zero control transfers (USB ISR context) More...
Functions | |
| static void | stall_control (void) |
| static void | respond (const void *data, uint16_t size, uint16_t requested) |
| static bool | valid_endpoint (uint16_t index) |
| static bool | handle_get_descriptor (const PHAL_USB_SetupPacket_t *setup) |
| static bool | handle_set_address (const PHAL_USB_SetupPacket_t *setup) |
| static bool | handle_get_configuration (const PHAL_USB_SetupPacket_t *setup) |
| static bool | handle_set_configuration (const PHAL_USB_SetupPacket_t *setup) |
| static bool | handle_get_status (const PHAL_USB_SetupPacket_t *setup) |
| static bool | handle_get_interface (const PHAL_USB_SetupPacket_t *setup) |
| static bool | handle_set_interface (const PHAL_USB_SetupPacket_t *setup) |
| static bool | handle_endpoint_halt (const PHAL_USB_SetupPacket_t *setup) |
| static void | handle_setup (const PHAL_USB_SetupPacket_t *setup) |
| static void | handle_control_out (bool is_setup) |
| static void | handle_control_in (void) |
| static void | handle_bulk_out (void) |
| void | PHAL_USB_callback (const PHAL_USB_Event_t *event) |
| Handle USB events. | |
| bool | usb_bulk_in_enabled (void) |
Variables | |
| static usb_context_t | g_usb_context |
Host enumeration and endpoint-zero control transfers (USB ISR context)
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| void PHAL_USB_callback | ( | const PHAL_USB_Event_t * | event | ) |
Handle USB events.
Applications define this callback to process bus resets, SETUP packets, OUT packets, and IN completions. Check event->transfer before accessing transfer_data. The HAL provides a weak empty implementation. OUT data remains available through PHAL_USB_read(). An IN completion marks the endpoint ready for PHAL_USB_write(). If SETUP and a prior IN completion are both pending, the HAL delivers the IN completion first so SETUP cannot erase pending state.
| event | USB event for the current interrupt. |
|
static |
|
static |
| bool usb_bulk_in_enabled | ( | void | ) |
|
static |
|
static |