Import of all remaining parts of the Poseidon port. This makes the source code delive...
[cake.git] / rom / usb / classes / hub / hub.h
blobe228a82d04f8d3968b592d9eb5e9fd952827d474
1 #ifndef HUB_H
2 #define HUB_H
4 #include <exec/types.h>
5 #include <exec/lists.h>
6 #include <libraries/poseidon.h>
8 struct NepHubBase
10 struct Library nh_Library; /* standard */
11 UWORD nh_Flags; /* various flags */
13 struct Library *nh_UtilityBase; /* utility base */
14 struct List nh_Bindings;
15 struct SignalSemaphore nh_Adr0Sema; /* Address 0 Semaphore */
18 struct NepClassHub
20 struct Node nch_Node; /* Node linkage */
21 struct NepHubBase *nch_HubBase; /* hub.class base */
22 struct Library *nch_Base; /* Poseidon base */
23 struct PsdHardware *nch_Hardware; /* Up linkage */
24 struct PsdDevice *nch_Device; /* Up linkage */
25 struct PsdConfig *nch_Config; /* Up linkage */
26 struct PsdInterface *nch_Interface; /* Up linkage */
27 struct PsdEndpoint *nch_EP1; /* Endpoint 1 */
28 struct PsdPipe *nch_EP0Pipe; /* Endpoint 0 pipe */
29 struct PsdPipe *nch_EP1Pipe; /* Endpoint 1 pipe */
30 BOOL nch_IOStarted; /* IO Running */
31 BOOL nch_Running; /* Not suspended */
32 struct Task *nch_ReadySigTask; /* Task to send ready signal to */
33 LONG nch_ReadySignal; /* Signal to send when ready */
34 struct Task *nch_Task; /* Subtask */
35 struct MsgPort *nch_TaskMsgPort; /* Message Port of Subtask */
36 struct MsgPort *nch_CtrlMsgPort; /* Message Port for control messages */
37 UWORD nch_NumPorts; /* Number of ports at this hub */
38 BOOL nch_IsUSB20; /* Is this a highspeed hub? */
39 UWORD nch_HubAttr; /* Hub Characteristics (see UHCF flags) */
40 UWORD nch_PwrGoodTime; /* Time in ms for power to become good */
41 UWORD nch_HubCurrent; /* Max hub current in mA */
42 ULONG nch_Removable; /* Bitmask for device removable */
43 ULONG nch_PowerCycle; /* Bitmask of devices to powercycle */
44 ULONG nch_DisablePort; /* Bitmask of devices to disable */
45 BOOL nch_ClassScan; /* Flag to cause class scan */
46 UBYTE nch_PortChanges[2]; /* Buffer for port changes */
47 struct PsdDevice **nch_Downstream; /* Pointer to array of down stream device pointers */
50 struct NepHubMsg
52 struct Message nhm_Msg; /* Message body */
53 ULONG nhm_MethodID; /* The method ID (see usbclass.h) */
54 IPTR *nhm_Params; /* Pointer to parameters of the method (all of them!) */
55 IPTR nhm_Result; /* Result of call */
58 #endif /* HUB_H */