Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
|
USBD vendor request node. More...
#include <usbd.h>
Data Fields | |
sys_dnode_t | node |
Node information for the dlist. | |
const uint8_t | code |
Vendor code (bRequest value) | |
int(* | to_host )(const struct usbd_context *const ctx, const struct usb_setup_packet *const setup, struct net_buf *const buf) |
Vendor request callback for device-to-host direction. | |
int(* | to_dev )(const struct usbd_context *const ctx, const struct usb_setup_packet *const setup, const struct net_buf *const buf) |
Vendor request callback for host-to-device direction. | |
USBD vendor request node.
Vendor request node is identified by the vendor code and is used to register callbacks to handle the vendor request with the receiving device. When the device stack receives a request with type Vendor and recipient Device, and bRequest value equal to the vendor request code, it will call the vendor callbacks depending on the direction of the request.
Example callback code fragment:
const uint8_t usbd_vreq_node::code |
Vendor code (bRequest value)
sys_dnode_t usbd_vreq_node::node |
Node information for the dlist.
int(* usbd_vreq_node::to_dev) (const struct usbd_context *const ctx, const struct usb_setup_packet *const setup, const struct net_buf *const buf) |
Vendor request callback for host-to-device direction.
int(* usbd_vreq_node::to_host) (const struct usbd_context *const ctx, const struct usb_setup_packet *const setup, struct net_buf *const buf) |
Vendor request callback for device-to-host direction.