Skip to content

Group USB_CDC

Modules > USB_CDC

Generic USB CDC class definitions. More...

Classes

Type Name
struct usb_cdc_acm_desc
Abstract Control Management Functional Descriptor.
struct usb_cdc_call_mgmt_desc
Call Management Functional Descriptor.
struct usb_cdc_country_desc
Country Selection Functional Descriptor.
struct usb_cdc_header_desc
Header Functional Descriptor.
struct usb_cdc_line_coding
Line Coding Structure.
struct usb_cdc_notification
Notification structure from CDC.
struct usb_cdc_union_desc
Union Functional Descriptor.

Public Functions

Type Name
struct usb_cdc_header_desc __attribute__ ((packed))

Macros

Type Name
define USB_CDC_1_5_STOP_BITS 0x01
1.5 stop bits.
define USB_CDC_1_STOP_BITS 0x00
1 stop bit.
define USB_CDC_2_STOP_BITS 0x02
2 stop bits.
define USB_CDC_CALL_MGMT_CAP_CALL_MGMT 0x01
Device handles call management itself.
define USB_CDC_CALL_MGMT_CAP_DATA_INTF 0x02
Device can send/receive call management information over a Data Class interface.
define USB_CDC_CAP_BRK 0x04
Supports the request Send_Break.
define USB_CDC_CAP_LINE 0x02
Supports the request combination of Set_Line_Coding, Set_Control_Line_State, Get_Line_Coding, and the notification Serial_State.
define USB_CDC_CAP_NOTIFY 0x08
Supports notification Network_Connection.
define USB_CDC_CLEAR_COMM_FEATURE 0x04
Controls the settings for a particular communication feature of a particular target, setting the selected feature to its default state.
define USB_CDC_COMM_FEATURE 0x01
Supports the request combination of Set_Comm_Feature, Clear_Comm_Feature, Get_Comm_Feature.
define USB_CDC_EVEN_PARITY 0x02
EVEN parity bit.
define USB_CDC_GET_COMM_FEATURE 0x03
Returns the current settings for the communication feature as selected.
define USB_CDC_GET_ENCAPSULATED_RESP 0x01
Used to request a response in the format of the supported control protocol of the Communication Class interface.
define USB_CDC_GET_LINE_CODING 0x21
Allows the host to find out the currently configured line coding.
define USB_CDC_MARK_PARITY 0x03
patity is MARK.
define USB_CDC_NO_PARITY 0x00
NO parity bit.
define USB_CDC_NTF_NETWORK_CONNECTION 0x00
Allows the device to notify the host about network connection status.
define USB_CDC_NTF_RESPONSE_AVAILABLE 0x01
Allows the device to notify the host that a response is available.
define USB_CDC_NTF_SERIAL_STATE 0x20
Sends asynchronous notification of UART status.
define USB_CDC_NTF_SPEED_CHANGE 0x2A
Allows the device to inform the host-networking driver that a change in either the uplink or the downlink bit rate of the connection has occurred.
define USB_CDC_ODD_PARITY 0x01
ODD parity bit.
define USB_CDC_PROTO_CDCSPEC 0xFE
CDC specified.
define USB_CDC_PROTO_HOST 0xFD
Host based driver.
define USB_CDC_PROTO_NONE 0x00
No class specific protocol required.
define USB_CDC_PROTO_NTB 0x01
Network Transfer Block.
define USB_CDC_PROTO_V25TER 0x01
AT Commands: V.250 etc.
define USB_CDC_SEND_BREAK 0x23
Sends special carrier modulation that generates an RS-232 style break.
define USB_CDC_SEND_ENCAPSULATED_CMD 0x00
Used to issue a command in the format of the supported control protocol of the Communication Class interface.
define USB_CDC_SET_COMM_FEATURE 0x02
Controls the settings for a particular communication feature of a particular target.
define USB_CDC_SET_CONTROL_LINE_STATE 0x22
Generates RS-232/V.24 style control signals.
define USB_CDC_SET_LINE_CODING 0x20
Allows the host to specify typical asynchronous line-character formatting properties.
define USB_CDC_SPACE_PARITY 0x04
patity is SPACE.
define USB_CDC_STATE_BREAK 0x0004
State of break detection mechanism of the device.
define USB_CDC_STATE_FRAMING 0x0010
A framing error has occurred.
define USB_CDC_STATE_OVERRUN 0x0040
Received data has been discarded due to overrun in the device.
define USB_CDC_STATE_PARITY 0x0020
A parity error has occurred.
define USB_CDC_STATE_RING 0x0008
State of ring signal detection of the device.
define USB_CDC_STATE_RX_CARRIER 0x0001
State of receiver carrier detection mechanism.
define USB_CDC_STATE_TX_CARRIER 0x0002
State of transmission carrier.
define USB_CDC_SUBCLASS_ACM 0x02
Abstract Control Model.
define USB_CLASS_CDC 0x02
Communicational Device class.
define USB_CLASS_CDC_DATA 0x0A
Data Interface class.
define USB_DTYPE_CDC_ACM 0x02
Abstract Control Management Functional Descriptor.
define USB_DTYPE_CDC_CALL_MANAGEMENT 0x01
Call Management Functional Descriptor.
define USB_DTYPE_CDC_COUNTRY 0x07
Country Selection Functional Descriptor.
define USB_DTYPE_CDC_HEADER 0x00
Header Functional Descriptor.
define USB_DTYPE_CDC_UNION 0x06
Union Functional Descriptor.

Detailed Description

This module based on * Universal Serial Bus Class Definitions for Communications Devices Revision 1.2 (Errata 1)

Public Functions Documentation

function __attribute__

struct usb_cdc_header_desc __attribute__ (
    (packed)
) 

