sfdc: experimental extension which creates
[AROS.git] / rom / usb / vusbhc / vusb2otg / vusb2otg_device.h
blobe3be8468a17ab2c24a70a5136779c005636bfe46
1 /*
2 Copyright © 2014, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
8 #ifndef VUSB2OTG_DEVICE_H
9 #define VUSB2OTG_DEVICE_H
11 #include <aros/debug.h>
12 #include <aros/macros.h>
14 #include <proto/exec.h>
15 #include <proto/stdc.h>
16 #include <proto/arossupport.h>
18 #include <devices/usb.h>
19 #include <devices/usb_hub.h>
20 #include <devices/newstyle.h>
21 #include <devices/usbhardware.h>
23 #define RC_OK 0
24 #define RC_DONTREPLY -1
26 #define MYBUG_LEVEL 0
27 #define mybug(l, x) D(if ((l>=MYBUG_LEVEL)||(l==-1)) { do { { bug x; } } while (0); } )
28 #define mybug_unit(l, x) D(if ((l>=MYBUG_LEVEL)||(l==-1)) { do { { bug("%s %s: ", unit->name, __FUNCTION__); bug x; } } while (0); } )
30 BOOL cmdAbortIO(struct IOUsbHWReq *ioreq);
31 WORD cmdUsbReset(struct IOUsbHWReq *ioreq);
32 WORD cmdNSDeviceQuery(struct IOStdReq *ioreq);
33 WORD cmdQueryDevice(struct IOUsbHWReq *ioreq);
34 WORD cmdControlXFer(struct IOUsbHWReq *ioreq);
35 WORD cmdControlXFerRootHub(struct IOUsbHWReq *ioreq);
36 WORD cmdIntXFer(struct IOUsbHWReq *ioreq);
37 WORD cmdIntXFerRootHub(struct IOUsbHWReq *ioreq);
38 WORD cmdGetString(struct IOUsbHWReq *ioreq, char *cstring);
40 struct VUSB2OTGPort {
41 struct Node node;
42 char name[256];
43 ULONG number;
44 ULONG state;
47 struct VUSB2OTGUnit {
48 struct Node node;
49 char name[256];
50 ULONG number;
51 ULONG state;
53 BOOL hostmode;
54 BOOL usb2otg;
56 struct VUSB2OTGRootHub {
57 struct List port_list;
58 ULONG port_count;
60 UWORD addr;
62 struct UsbStdDevDesc devdesc;
64 /* FIXME: add OTG descriptor if host controller supports USB2OTG */
65 struct RHConfig {
66 struct UsbStdCfgDesc cfgdesc;
67 struct UsbStdIfDesc ifdesc;
68 struct UsbStdEPDesc epdesc;
69 } config;
71 struct UsbHubDesc hubdesc;
73 } roothub;
77 struct VUSB2OTGBase {
79 struct Device device;
80 struct List unit_list;
81 ULONG unit_count;
85 #endif /* VUSB2OTG_DEVICE_H */