3 * - By John Hodge (thePowersGang)
13 typedef struct sUSBInterface tUSBInterface;
14 typedef struct sUSBDriver tUSBDriver;
24 int MatchType; // 0: Interface, 1: Device, 2: Vendor
27 // 23:16 - Interface Class
28 // 15:8 - Interface Sub Class
29 // 7:0 - Interface Protocol
39 void (*Connected)(tUSBInterface *Dev);
40 void (*Disconnected)(tUSBInterface *Dev);
45 // NOTE: Top bit indicates the direction (1=Input)
47 // Data availiable Callback
48 void (*DataAvail)(tUSBInterface *Dev, int Length, void *Data);
52 extern void *USB_GetDeviceDataPtr(tUSBInterface *Dev);
53 extern void USB_SetDeviceDataPtr(tUSBInterface *Dev, void *Ptr);
55 extern void USB_StartPollingEndpoint(tUSBInterface *Dev, int Endpoint);
56 extern void USB_ReadDescriptor(tUSBInterface *Dev, int Type, int Index, int Length, void *Data);
57 extern void USB_Request(tUSBInterface *Dev, int Endpoint, int Type, int Req, int Value, int Index, int Len, void *Data);
59 extern void USB_SendData(tUSBInterface *Dev, int Endpoint, int Length, void *Data);
60 extern void USB_RecvData(tUSBInterface *Dev, int Endpoint, int Length, void *Data);