Macro Definition Documentation

define USB_CDC_1_5_STOP_BITS

#define USB_CDC_1_5_STOP_BITS 0x01

define USB_CDC_1_STOP_BITS

#define USB_CDC_1_STOP_BITS 0x00

define USB_CDC_2_STOP_BITS

#define USB_CDC_2_STOP_BITS 0x02

define USB_CDC_CALL_MGMT_CAP_CALL_MGMT

#define USB_CDC_CALL_MGMT_CAP_CALL_MGMT 0x01

define USB_CDC_CALL_MGMT_CAP_DATA_INTF

#define USB_CDC_CALL_MGMT_CAP_DATA_INTF 0x02

define USB_CDC_CAP_BRK

#define USB_CDC_CAP_BRK 0x04

define USB_CDC_CAP_LINE

#define USB_CDC_CAP_LINE 0x02

define USB_CDC_CAP_NOTIFY

#define USB_CDC_CAP_NOTIFY 0x08

define USB_CDC_CLEAR_COMM_FEATURE

#define USB_CDC_CLEAR_COMM_FEATURE 0x04

define USB_CDC_COMM_FEATURE

#define USB_CDC_COMM_FEATURE 0x01

define USB_CDC_EVEN_PARITY

#define USB_CDC_EVEN_PARITY 0x02

define USB_CDC_GET_COMM_FEATURE

#define USB_CDC_GET_COMM_FEATURE 0x03

define USB_CDC_GET_ENCAPSULATED_RESP

#define USB_CDC_GET_ENCAPSULATED_RESP 0x01

define USB_CDC_GET_LINE_CODING

#define USB_CDC_GET_LINE_CODING 0x21

define USB_CDC_MARK_PARITY

#define USB_CDC_MARK_PARITY 0x03

define USB_CDC_NO_PARITY

#define USB_CDC_NO_PARITY 0x00

define USB_CDC_NTF_NETWORK_CONNECTION

#define USB_CDC_NTF_NETWORK_CONNECTION 0x00

define USB_CDC_NTF_RESPONSE_AVAILABLE

#define USB_CDC_NTF_RESPONSE_AVAILABLE 0x01

define USB_CDC_NTF_SERIAL_STATE

#define USB_CDC_NTF_SERIAL_STATE 0x20

define USB_CDC_NTF_SPEED_CHANGE

#define USB_CDC_NTF_SPEED_CHANGE 0x2A

define USB_CDC_ODD_PARITY

#define USB_CDC_ODD_PARITY 0x01

define USB_CDC_PROTO_CDCSPEC

CDC specified.

#define USB_CDC_PROTO_CDCSPEC 0xFE

The protocol(s) are described using a Protocol Unit Functional Descriptors on Communication Class Interface.

define USB_CDC_PROTO_HOST

Host based driver.

#define USB_CDC_PROTO_HOST 0xFD

This protocol code should only be used in messages between host and device to identify the host driver portion of a protocol stack.

define USB_CDC_PROTO_NONE

#define USB_CDC_PROTO_NONE 0x00

define USB_CDC_PROTO_NTB

#define USB_CDC_PROTO_NTB 0x01

define USB_CDC_PROTO_V25TER

#define USB_CDC_PROTO_V25TER 0x01

define USB_CDC_SEND_BREAK

#define USB_CDC_SEND_BREAK 0x23

define USB_CDC_SEND_ENCAPSULATED_CMD

#define USB_CDC_SEND_ENCAPSULATED_CMD 0x00

define USB_CDC_SET_COMM_FEATURE

#define USB_CDC_SET_COMM_FEATURE 0x02

define USB_CDC_SET_CONTROL_LINE_STATE

#define USB_CDC_SET_CONTROL_LINE_STATE 0x22

define USB_CDC_SET_LINE_CODING

#define USB_CDC_SET_LINE_CODING 0x20

define USB_CDC_SPACE_PARITY

#define USB_CDC_SPACE_PARITY 0x04

define USB_CDC_STATE_BREAK

#define USB_CDC_STATE_BREAK 0x0004

define USB_CDC_STATE_FRAMING

#define USB_CDC_STATE_FRAMING 0x0010

define USB_CDC_STATE_OVERRUN

#define USB_CDC_STATE_OVERRUN 0x0040

define USB_CDC_STATE_PARITY

#define USB_CDC_STATE_PARITY 0x0020

define USB_CDC_STATE_RING

#define USB_CDC_STATE_RING 0x0008

define USB_CDC_STATE_RX_CARRIER

State of receiver carrier detection mechanism.

#define USB_CDC_STATE_RX_CARRIER 0x0001

This signal corresponds to V.24 signal 109 and RS-232 DCD.

define USB_CDC_STATE_TX_CARRIER

State of transmission carrier.

#define USB_CDC_STATE_TX_CARRIER 0x0002

This signal corresponds to V.24 signal 106 and RS-232 DSR.

define USB_CDC_SUBCLASS_ACM

#define USB_CDC_SUBCLASS_ACM 0x02

define USB_CLASS_CDC

#define USB_CLASS_CDC 0x02

define USB_CLASS_CDC_DATA

#define USB_CLASS_CDC_DATA 0x0A

define USB_DTYPE_CDC_ACM

#define USB_DTYPE_CDC_ACM 0x02

define USB_DTYPE_CDC_CALL_MANAGEMENT

#define USB_DTYPE_CDC_CALL_MANAGEMENT 0x01

define USB_DTYPE_CDC_COUNTRY

#define USB_DTYPE_CDC_COUNTRY 0x07

define USB_DTYPE_CDC_HEADER

#define USB_DTYPE_CDC_HEADER 0x00

define USB_DTYPE_CDC_UNION

#define USB_DTYPE_CDC_UNION 0x06