|
Mbed OS Reference
|
Loading...
Searching...
No Matches
18#ifndef USBDESCRIPTOR_H
19#define USBDESCRIPTOR_H
22#define DEVICE_DESCRIPTOR (1)
23#define CONFIGURATION_DESCRIPTOR (2)
24#define STRING_DESCRIPTOR (3)
25#define INTERFACE_DESCRIPTOR (4)
26#define ENDPOINT_DESCRIPTOR (5)
27#define QUALIFIER_DESCRIPTOR (6)
30#define DEVICE_DESCRIPTOR_LENGTH (0x12)
31#define CONFIGURATION_DESCRIPTOR_LENGTH (0x09)
32#define INTERFACE_DESCRIPTOR_LENGTH (0x09)
33#define ENDPOINT_DESCRIPTOR_LENGTH (0x07)
37#define STRING_OFFSET_LANGID (0)
38#define STRING_OFFSET_IMANUFACTURER (1)
39#define STRING_OFFSET_IPRODUCT (2)
40#define STRING_OFFSET_ISERIAL (3)
41#define STRING_OFFSET_ICONFIGURATION (4)
42#define STRING_OFFSET_IINTERFACE (5)
45#define USB_VERSION_2_0 (0x0200)
48#define LSB(n) ((n)&0xff)
49#define MSB(n) (((n)&0xff00)>>8)
53#define C_RESERVED (1U<<7)
54#define C_SELF_POWERED (1U<<6)
55#define C_REMOTE_WAKEUP (1U<<5)
58#define C_POWER(mA) ((mA)/2)
61#define E_CONTROL (0x00)
62#define E_ISOCHRONOUS (0x01)
64#define E_INTERRUPT (0x03)
67#define E_NO_SYNCHRONIZATION (0x00)
68#define E_ASYNCHRONOUS (0x04)
69#define E_ADAPTIVE (0x08)
70#define E_SYNCHRONOUS (0x0C)
72#define E_FEEDBACK (0x10)
73#define E_IMPLICIT_FEEDBACK (0x20)