3 * - By John Hodge (thePowersGang)
6 * - USB Host Controller Interface
14 typedef struct sUSBHostDef tUSBHostDef;
16 typedef void (*tUSBHostCb)(void *DataPtr, void *Data, size_t Length);
18 typedef void *(*tUSBInitInt)(void *Ptr, int Endpt, int bOutbound, int Period, tUSBHostCb Cb, void *CbData, void *Buf, size_t Len);
19 typedef void *(*tUSBInit)(void *Ptr, int Endpt, size_t MaxPacketSize);
20 typedef void *(*tUSBDataOp)(void *Dest, tUSBHostCb Cb, void *CbData, void *Data, size_t Length);
22 typedef void *(*tUSBControlOp)(void *Ptr, void *Endpt, tUSBHostCb Cb, void *CbData,
23 int bOutbound, // (1) SETUP, OUT, IN vs (0) SETUP, IN, OUT
24 const void *SetupData, size_t SetupLength,
25 const void *OutData, size_t OutLength,
26 void *InData, size_t InLength
28 typedef void *(*tUSBBulkOp)(void *Ptr, void *Endpt, tUSBHostCb Cb, void *CbData,
29 int bOutbound, void *Data, size_t Length
31 typedef void *(*tUSBIsochOp)(void *Ptr, void *Endpt, tUSBHostCb Cb, void *CbData,
32 int bOutbound, void *Data, size_t Length, int When
36 * \brief Defines a USB Host Controller type
40 tUSBInitInt InitInterrupt;
44 void (*RemEndpoint)(void *Ptr, void *Handle);
46 // NOTE: If \a Cb is ERRPTR, the handle returned must be free'd by the calling code
47 // otherwise the controller will free it once done
48 tUSBIsochOp SendIsoch;
49 tUSBControlOp SendControl;
51 void (*FreeOp)(void *Ptr, void *Handle);
54 void (*CheckPorts)(void *Ptr);
55 void (*SetPortFeature)(void *Ptr, int PortNum, int Feat);
56 void (*ClearPortFeature)(void *Ptr, int PortNum, int Feat);
57 int (*GetPortStatus)(void *Ptr, int PortNum, int Flag);
60 extern tUSBHub *USB_RegisterHost(tUSBHostDef *HostDef, void *ControllerPtr, int nPorts);