typedef bool (* USB_CLIENT_EVENT_HANDLER)(uint8_t address, USB_EVENT event, void *data, uint32_t size);
This data type defines a pointer to a call-back function that must be implemented by a client driver if it needs to be aware of events on the USB. When an event occurs, the Host layer will call the client driver via this pointer to handle the event. Events are identified by the "event" parameter and may have associated data. If the client driver was able to handle the event, it should return true. If not (or if additional processing is required), it should return false.
The client must have been initialized.
Return Values |
Description |
true |
The event was handled |
false |
The event was not handled |
The application may also implement an event handling routine if it requires knowledge of events. To do so, it must implement a routine that matches this function signature and define the USB_HOST_APP_EVENT_HANDLER macro as the name of that function.
MLA - USB Library Help Version : 2.16
![]() |