UDI API. More...
#include <udi.h>
Public Attributes | |
| void(* | disable )(void) |
| Disable the interface. More... | |
| bool(* | enable )(void) |
| Enable the interface. More... | |
| uint8_t(* | getsetting )(void) |
| Returns the current setting of the selected interface. More... | |
| bool(* | setup )(void) |
| Handle a control request directed at an interface. More... | |
| void(* | sof_notify )(void) |
| To signal that a SOF is occurred. More... | |
UDI API.
The callbacks within this structure are called only by USB Device Controller (UDC)
The udc_get_interface_desc() can be use by UDI to know the interface descriptor selected by UDC.
| void(* udi_api_t::disable) (void) |
Disable the interface.
This function is called when this interface is currently active, and
| bool(* udi_api_t::enable) (void) |
Enable the interface.
This function is called when the host selects a configuration to which this interface belongs through a Set Configuration request, and when the host selects an alternate setting of this interface through a Set Interface request.
1 if function was successfully done, otherwise 0. | uint8_t(* udi_api_t::getsetting) (void) |
| bool(* udi_api_t::setup) (void) |
Handle a control request directed at an interface.
This function is called when this interface is currently active and the host sends a SETUP request with this interface as the recipient.
Use udd_g_ctrlreq to decode and response to SETUP request.
1 if this interface supports the SETUP request, otherwise 0. | void(* udi_api_t::sof_notify) (void) |