%module usb %{ #include %} %include "typemaps.i" extern void initialize(void); extern int count_devices(int vendorID, int productID); extern usb_dev_handle *open_device(int vendorID, int productID, int devNum = 1); extern int close_device(usb_dev_handle *dev); extern int claim_interface(usb_dev_handle *dev, int interface); extern int release_interface(usb_dev_handle *dev, int interface); extern int control_write(usb_dev_handle *dev, int requestType, int request, int value, int index, int length, int byte1 = 0, int byte2 = 0, int byte3 = 0, int byte4 = 0, int byte5 = 0, int byte6 = 0, int byte7 = 0, int byte8 = 0); extern int control_read(usb_dev_handle *dev, int requestType, int request, int value, int index, int length, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT); extern int interrupt_write(usb_dev_handle *dev, int endpoint, int length, int byte1 = 0, int byte2 = 0, int byte3 = 0, int byte4 = 0, int byte5 = 0, int byte6 = 0, int byte7 = 0, int byte8 = 0); extern int interrupt_read(usb_dev_handle *dev, int endpoint, int length, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT);