4#define USB_MAXPATH IPC_MAXPATH_LEN
10#define USB_DT_DEVICE 0x01
11#define USB_DT_CONFIG 0x02
12#define USB_DT_STRING 0x03
13#define USB_DT_INTERFACE 0x04
14#define USB_DT_ENDPOINT 0x05
17#define USB_REQ_GETSTATUS 0x00
18#define USB_REQ_CLEARFEATURE 0x01
19#define USB_REQ_SETFEATURE 0x03
20#define USB_REQ_SETADDRESS 0x05
21#define USB_REQ_GETDESCRIPTOR 0x06
22#define USB_REQ_SETDESCRIPTOR 0x07
23#define USB_REQ_GETCONFIG 0x08
24#define USB_REQ_SETCONFIG 0x09
25#define USB_REQ_GETINTERFACE 0x0a
26#define USB_REQ_SETINTERFACE 0x0b
27#define USB_REQ_SYNCFRAME 0x0c
30#define USB_DT_DEVICE_SIZE 18
31#define USB_DT_CONFIG_SIZE 9
32#define USB_DT_INTERFACE_SIZE 9
33#define USB_DT_ENDPOINT_SIZE 7
34#define USB_DT_ENDPOINT_AUDIO_SIZE 9
35#define USB_DT_HUB_NONVAR_SIZE 7
38#define USB_CTRLTYPE_DIR_HOST2DEVICE (0<<7)
39#define USB_CTRLTYPE_DIR_DEVICE2HOST (1<<7)
40#define USB_CTRLTYPE_TYPE_STANDARD (0<<5)
41#define USB_CTRLTYPE_TYPE_CLASS (1<<5)
42#define USB_CTRLTYPE_TYPE_VENDOR (2<<5)
43#define USB_CTRLTYPE_TYPE_RESERVED (3<<5)
44#define USB_CTRLTYPE_REC_DEVICE 0
45#define USB_CTRLTYPE_REC_INTERFACE 1
46#define USB_CTRLTYPE_REC_ENDPOINT 2
47#define USB_CTRLTYPE_REC_OTHER 3
49#define USB_FEATURE_ENDPOINT_HALT 0
51#define USB_ENDPOINT_IN 0x80
52#define USB_ENDPOINT_OUT 0x00
58# define ATTRIBUTE_PACKED __attribute__((packed))
struct _usbinterfacedesc * interfaces
struct _usbconfdesc * configurations
struct _usbendpointdesc * endpoints
void USB_FreeDescriptors(usb_devdesc *udd)
void USB_SuspendDevice(struct ehci_device *fd)
struct _usbendpointdesc usb_endpointdesc
s32 USB_GetDescriptors(struct ehci_hcd *ehci, struct ehci_device *fd, usb_devdesc *udd)
void USB_ResumeDevice(struct ehci_device *fd)
s32 USB_GetDeviceList(const char *devpath, void *descr_buffer, u8 num_descr, u8 b0, u8 *cnt_descr)
s32 USB_ReadBlkMsg(struct ehci_device *fd, u8 bEndpoint, u16 wLength, void *rpData)
s32 USB_WriteIntrMsg(struct ehci_device *fd, u8 bEndpoint, u16 wLength, void *rpData)
s32 USB_ReadCtrlMsg(struct ehci_device *fd, u8 bmRequestType, u8 bmRequest, u16 wValue, u16 wIndex, u16 wLength, void *rpData)
void * USB_Alloc(int size)
struct _usbinterfacedesc usb_interfacedesc
s32 USB_ReadIntrMsg(struct ehci_device *fd, u8 bEndpoint, u16 wLength, void *rpData)
struct _usbctrlrequest usbctrlrequest
struct _usbdevdesc usb_devdesc
s32 USB_CloseDevice(struct ehci_device **fd)
s32 USB_SetAlternativeInterface(struct ehci_hcd *ehci, struct ehci_device *fd, u8 interface, u8 alternateSetting)
s32 USB_ClearHalt(struct ehci_hcd *ehci, struct ehci_device *fd, u8 endpointAddress)
s32 USB_SetConfiguration(struct ehci_hcd *ehci, struct ehci_device *fd, u8 configuration)
s32 USB_WriteBlkMsg(struct ehci_hcd *ehci, struct ehci_device *fd, u8 bEndpoint, u16 wLength, void *rpData)
s32 USB_GetConfiguration(struct ehci_hcd *ehci, struct ehci_device *fd, u8 *configuration)
s32 USB_GetDeviceDescription(struct ehci_device *fd, usb_devdesc *devdesc)
s32 USB_OpenDevice(const char *device, u16 vid, u16 pid, struct ehci_device **fd)
s32 USB_WriteCtrlMsg(struct ehci_hcd *ehci, struct ehci_device *fd, u8 bmRequestType, u8 bmRequest, u16 wValue, u16 wIndex, u16 wLength, void *rpData)
struct _usbconfdesc usb_configurationdesc
uint8_t u8
8bit unsigned integer
uint16_t u16
16bit unsigned integer
int32_t s32
32bit signed integer