The UDC provides a high-level abstraction of the USB device.
You can use these functions to control the main device state (start/attach/wakeup).
All USB Device Interface (UDI) in USB Device Stack is based on UDC to support USB enumeration.
This documentation describes common USB Device usage based on UDC, as follow:
Functions | |
static void | udc_attach (void) |
Attach device to the bus when possible. More... | |
static void | udc_detach (void) |
Detaches the device from the bus. More... | |
usb_iface_desc_t UDC_DESC_STORAGE * | udc_get_interface_desc (void) |
Returns a pointer on the current interface descriptor. More... | |
static bool | udc_include_vbus_monitoring (void) |
Authorizes the VBUS event. More... | |
static void | udc_remotewakeup (void) |
The USB driver sends a resume signal called "Upstream Resume". More... | |
void | udc_start (void) |
Start the USB Device stack. More... | |
void | udc_stop (void) |
Stop the USB Device stack. More... | |
|
inlinestatic |
Attach device to the bus when possible.
|
inlinestatic |
Detaches the device from the bus.
The driver must remove pull-up on USB line D- or D+.
usb_iface_desc_t UDC_DESC_STORAGE* udc_get_interface_desc | ( | void | ) |
Returns a pointer on the current interface descriptor.
|
inlinestatic |
Authorizes the VBUS event.
See VBUS Monitoring for more details.
|
inlinestatic |
The USB driver sends a resume signal called "Upstream Resume".
This is authorized only when the remote wakeup feature is enabled by host.
void udc_start | ( | void | ) |
Start the USB Device stack.
void udc_stop | ( | void | ) |
Stop the USB Device stack.