36 #ifndef USB_EXCHANGE_H
37 #define USB_EXCHANGE_H
Various types used by the cascoda posix api.
void(* util_device_found)(struct ca_device_info *aDeviceInfo, void *aContext)
Function type for handling enumerated devices when finding them.
Definition: ca821x-types.h:241
ca_error(* ca821x_errorhandler)(ca_error error, struct ca821x_dev *pDeviceRef)
Error callback.
Definition: ca821x-types.h:61
The main ca821x-api include file.
ca_error
Cascoda error type.
Definition: ca821x_error.h:51
CA-821x Device reference struct.
Definition: ca821x_api.h:123
void usb_exchange_deinit(struct ca821x_dev *pDeviceRef)
Deinitialise the usb exchange, so that it can be reinitialised by another process,...
Definition: usb-exchange.c:769
int usb_exchange_reset(unsigned long resettime, struct ca821x_dev *pDeviceRef)
Send a hard reset to the ca821x.
Definition: usb-exchange.c:861
usb_exchange_errors
Definition: usb-exchange.h:44
@ usb_exchange_err_generic
Definition: usb-exchange.h:47
@ usb_exchange_err_ca821x
ca821x error - ca821x has been reset
Definition: usb-exchange.h:46
@ usb_exchange_err_usb
Usb error - probably device removed and going to have to crash safely.
Definition: usb-exchange.h:45
ca_error usb_exchange_enumerate(util_device_found aCallback, void *aContext)
Function to enumerate all of the USB connected devices, calling aCallback with a struct describing ea...
Definition: usb-exchange.c:789
void test_frag_loopback()
Run to test fragmentation.
Definition: usb-exchange.c:194
ca_error usb_exchange_init(ca821x_errorhandler callback, const char *path, struct ca821x_dev *pDeviceRef, char *serial_num)
Initialise the usb exchange.
Definition: usb-exchange.c:646