Data Fields | |
bool | auto_clear_halt |
Whether to automatically try to clear the HALT feature after the endpoint stalls. | |
int | debug |
Level of debugging messages from auto polling. | |
int | delay |
Delay between poll requests in milliseconds. | |
size_t | max_failures |
Maximum number of consecutive errors before polling termination. | |
bool(* | on_data )(usb_device_t *dev, uint8_t *data, size_t data_size, void *arg) |
Callback when data arrives. | |
bool(* | on_error )(usb_device_t *dev, int err_code, void *arg) |
Callback when error occurs. | |
void(* | on_polling_end )(usb_device_t *dev, bool due_to_errors, void *arg) |
Callback when polling is terminated. |
Definition at line 41 of file poll.h.
int debug |
int delay |
Callback when data arrives.
dev | Device that was polled. | |
data | Data buffer (in USB endianness). | |
data_size | Size of the data buffer in bytes. | |
arg | Custom argument. |
bool(* on_error)(usb_device_t *dev, int err_code, void *arg) |
Callback when error occurs.
dev | Device where error occurred. | |
err_code | Error code (as returned from usb_pipe_read). | |
arg | Custom argument. |
void(* on_polling_end)(usb_device_t *dev, bool due_to_errors, void *arg) |
Callback when polling is terminated.
dev | Device where the polling was terminated. | |
due_to_errors | Whether polling stopped due to several failures. | |
arg | Custom argument. |