c5f3e39dad2dff2f0a3e51434b122c66907302e6
[tpg/acess2.git] / Modules / USB / Core / include / usb_host.h
1 /*
2  * Acess2 USB Stack
3  * - By John Hodge (thePowersGang)
4  *
5  * usb_host.h
6  * - USB Host Controller Interface
7  */
8 #ifndef _USB_HOST_H_
9 #define _USB_HOST_H_
10
11 #include "usb_core.h"
12 #include "usb_hub.h"
13
14 typedef struct sUSBHostDef      tUSBHostDef;
15
16 typedef void    (*tUSBHostCb)(void *DataPtr, void *Data, int Length);
17
18 typedef void    *(*tUSBHostOp)(void *Ptr, int Fcn, int Endpt, int DataTgl, tUSBHostCb CB, void *CbData, void *Data, size_t Length);
19
20 /**
21  * \brief Defines a USB Host Controller type
22  */
23 struct sUSBHostDef
24 {
25         tUSBHostOp      SendIN;
26         tUSBHostOp      SendOUT;
27         tUSBHostOp      SendSETUP;
28
29          int    (*IsOpComplete)(void *Ptr, void *OpPtr);
30
31         void    (*CheckPorts)(void *Ptr);
32 };
33
34 extern tUSBHub  *USB_RegisterHost(tUSBHostDef *HostDef, void *ControllerPtr, int nPorts);
35
36 #endif
37

UCC git Repository :: git.ucc.asn.au