revert commit 56204.
[AROS.git] / rom / usb / classes / arosx / arosx.h
blob347540cf3440312d3e4113a8789bcd8dbfc83229
1 #ifndef AROSXClass_H
2 #define AROSXClass_H
4 #include <libraries/mui.h>
5 #include <sys/time.h>
7 #include "include/arosx.h"
9 #define ID_ABOUT 0x55555555
10 #define ID_STORE_CONFIG 0xaaaaaaaa
12 struct ClsGlobalCfg
14 ULONG cgc_ChunkID;
15 ULONG cgc_Length;
16 ULONG cgc_MidiMinOctave;
17 ULONG cgc_KeyMaxOctave;
18 ULONG cgc_AutoKeyUp;
21 struct AROSXBase {
22 struct Library arosx_LibNode;
23 struct AROSXClassBase *arosxb;
26 struct AROSXClassBase
28 struct Library Library; /* standard */
30 struct Library *MUIBase; /* MUI master base */
31 struct Library *PsdBase; /* Poseidon base */
33 struct AROSXBase *AROSXBase;
35 ULONG tv_secs;
36 ULONG tv_micro;
38 UBYTE arosxc_count;
40 struct SignalSemaphore arosxc_lock;
42 struct AROSXClassController *arosxc_0;
43 struct AROSXClassController *arosxc_1;
44 struct AROSXClassController *arosxc_2;
45 struct AROSXClassController *arosxc_3;
47 struct SignalSemaphore event_lock;
48 struct List event_port_list;
49 struct MsgPort event_reply_port;
53 struct AROSXClassController
55 struct Node Node; /* Node linkage */
57 UBYTE id;
58 UBYTE name[64];
60 UBYTE controller_type;
62 ULONG initial_tv_secs;
63 ULONG initial_tv_micro;
65 struct AROSXClassController_status {
66 BOOL connected;
68 BOOL wireless;
69 BOOL signallost;
71 UBYTE battery_type;
72 UBYTE battery_level;
73 } status;
75 union {
76 struct AROSX_GAMEPAD arosx_gamepad;
79 struct Device *TimerBase;
80 struct MsgPort *TimerMP;
81 struct timerequest *TimerIO;
83 struct AROSXClassBase *arosxb; /* Up linkage */
85 struct Library *Base; /* Poseidon base */
86 struct PsdDevice *Device; /* Up linkage */
87 struct PsdConfig *Config; /* Up linkage */
88 struct PsdInterface *Interface; /* Up linkage */
90 struct PsdPipe *EP0Pipe; /* Endpoint 0 pipe */
91 UBYTE *EP0Buf; /* Packet buffer for EP0 */
93 struct PsdEndpoint *EPIn; /* Endpoint 1 */
94 struct PsdPipe *EPInPipe; /* Endpoint 1 pipe */
95 UBYTE *EPInBuf; /* Packet buffer for EP1 */
97 struct PsdEndpoint *EPOut; /* Endpoint 2 */
98 struct PsdPipe *EPOutPipe; /* Endpoint 2 pipe */
99 UBYTE *EPOutBuf; /* Packet buffer for EP2 */
101 struct Task *ReadySigTask; /* Task to send ready signal to */
102 LONG ReadySignal; /* Signal to send when ready */
103 struct Task *Task; /* Subtask */
104 struct MsgPort *TaskMsgPort; /* Message Port of Subtask */
105 struct MsgPort *InpMsgPort; /* input.device MsgPort */
106 struct IOStdReq *InpIOReq; /* input.device IORequest */
107 struct InputEvent FakeEvent; /* Input Event */
108 struct Library *InputBase; /* Pointer to input.device base */
110 IPTR IfNum; /* Interface Number */
112 STRPTR devname;
114 struct PsdDescriptor *pdd;
115 UBYTE *xinput_desc;
117 struct Task *GUITask; /* GUI Task */
121 #endif /* AROSXClass_H */