usb_device_auto_polling_t Struct Reference
[USB library for device drivers]


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.

Detailed Description

Definition at line 41 of file poll.h.


Field Documentation

int debug

Level of debugging messages from auto polling.

0 - nothing 1 - inform about errors and polling start/end 2 - also dump every retrieved buffer

Definition at line 47 of file poll.h.

int delay

Delay between poll requests in milliseconds.

Set to negative value to use value from endpoint descriptor.

Definition at line 53 of file poll.h.

bool(* on_data)(usb_device_t *dev, uint8_t *data, size_t data_size, void *arg)

Callback when data arrives.

Parameters:
dev Device that was polled.
data Data buffer (in USB endianness).
data_size Size of the data buffer in bytes.
arg Custom argument.
Returns:
Whether to continue in polling.

bool(* on_error)(usb_device_t *dev, int err_code, void *arg)

Callback when error occurs.

Parameters:
dev Device where error occurred.
err_code Error code (as returned from usb_pipe_read).
arg Custom argument.
Returns:
Whether to continue in polling.

void(* on_polling_end)(usb_device_t *dev, bool due_to_errors, void *arg)

Callback when polling is terminated.

Parameters:
dev Device where the polling was terminated.
due_to_errors Whether polling stopped due to several failures.
arg Custom argument.


The documentation for this struct was generated from the following file:
Generated on Thu Jun 2 07:46:00 2011 for HelenOS/USB by  doxygen 1.4.7