2 Copyright © 2013, The AROS Development Team. All rights reserved.
6 #include <devices/usb_hub.h>
9 #define LE16(x) ((((x) & 0xff) << 8) | (((x) & 0xff00) >> 8))
13 #define BE16(x) ((((x) & 0xff) << 8) | (((x) & 0xff00) >> 8))
17 const struct UsbStdDevDesc OTGRootHubDevDesc
= {
18 sizeof(struct UsbStdDevDesc
),
36 struct UsbStdCfgDesc HubCfgDesc
;
37 struct UsbStdIfDesc HubIfDesc
;
38 struct UsbStdEPDesc HubEPDesc
;
39 } __attribute__((packed
));
41 const struct OTGHubCfg OTGRootHubCfg
=
44 sizeof(struct UsbStdCfgDesc
),
46 LE16(sizeof(struct OTGHubCfg
)),
50 USCAF_ONE
|USCAF_SELF_POWERED
,
55 sizeof(struct UsbStdIfDesc
),
67 sizeof(struct UsbStdEPDesc
),
76 const struct UsbHubDesc OTGRootHubDesc
= {
77 9, // 0 Number of bytes in this descriptor, including this byte
78 UDT_HUB
, // 1 Descriptor Type, value: 29H for hub descriptor
79 1, // 2 Number of downstream facing ports that this hub supports
80 0, // 3 wHubCharacteristics
81 0, // 5 bPwrOn2PwrGood
82 0, // 6 bHubContrCurrent
83 1, // 7 DeviceRemovable (size is variable)
84 0xFF // x PortPwrCtrlMask (size is variable)
87 static const CONST_STRPTR OTGRootHubStrings
[] =
90 "BCM2708 OTG2USB Root Hub",