Added some function descriptors definitions that were missing.
Renamed USB_CDC_*_PARITY and USB_CDC_*_STOPBIT* to follow the usual naming pattern. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40091 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -25,8 +25,61 @@ enum { // Communication Interface Class Control Protocols
|
|||||||
USB_CDC_COMMUNICATION_INTERFACE_SPECIFIC_PROTOCOL = 0xff // Vendor-specific protocol
|
USB_CDC_COMMUNICATION_INTERFACE_SPECIFIC_PROTOCOL = 0xff // Vendor-specific protocol
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define USB_CDC_DATA_INTERFACE_CLASS 0x0a
|
#define USB_CDC_DATA_INTERFACE_CLASS 0x0a
|
||||||
|
|
||||||
|
// Functional Descriptors (p32)
|
||||||
|
|
||||||
|
enum { // Functional Descriptors Subtypes
|
||||||
|
USB_CDC_HEADER_FUNCTIONAL_DESCRIPTOR = 0x00,
|
||||||
|
USB_CDC_CM_FUNCTIONAL_DESCRIPTOR,
|
||||||
|
USB_CDC_ACM_FUNCTIONAL_DESCRIPTOR,
|
||||||
|
USB_CDC_UNION_FUNCTIONAL_DESCRIPTOR = 0x06
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct usb_cdc_header_function_descriptor {
|
||||||
|
uint8 length;
|
||||||
|
uint8 descriptor_type;
|
||||||
|
uint8 descriptor_subtype; // USB_CDC_HEADER_FUNCTIONAL_DESCRIPTOR
|
||||||
|
uint16 cdc_version;
|
||||||
|
} _PACKED usb_cdc_header_function_descriptor;
|
||||||
|
|
||||||
|
typedef struct usb_cdc_cm_functional_descriptor {
|
||||||
|
uint8 length;
|
||||||
|
uint8 descriptor_type;
|
||||||
|
uint8 descriptor_subtype; // USB_CDC_CM_FUNCTIONAL_DESCRIPTOR
|
||||||
|
uint8 capabilities;
|
||||||
|
uint8 data_interface;
|
||||||
|
} _PACKED usb_cdc_cm_functional_descriptor;
|
||||||
|
|
||||||
|
enum { // Call Management Functional Descriptor capabilities bitmap
|
||||||
|
USB_CDC_CM_DOES_CALL_MANAGEMENT = 0x00,
|
||||||
|
USB_CDC_CM_OVER_DATA_INTERFACE = 0x01
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct usb_cdc_acm_functional_descriptor {
|
||||||
|
uint8 length;
|
||||||
|
uint8 descriptor_type;
|
||||||
|
uint8 descriptor_subtype; // USB_CDC_ACM_FUNCTIONAL_DESCRIPTOR
|
||||||
|
uint8 capabilities;
|
||||||
|
} _PACKED usb_cdc_acm_functional_descriptor;
|
||||||
|
|
||||||
|
enum { // Abstract Control Model Functional Descriptor capabilities bitmap
|
||||||
|
USB_CDC_ACM_HAS_COMM_FEATURES = 0x00,
|
||||||
|
USB_CDC_ACM_HAS_LINE_CONTROL = 0x01,
|
||||||
|
USB_CDC_ACM_HAS_SEND_BREAK = 0x02,
|
||||||
|
USB_CDC_ACM_HAS_NETWORK_CONNECTION = 0x04
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct usb_cdc_union_functional_descriptor {
|
||||||
|
uint8 length;
|
||||||
|
uint8 descriptor_type;
|
||||||
|
uint8 descriptor_subtype; // USB_CDC_UNION_FUNCTIONAL_DESCRIPTOR
|
||||||
|
uint8 master_interface;
|
||||||
|
uint8 slave_interfaces[1];
|
||||||
|
} _PACKED usb_cdc_union_functional_descriptor;
|
||||||
|
|
||||||
|
|
||||||
enum { // Management Element Requests (p62)
|
enum { // Management Element Requests (p62)
|
||||||
USB_CDC_SEND_ENCAPSULATED_COMMAND = 0x00,
|
USB_CDC_SEND_ENCAPSULATED_COMMAND = 0x00,
|
||||||
USB_CDC_GET_ENCAPSULATED_RESPONSE,
|
USB_CDC_GET_ENCAPSULATED_RESPONSE,
|
||||||
@@ -89,17 +142,17 @@ typedef struct { // Line Coding Structure (for USB_CDC_SET/GET_LINE_CODING (p69)
|
|||||||
} _PACKED usb_cdc_line_coding;
|
} _PACKED usb_cdc_line_coding;
|
||||||
|
|
||||||
enum { // CDC stopbits values (for Line Coding Structure stopbits field)
|
enum { // CDC stopbits values (for Line Coding Structure stopbits field)
|
||||||
USB_CDC_1_STOPBIT = 0,
|
USB_CDC_LINE_CODING_1_STOPBIT = 0,
|
||||||
USB_CDC_1_5_STOPBITS,
|
USB_CDC_LINE_CODING_1_5_STOPBITS,
|
||||||
USB_CDC_2_STOPBITS
|
USB_CDC_LINE_CODING_2_STOPBITS
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { // CDC parity values (for Line Coding Structure parity field)
|
enum { // CDC parity values (for Line Coding Structure parity field)
|
||||||
USB_CDC_NO_PARITY = 0,
|
USB_CDC_LINE_CODING_NO_PARITY = 0,
|
||||||
USB_CDC_ODD_PARITY,
|
USB_CDC_LINE_CODING_ODD_PARITY,
|
||||||
USB_CDC_EVEN_PARITY,
|
USB_CDC_LINE_CODING_EVEN_PARITY,
|
||||||
USB_CDC_MARK_PARITY,
|
USB_CDC_LINE_CODING_MARK_PARITY,
|
||||||
USB_CDC_SPACE_PARITY
|
USB_CDC_LINE_CODING_SPACE_PARITY
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { // CDC Control Signal bitmap (for CDC_SET_CONTROL_LINE_STATE request)
|
enum { // CDC Control Signal bitmap (for CDC_SET_CONTROL_LINE_STATE request)
|
||||||
|
|||||||
Reference in New Issue
Block a user