Enable debug
[AROS.git] / rom / usb / classes / hubss / hubss_class.h
blob7c5f324b7932231e96e9af518b27a84689f11dbf
1 /*
2 Copyright © 2014, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: SuperSpeed USB3.0 hub for Poseidon (based upon hub.h by Chris Hodges <chrisly@platon42.de>)
6 Lang: English
7 */
9 #ifndef HUBSS_CLASS_H
10 #define HUBSS_CLASS_H
12 #include <exec/exec.h>
13 #include <libraries/poseidon.h>
15 #include <devices/usb_hub.h>
17 #define MYBUG_LEVEL 0
18 #define KPRINTF(l, x) D(if ((l>=MYBUG_LEVEL)||(l==-1)) { do { { bug x; } } while (0); } )
20 struct NepHubBase {
21 struct Library nh_Library; /* standard */
22 UWORD nh_Flags; /* various flags */
24 struct Library *nh_UtilityBase; /* utility base */
25 struct List nh_Bindings;
26 struct SignalSemaphore nh_Adr0Sema; /* Address 0 Semaphore */
29 struct NepClassHub {
30 struct Node nch_Node; /* Node linkage */
31 struct NepHubBase *nch_HubBase; /* hub.class base */
32 struct Library *nch_Base; /* Poseidon base */
33 struct PsdHardware *nch_Hardware; /* Up linkage */
34 struct PsdDevice *nch_Device; /* Up linkage */
35 struct PsdConfig *nch_Config; /* Up linkage */
36 struct PsdInterface *nch_Interface; /* Up linkage */
38 struct PsdEndpoint *nch_EP1; /* Endpoint 1 */
39 struct PsdPipe *nch_EP0Pipe; /* Endpoint 0 pipe */
40 struct PsdPipe *nch_EP1Pipe; /* Endpoint 1 pipe */
42 BOOL nch_IOStarted; /* IO Running */
43 BOOL nch_Running; /* Not suspended */
44 struct Task *nch_ReadySigTask; /* Task to send ready signal to */
45 LONG nch_ReadySignal; /* Signal to send when ready */
46 struct Task *nch_Task; /* Subtask */
47 struct MsgPort *nch_TaskMsgPort; /* Message Port of Subtask */
48 struct MsgPort *nch_CtrlMsgPort; /* Message Port for control messages */
50 BOOL nch_IsUSB30; /* Is this a superspeed hub? */
51 UWORD nch_NumPorts; /* Number of ports at this hub */
52 UWORD nch_HubAttr; /* Hub Characteristics (see UHCF flags) */
53 UWORD nch_PwrGoodTime; /* Time in ms for power to become good */
54 UWORD nch_HubCurrent; /* Max hub current in mA */
55 UWORD nch_HubHdrDecLat;
56 UWORD nch_HubDelay;
57 ULONG nch_Removable; /* Bitmask for device removable */
59 ULONG nch_PowerCycle; /* Bitmask of devices to powercycle */
60 ULONG nch_DisablePort; /* Bitmask of devices to disable */
62 BOOL nch_ClassScan; /* Flag to cause class scan */
63 BOOL nch_IsRootHub; /* Is this a Root Hub? */
65 UBYTE nch_PortChanges[4]; /* Buffer for port changes */
66 struct PsdDevice **nch_Downstream; /* Pointer to array of down stream device pointers */
69 struct NepHubMsg {
70 struct Message nhm_Msg; /* Message body */
71 ULONG nhm_MethodID; /* The method ID (see usbclass.h) */
72 IPTR *nhm_Params; /* Pointer to parameters of the method (all of them!) */
73 IPTR nhm_Result; /* Result of call */
77 #endif /* HUBSS_CLASS_H */