|
PebbleOS v4.47.0-757-g12b6c531f
|
A function of the device: a class, on interfaces and endpoints of its own. More...
#include <usbd.h>
Data Fields | |
| const uint8_t * | desc |
| Interface and endpoint descriptors, class-specific ones included. | |
| uint16_t | desc_len |
| Length of desc, in bytes. | |
| const char *const * | strings |
| Optional. | |
| uint8_t | num_strings |
| Number of strings. | |
| uint8_t | first_iface |
| First interface. | |
| uint8_t | num_ifaces |
| Number of interfaces. | |
| void(* | configured )(bool on) |
| Optional. | |
| void(* | set_alt )(uint8_t iface, uint8_t alt) |
| Optional. | |
| int(* | class_request )(const struct pbl_usb_setup *setup, uint8_t **data, uint16_t *len) |
| Optional. | |
| void(* | control_out )(const struct pbl_usb_setup *setup, const uint8_t *data, uint16_t len) |
| Optional. | |
| void(* | xfer_done )(uint8_t ep, int ret) |
| Optional. | |
A function of the device: a class, on interfaces and endpoints of its own.
| int(* pbl_usbd_function::class_request) (const struct pbl_usb_setup *setup, uint8_t **data, uint16_t *len) |
Optional.
A class request to an interface of the function. For an IN request, point data at what to send, len bytes; for an OUT one, at room for len bytes, which then arrive through control_out. Returns 0, or a negative errno for the request to stall.
| void(* pbl_usbd_function::configured) (bool on) |
Optional.
The host configured the device, its endpoints now enabled, or left that configuration, at a reset or a disconnection.
| void(* pbl_usbd_function::control_out) (const struct pbl_usb_setup *setup, const uint8_t *data, uint16_t len) |
Optional.
The data of an OUT class request, the request done.
| const uint8_t* pbl_usbd_function::desc |
Interface and endpoint descriptors, class-specific ones included.
| uint16_t pbl_usbd_function::desc_len |
Length of desc, in bytes.
| uint8_t pbl_usbd_function::first_iface |
First interface.
| uint8_t pbl_usbd_function::num_ifaces |
Number of interfaces.
| uint8_t pbl_usbd_function::num_strings |
Number of strings.
| void(* pbl_usbd_function::set_alt) (uint8_t iface, uint8_t alt) |
Optional.
The host selected alternate setting alt of interface iface, the endpoints of the previous setting now disabled, their transfers ended with -ECONNABORTED, and those of alt enabled. Not called when the host configures the device.
| const char* const* pbl_usbd_function::strings |
Optional.
Strings of the descriptors, ASCII, by their index minus 1.
| void(* pbl_usbd_function::xfer_done) (uint8_t ep, int ret) |
Optional.
A transfer on an endpoint of the function ended: bytes moved, or a negative errno.