#include <driver.h>
Data Fields | |
usb_endpoint_description_t ** | endpoints |
Expected endpoints description. | |
const char * | name |
Driver name. | |
usb_driver_ops_t * | ops |
Driver ops. |
Definition at line 119 of file driver.h.
Expected endpoints description.
This description shall exclude default control endpoint (pipe zero) and must be NULL terminated. When only control endpoint is expected, you may set NULL directly without creating one item array containing NULL.
When the driver expect single interrupt in endpoint, the initialization may look like this:
static usb_endpoint_description_t poll_endpoint_description = { .transfer_type = USB_TRANSFER_INTERRUPT, .direction = USB_DIRECTION_IN, .interface_class = USB_CLASS_HUB, .interface_subclass = 0, .interface_protocol = 0, .flags = 0 }; static usb_endpoint_description_t *hub_endpoints[] = { &poll_endpoint_description, NULL }; static usb_driver_t hub_driver = { .endpoints = hub_endpoints, ... };
const char* name |