|
#define | USB_BSTRING_LENGTH(s) (sizeof(s) * 2 - 2) |
|
#define | USB_STRING_DESCRIPTOR_LENGTH(s) (sizeof(s) * 2) |
|
#define | USBD_DESC_MANUFACTURER_IDX 1 |
|
#define | USBD_DESC_PRODUCT_IDX 2 |
|
#define | USBD_DESC_SERIAL_NUMBER_IDX 3 |
|
#define | USBD_NUMOF_INTERFACES_MAX 16U |
|
#define | USBD_CCTX_REGISTERED 0 |
|
#define | USBD_DEVICE_DEFINE(device_name, uhc_dev, vid, pid) |
|
#define | USBD_CONFIGURATION_DEFINE(name, attrib, power) |
|
#define | USBD_DESC_LANG_DEFINE(name) |
|
#define | USBD_DESC_STRING_DEFINE(d_name, d_string, d_idx) |
|
#define | USBD_DEFINE_CLASS(class_name, class_api, class_data) |
|
#define | VENDOR_REQ_DEFINE(_reqs, _len) |
| Helper to declare request table of usbd_cctx_vendor_req. More...
|
|
#define | USBD_VENDOR_REQ(_reqs...) |
| Helper to declare supported vendor requests. More...
|
|
|
int | usbd_add_descriptor (struct usbd_contex *uds_ctx, struct usbd_desc_node *dn) |
| Add common USB descriptor. More...
|
|
int | usbd_add_configuration (struct usbd_contex *uds_ctx, struct usbd_config_node *cd) |
| Add a USB device configuration. More...
|
|
int | usbd_register_class (struct usbd_contex *uds_ctx, const char *name, uint8_t cfg) |
| Register an USB class instance. More...
|
|
int | usbd_unregister_class (struct usbd_contex *uds_ctx, const char *name, uint8_t cfg) |
| Unregister an USB class instance. More...
|
|
int | usbd_init (struct usbd_contex *uds_ctx) |
| Initialize USB device. More...
|
|
int | usbd_enable (struct usbd_contex *uds_ctx) |
| Enable the USB device support and registered class instances. More...
|
|
int | usbd_disable (struct usbd_contex *uds_ctx) |
| Disable the USB device support. More...
|
|
int | usbd_shutdown (struct usbd_contex *const uds_ctx) |
| Shutdown the USB device support. More...
|
|
int | usbd_ep_set_halt (struct usbd_contex *uds_ctx, uint8_t ep) |
| Halt endpoint. More...
|
|
int | usbd_ep_clear_halt (struct usbd_contex *uds_ctx, uint8_t ep) |
| Clear endpoint halt. More...
|
|
bool | usbd_ep_is_halted (struct usbd_contex *uds_ctx, uint8_t ep) |
| Checks whether the endpoint is halted. More...
|
|
struct net_buf * | usbd_ep_ctrl_buf_alloc (struct usbd_contex *const uds_ctx, const uint8_t ep, const size_t size) |
| Allocate buffer for USB device control request. More...
|
|
struct net_buf * | usbd_ep_buf_alloc (const struct usbd_class_node *const c_nd, const uint8_t ep, const size_t size) |
| Allocate buffer for USB device request. More...
|
|
int | usbd_ep_ctrl_enqueue (struct usbd_contex *const uds_ctx, struct net_buf *const buf) |
| Queue USB device control request. More...
|
|
int | usbd_ep_enqueue (const struct usbd_class_node *const c_nd, struct net_buf *const buf) |
| Queue USB device request. More...
|
|
int | usbd_ep_dequeue (struct usbd_contex *uds_ctx, const uint8_t ep) |
| Remove all USB device controller requests from endpoint queue. More...
|
|
int | usbd_ep_buf_free (struct usbd_contex *uds_ctx, struct net_buf *buf) |
| Free USB device request buffer. More...
|
|
bool | usbd_is_suspended (struct usbd_contex *uds_ctx) |
| Checks whether the USB device controller is suspended. More...
|
|
int | usbd_wakeup_request (struct usbd_contex *uds_ctx) |
| Initiate the USB remote wakeup (TBD) More...
|
|
int | usbd_device_set_bcd (struct usbd_contex *const uds_ctx, const uint16_t bcd) |
| Set USB device descriptor value bcdUSB. More...
|
|
int | usbd_device_set_vid (struct usbd_contex *const uds_ctx, const uint16_t vid) |
| Set USB device descriptor value idVendor. More...
|
|
int | usbd_device_set_pid (struct usbd_contex *const uds_ctx, const uint16_t pid) |
| Set USB device descriptor value idProduct. More...
|
|
int | usbd_device_set_class (struct usbd_contex *const uds_ctx, const uint8_t value) |
| Set USB device descriptor value bDeviceClass. More...
|
|
int | usbd_device_set_subclass (struct usbd_contex *const uds_ctx, const uint8_t value) |
| Set USB device descriptor value bDeviceSubClass. More...
|
|
int | usbd_device_set_proto (struct usbd_contex *const uds_ctx, const uint8_t value) |
| Set USB device descriptor value bDeviceProtocol. More...
|
|
int | usbd_config_attrib_rwup (struct usbd_contex *const uds_ctx, const uint8_t cfg, const bool enable) |
| Setup USB device configuration attribute Remote Wakeup. More...
|
|
int | usbd_config_attrib_self (struct usbd_contex *const uds_ctx, const uint8_t cfg, const bool enable) |
| Setup USB device configuration attribute Self-powered. More...
|
|
int | usbd_config_maxpower (struct usbd_contex *const uds_ctx, const uint8_t cfg, const uint8_t power) |
| Setup USB device configuration power consumption. More...
|
|
New experimental USB device stack APIs and structures.
This file contains the USB device stack APIs and structures.