Skip to content

File usb_cdc.h

FileList > fw > rbcx-coprocessor > lib > libusb_stm32 > include > usb_cdc.h

Go to the source code of this file.

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 Attributes

Type Name
uint8_t Data
Data payload.
uint8_t bCharFormat
Stop bits.
uint8_t bDataBits
Data bits (5,6,7,8 or 16).
uint8_t bDataInterface
Interface number of Data Class interface optionally used for call management.
uint8_t bDescriptorSubType
Header functional descriptor subtype.
uint8_t bDescriptorType
CS_INTERFACE descriptor type.
uint8_t bFunctionLength
Size of this descriptor in bytes.
uint8_t bMasterInterface0
The interface number of the CDC interface designated as the master or controlling interface for the union.
uint8_t bNotificationType
Notification type.
uint8_t bParityType
Parity.
uint8_t bSlaveInterface0
Interface number of first slave or associated interface in the union.
uint16_t bcdCDC
USB CDC Specification release number in BCD.
uint8_t bmCapabilities
The call management capabilities that this configuration supports.
uint8_t bmRequestType
This bitmapped field identifies the characteristics of the specific request.
uint32_t dwDTERate
Data terminal rate, in bits per second.
uint8_t iCountryCodeRelDate
Index of a string giving the release date for the implemented ISO 3166 Country Codes.
uint8_t wCountyCode0
Country code in hexadecimal format.
uint16_t wIndex
Interface.
uint16_t wLength
Data payload length in bytes.
uint16_t wValue
Notification value.

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.

Public Attributes Documentation

variable Data

uint8_t Data[];

variable bCharFormat

uint8_t bCharFormat;

variable bDataBits

uint8_t bDataBits;

variable bDataInterface

uint8_t bDataInterface;

variable bDescriptorSubType

Header functional descriptor subtype.

uint8_t bDescriptorSubType;

Abstract Control Management functional descriptor subtype.

Call Management functional descriptor subtype.

Country Selection Functional Descriptor.

Union Functional Descriptor.

variable bDescriptorType

CS_INTERFACE descriptor type.

uint8_t bDescriptorType;

Debug descriptor type.

String descriptor type.

Endpoint descriptor.

IAD descriptor.

Interface descriptor.

Configuration descriptor.

Qualifier descriptor.

USB_DTYPE_DEVICE Device descriptor.

variable bFunctionLength

Size of this descriptor in bytes.

uint8_t bFunctionLength;

Size of this functional descriptor, in bytes.

variable bMasterInterface0

uint8_t bMasterInterface0;

variable bNotificationType

uint8_t bNotificationType;

variable bParityType

uint8_t bParityType;

variable bSlaveInterface0

uint8_t bSlaveInterface0;

variable bcdCDC

uint16_t bcdCDC;

variable bmCapabilities

The call management capabilities that this configuration supports.

uint8_t bmCapabilities;

The capabilities that this configuration supports.

variable bmRequestType

uint8_t bmRequestType;

variable dwDTERate

uint32_t dwDTERate;

variable iCountryCodeRelDate

uint8_t iCountryCodeRelDate;

variable wCountyCode0

Country code in hexadecimal format.

uint8_t wCountyCode0;

As defined in ISO 3166, release date as specified in iCountryCodeRelDate for the first supported country.

variable wIndex

uint16_t wIndex;

variable wLength

uint16_t wLength;

variable wValue

uint16_t wValue;

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

The documentation for this class was generated from the following file fw/rbcx-coprocessor/lib/libusb_stm32/include/usb_cdc.h