177d7c7fa8c2b980e679aeb4433ab042bb47f8bb
[tpg/acess2.git] / Modules / USB / Core / usb.h
1 /*
2  * AcessOS Version 1
3  * USB Stack
4  */
5 #ifndef _USB_H_
6 #define _USB_H_
7
8 #include <usb_core.h>
9 #include <usb_hub.h>
10 #include <usb_host.h>
11
12 typedef struct sUSBHost tUSBHost;
13
14 // === STRUCTURES ===
15 /**
16  * \brief USB Hub data
17  */
18 struct sUSBHub
19 {
20         tUSBDevice      *Device;
21         
22         tUSB_HubPoll    CheckPorts;
23         
24          int    nPorts;
25         tUSBDevice      *Devices[];
26 };
27
28 /**
29  * \brief Defines a single device on the USB Bus
30  */
31 struct sUSBDevice
32 {
33         tUSBDevice      *Next;
34         tUSBHub *ParentHub;
35
36         /**
37          * \brief Host controller used
38          */
39         tUSBHost        *Host;
40          int    Address;
41         
42         tUSBDriver      *Driver;
43         void    *Data;
44 };
45
46 struct sUSBHost
47 {
48         struct sUSBHost *Next;
49         
50         tUSBHostDef     *HostDef;
51         void    *Ptr;
52         
53         Uint8   AddressBitmap[128/8];
54         
55         tUSBDevice      RootHubDev;
56         tUSBHub RootHub;
57 };
58
59 extern void     USB_NewDevice(tUSBHub *Hub);
60
61 #endif

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