Modules/USB - Working on a structure for the USB subsystem
[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         tUSBHub *Next;
21         tUSBDevice      *Device;
22         
23         tUSB_HubPoll    CheckPorts;
24         
25          int    nPorts;
26         tUSBDevice      *Devices[];
27 };
28
29 /**
30  * \brief Defines a single device on the USB Bus
31  */
32 struct sUSBDevice
33 {
34         tUSBDevice      *Next;
35         tUSBDevice      *ParentHub;
36
37         /**
38          * \brief Host controller used
39          */
40         tUSBHost        *Host;
41          int    Address;
42         
43         tUSBDriver      *Driver;
44         void    *Data;
45 };
46
47 struct sUSBHost
48 {
49         struct sUSBHost *Next;
50         
51         tUSBHostDef     *HostDef;
52         void    *Ptr;
53         
54         Uint8   AddressBitmap[128/8];
55 };
56
57 extern void     USB_NewDevice(tUSBHub *Hub);
58
59 #endif

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