34#define USB_TYPE_DESCRIPTOR_CDC 0x24
35#define USB_CDC_VERSION_BCD 0x0120
42#define USB_CDC_SUBCLASS_NONE 0x00
43#define USB_CDC_SUBCLASS_DLCM 0x01
44#define USB_CDC_SUBCLASS_ACM 0x02
45#define USB_CDC_SUBCLASS_TCM 0x03
46#define USB_CDC_SUBCLASS_MCCM 0x04
47#define USB_CDC_SUBCLASS_CCM 0x05
48#define USB_CDC_SUBCLASS_ENCM 0x06
49#define USB_CDC_SUBCLASS_ANCM 0x07
50#define USB_CDC_SUBCLASS_WHCM 0x08
51#define USB_CDC_SUBCLASS_DM 0x09
52#define USB_CDC_SUBCLASS_MDLM 0x0A
53#define USB_CDC_SUBCLASS_OBEX 0x0B
54#define USB_CDC_SUBCLASS_EEM 0x0C
55#define USB_CDC_SUBCLASS_NCM 0x0D
62#define USB_CDC_PROTOCOL_NONE 0x00
63#define USB_CDC_PROTOCOL_ITU 0x01
64#define USB_CDC_PROTOCOL_PCCA 0x02
65#define USB_CDC_PROTOCOL_PCCA_A 0x03
66#define USB_CDC_PROTOCOL_GSM 0x04
67#define USB_CDC_PROTOCOL_3GPP 0x05
68#define USB_CDC_PROTOCOL_CS 0x06
69#define USB_CDC_PROTOCOL_EEM 0x07
70#define USB_CDC_PROTOCOL_EXT 0xFE
71#define USB_CDC_PROTOCOL_VENDOR 0xFF
78#define USB_CDC_DESCR_SUBTYPE_FUNCTIONAL 0x00
80#define USB_CDC_DESCR_SUBTYPE_CALL_MGMT 0x01
82#define USB_CDC_DESCR_SUBTYPE_ACM 0x02
84#define USB_CDC_DESCR_SUBTYPE_UNION 0x06
85#define USB_CDC_DESCR_SUBTYPE_ETH_NET 0x0f
96#define USB_CDC_MGNT_REQUEST_SET_LINE_CODING (0x20)
101#define USB_CDC_MGNT_REQUEST_GET_LINE_CODING (0x21)
106#define USB_CDC_MGNT_REQUEST_SET_CONTROL_LINE_STATE (0x22)
111#define USB_CDC_MGNT_REQUEST_SET_ETH_MULTICAST_FILTER 0x40
116#define USB_CDC_MGNT_REQUEST_SET_ETH_PM_PATTERN_FILTER 0x41
121#define USB_CDC_MGNT_REQUEST_GET_ETH_PM_PATTERN_FILTER 0x42
126#define USB_CDC_MGNT_REQUEST_SET_ETH_PACKET_FILTER 0x43
131#define USB_CDC_MGNT_REQUEST_GET_ETH_STATISTICS 0x44
142#define USB_CDC_ACM_CONTROL_LINE_DTE (0x01)
147#define USB_CDC_ACM_CONTROL_LINE_CARRIER (0x02)
158#define USB_CDC_MGNT_NOTIF_NETWORK_CONNECTION 0x00
163#define USB_CDC_MGNT_NOTIF_RESPONSE_AVAILABLE 0x01
168#define USB_CDC_MGNT_NOTIF_AUX_JACK_HOOK_STATE 0x08
173#define USB_CDC_MGNT_NOTIF_RING_DETECT 0x09
178#define USB_CDC_MGNT_NOTIF_SERIAL_STATE 0x20
183#define USB_CDC_MGNT_NOTIF_CALL_STATE_CHANGE 0x28
188#define USB_CDC_MGNT_NOTIF_LINE_STATE_CHANGE 0x29
193#define USB_CDC_MGNT_NOTIF_CONN_SPEED_CHANGE 0x2A
202typedef struct __attribute__((packed)) {
218typedef struct __attribute__((packed)) {
230typedef struct __attribute__((packed)) {
240typedef struct __attribute__((packed)) {
253typedef struct __attribute__((packed)) {
266typedef struct __attribute__((packed)) {
281typedef struct __attribute__((packed)) {
288#define USB_CDC_ACM_CODING_STOP_BITS_1 0
289#define USB_CDC_ACM_CODING_STOP_BITS_1_5 1
290#define USB_CDC_ACM_CODING_STOP_BITS_2 2
292#define USB_CDC_ACM_CODING_PARITY_NONE 0
293#define USB_CDC_ACM_CODING_PARITY_ODD 1
294#define USB_CDC_ACM_CODING_PARITY_EVEN 2
295#define USB_CDC_ACM_CODING_PARITY_MARK 3
296#define USB_CDC_ACM_CODING_PARITY_SPACE 4
Definitions for USB protocol messages.
uint8_t subtype
Descriptor subtype (USB_CDC_DESCR_SUBTYPE_ACM)
uint8_t type
Descriptor type (USB_TYPE_DESCRIPTOR_CDC)
uint8_t length
Size of this descriptor.
uint8_t capabilities
Bitmap indicating the capabilities.
USB CDC call management functional descriptor.
uint8_t length
Size of this descriptor.
uint8_t capabilities
Supported capabilities.
uint8_t type
Descriptor type (USB_TYPE_DESCRIPTOR_CDC)
uint8_t data_if
Interface number used for the call management.
uint8_t subtype
Descriptor subtype (USB_CDC_DESCR_SUBTYPE_CALL_MGMT)
Generic USB CDC descriptor.
uint8_t subtype
Descriptor subtype (usb_cdc_subtype)
uint8_t length
Size of this descriptor.
uint8_t type
Descriptor type (USB_TYPE_DESCRIPTOR_CDC)
uint16_t bcd_cdc
CDC release number in bcd (USB_CDC_VERSION_BCD)
USB CDC ECM connection speed change notification.
uint32_t down
Downlink bit rate.
uint32_t up
Uplink bit rate.
usb_setup_t setup
Setup request header for the notification.
uint16_t maxsegmentsize
Maximum segment size of the interface.
uint8_t macaddress
Index of the string containing the ethernet MAC address.
uint8_t length
Size of this descriptor.
uint8_t subtype
Descriptor subtype (USB_CDC_DESCR_SUBTYPE_ETH_NET)
uint16_t numbermcfilters
Number of configurable multicast filters.
uint8_t numberpowerfilters
Number of pattern filters for host wake-up.
uint8_t type
Descriptor type (USB_TYPE_DESCRIPTOR_CDC)
uint32_t ethernetstatistics
Bitmap indicating the statistics caps.
uint8_t master_if
Master/controlling interface number.
uint8_t length
Size of this descriptor.
uint8_t slave_if
Slave/subordinate interface number.
uint8_t subtype
Descriptor subtype (USB_CDC_DESCR_SUBTYPE_UNION)
uint8_t type
Descriptor type (USB_TYPE_DESCRIPTOR_CDC)
USB CDC ACM line coding setup content.
uint8_t parity
Parity settings.
uint8_t format
Stop bits settings.
uint8_t databits
Number of data bits (5, 6, 7, 8 or 16)
uint32_t baud
Requested baud rate.
USB setup packet (USB 2.0 spec table 9-2)
Definition of global compile time configuration options.