| LUFA Library 140302 |

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations
Common Class Definitions
CDC-ACM (Virtual Serial) Class Driver

## Data Structures
struct | CDC_LineEncoding_t
| CDC Virtual Serial Port Line Encoding Settings Structure. More...
struct | USB_CDC_Descriptor_FunctionalACM_t
| CDC class-specific Functional ACM Descriptor (LUFA naming conventions). More...
struct | USB_CDC_Descriptor_FunctionalHeader_t
| CDC class-specific Functional Header Descriptor (LUFA naming conventions). More...
struct | USB_CDC_Descriptor_FunctionalUnion_t
| CDC class-specific Functional Union Descriptor (LUFA naming conventions). More...
struct | USB_CDC_StdDescriptor_FunctionalACM_t
| CDC class-specific Functional ACM Descriptor (USB-IF naming conventions). More...
struct | USB_CDC_StdDescriptor_FunctionalHeader_t
| CDC class-specific Functional Header Descriptor (USB-IF naming conventions). More...
struct | USB_CDC_StdDescriptor_FunctionalUnion_t
| CDC class-specific Functional Union Descriptor (USB-IF naming conventions). More...

## Macros
#define | CDC_FUNCTIONAL_DESCRIPTOR(DataSize)

## Enumerations
enum | CDC_ClassNotifications_t { CDC_NOTIF_SerialState = 0x20 }
enum | CDC_ClassRequests_t { CDC_REQ_SendEncapsulatedCommand = 0x00, CDC_REQ_GetEncapsulatedResponse = 0x01, CDC_REQ_SetLineEncoding = 0x20, CDC_REQ_GetLineEncoding = 0x21, CDC_REQ_SetControlLineState = 0x22, CDC_REQ_SendBreak = 0x23 }
enum | CDC_Descriptor_ClassSubclassProtocol_t { CDC_CSCP_CDCClass = 0x02, CDC_CSCP_NoSpecificSubclass = 0x00, CDC_CSCP_ACMSubclass = 0x02, CDC_CSCP_ATCommandProtocol = 0x01, CDC_CSCP_NoSpecificProtocol = 0x00, CDC_CSCP_VendorSpecificProtocol = 0xFF, CDC_CSCP_CDCDataClass = 0x0A, CDC_CSCP_NoDataSubclass = 0x00, CDC_CSCP_NoDataProtocol = 0x00 }
enum | CDC_DescriptorSubtypes_t { CDC_DSUBTYPE_CSInterface_Header = 0x00, CDC_DSUBTYPE_CSInterface_CallManagement = 0x01, CDC_DSUBTYPE_CSInterface_ACM = 0x02, CDC_DSUBTYPE_CSInterface_DirectLine = 0x03, CDC_DSUBTYPE_CSInterface_TelephoneRinger = 0x04, CDC_DSUBTYPE_CSInterface_TelephoneCall = 0x05, CDC_DSUBTYPE_CSInterface_Union = 0x06, CDC_DSUBTYPE_CSInterface_CountrySelection = 0x07, CDC_DSUBTYPE_CSInterface_TelephoneOpModes = 0x08, CDC_DSUBTYPE_CSInterface_USBTerminal = 0x09, CDC_DSUBTYPE_CSInterface_NetworkChannel = 0x0A, CDC_DSUBTYPE_CSInterface_ProtocolUnit = 0x0B, CDC_DSUBTYPE_CSInterface_ExtensionUnit = 0x0C, CDC_DSUBTYPE_CSInterface_MultiChannel = 0x0D, CDC_DSUBTYPE_CSInterface_CAPI = 0x0E, CDC_DSUBTYPE_CSInterface_Ethernet = 0x0F, CDC_DSUBTYPE_CSInterface_ATM = 0x10 }
enum | CDC_LineEncodingFormats_t { CDC_LINEENCODING_OneStopBit = 0, CDC_LINEENCODING_OneAndAHalfStopBits = 1, CDC_LINEENCODING_TwoStopBits = 2 }
enum | CDC_LineEncodingParity_t { CDC_PARITY_None = 0, CDC_PARITY_Odd = 1, CDC_PARITY_Even = 2, CDC_PARITY_Mark = 3, CDC_PARITY_Space = 4 }

## Virtual Control Line Masks
#define | CDC_CONTROL_LINE_OUT_DTR (1 << 0)
#define | CDC_CONTROL_LINE_OUT_RTS (1 << 1)
#define | CDC_CONTROL_LINE_IN_DCD (1 << 0)
#define | CDC_CONTROL_LINE_IN_DSR (1 << 1)
#define | CDC_CONTROL_LINE_IN_BREAK (1 << 2)
#define | CDC_CONTROL_LINE_IN_RING (1 << 3)
#define | CDC_CONTROL_LINE_IN_FRAMEERROR (1 << 4)
#define | CDC_CONTROL_LINE_IN_PARITYERROR (1 << 5)
#define | CDC_CONTROL_LINE_IN_OVERRUNERROR (1 << 6)

## Detailed Description

# Module Description

Constants, Types and Enum definitions that are common to both Device and Host modes for the USB CDC Class.

## Macro Definition Documentation

#define CDC_CONTROL_LINE_IN_BREAK (1 << 2)

Mask for the BREAK handshake line for use with the CDC_NOTIF_SerialState class-specific notification from the device to the host, to indicate that the BREAK line state is currently high.

#define CDC_CONTROL_LINE_IN_DCD (1 << 0)

Mask for the DCD handshake line for use with the CDC_NOTIF_SerialState class-specific notification from the device to the host, to indicate that the DCD line state is currently high.

#define CDC_CONTROL_LINE_IN_DSR (1 << 1)

Mask for the DSR handshake line for use with the CDC_NOTIF_SerialState class-specific notification from the device to the host, to indicate that the DSR line state is currently high.

#define CDC_CONTROL_LINE_IN_FRAMEERROR (1 << 4)

Mask for use with the CDC_NOTIF_SerialState class-specific notification from the device to the host, to indicate that a framing error has occurred on the virtual serial port.

#define CDC_CONTROL_LINE_IN_OVERRUNERROR (1 << 6)

Mask for use with the CDC_NOTIF_SerialState class-specific notification from the device to the host, to indicate that a data overrun error has occurred on the virtual serial port.

#define CDC_CONTROL_LINE_IN_PARITYERROR (1 << 5)

Mask for use with the CDC_NOTIF_SerialState class-specific notification from the device to the host, to indicate that a parity error has occurred on the virtual serial port.

#define CDC_CONTROL_LINE_IN_RING (1 << 3)

Mask for the RING handshake line for use with the CDC_NOTIF_SerialState class-specific notification from the device to the host, to indicate that the RING line state is currently high.

#define CDC_CONTROL_LINE_OUT_DTR (1 << 0)

Mask for the DTR handshake line for use with the CDC_REQ_SetControlLineState class-specific request from the host, to indicate that the DTR line state should be high.

#define CDC_CONTROL_LINE_OUT_RTS (1 << 1)

Mask for the RTS handshake line for use with the CDC_REQ_SetControlLineState class-specific request from the host, to indicate that the RTS line state should be high.

#define CDC_FUNCTIONAL_DESCRIPTOR | ( |  | DataSize | ) |

Macro to define a CDC class-specific functional descriptor. CDC functional descriptors have a uniform structure but variable sized data payloads, thus cannot be represented accurately by a single `typedef` `struct`. A macro is used instead so that functional descriptors can be created easily by specifying the size of the payload. This allows `sizeof()` to work correctly.

Parameters

  [in] | DataSize | Size in bytes of the CDC functional descriptor's data payload.

## Enumeration Type Documentation

enum CDC_ClassNotifications_t

Enum for the CDC class specific notification requests that can be issued by a CDC device to a host.

Enumerator
CDC_NOTIF_SerialState | Notification type constant for a change in the virtual serial port handshake line states, for use with a USB_Request_Header_t notification structure when sent to the host via the CDC notification endpoint.

enum CDC_ClassRequests_t

Enum for the CDC class specific control requests that can be issued by the USB bus host.

Enumerator
CDC_REQ_SendEncapsulatedCommand | CDC class-specific request to send an encapsulated command to the device.
CDC_REQ_GetEncapsulatedResponse | CDC class-specific request to retrieve an encapsulated command response from the device.
CDC_REQ_SetLineEncoding | CDC class-specific request to set the current virtual serial port configuration settings.
CDC_REQ_GetLineEncoding | CDC class-specific request to get the current virtual serial port configuration settings.
CDC_REQ_SetControlLineState | CDC class-specific request to set the current virtual serial port handshake line states.
CDC_REQ_SendBreak | CDC class-specific request to send a break to the receiver via the carrier channel.

enum CDC_Descriptor_ClassSubclassProtocol_t

Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the CDC device class.

Enumerator
CDC_CSCP_CDCClass | Descriptor Class value indicating that the device or interface belongs to the CDC class.
CDC_CSCP_NoSpecificSubclass | Descriptor Subclass value indicating that the device or interface belongs to no specific subclass of the CDC class.
CDC_CSCP_ACMSubclass | Descriptor Subclass value indicating that the device or interface belongs to the Abstract Control Model CDC subclass.
CDC_CSCP_ATCommandProtocol | Descriptor Protocol value indicating that the device or interface belongs to the AT Command protocol of the CDC class.
CDC_CSCP_NoSpecificProtocol | Descriptor Protocol value indicating that the device or interface belongs to no specific protocol of the CDC class.
CDC_CSCP_VendorSpecificProtocol | Descriptor Protocol value indicating that the device or interface belongs to a vendor-specific protocol of the CDC class.
CDC_CSCP_CDCDataClass | Descriptor Class value indicating that the device or interface belongs to the CDC Data class.
CDC_CSCP_NoDataSubclass | Descriptor Subclass value indicating that the device or interface belongs to no specific subclass of the CDC data class.
CDC_CSCP_NoDataProtocol | Descriptor Protocol value indicating that the device or interface belongs to no specific protocol of the CDC data class.

enum CDC_DescriptorSubtypes_t

Enum for the CDC class specific interface descriptor subtypes.

Enumerator
CDC_DSUBTYPE_CSInterface_Header | CDC class-specific Header functional descriptor.
CDC_DSUBTYPE_CSInterface_CallManagement | CDC class-specific Call Management functional descriptor.
CDC_DSUBTYPE_CSInterface_ACM | CDC class-specific Abstract Control Model functional descriptor.
CDC_DSUBTYPE_CSInterface_DirectLine | CDC class-specific Direct Line functional descriptor.
CDC_DSUBTYPE_CSInterface_TelephoneRinger | CDC class-specific Telephone Ringer functional descriptor.
CDC_DSUBTYPE_CSInterface_TelephoneCall | CDC class-specific Telephone Call functional descriptor.
CDC_DSUBTYPE_CSInterface_Union | CDC class-specific Union functional descriptor.
CDC_DSUBTYPE_CSInterface_CountrySelection | CDC class-specific Country Selection functional descriptor.
CDC_DSUBTYPE_CSInterface_TelephoneOpModes | CDC class-specific Telephone Operation Modes functional descriptor.
CDC_DSUBTYPE_CSInterface_USBTerminal | CDC class-specific USB Terminal functional descriptor.
CDC_DSUBTYPE_CSInterface_NetworkChannel | CDC class-specific Network Channel functional descriptor.
CDC_DSUBTYPE_CSInterface_ProtocolUnit | CDC class-specific Protocol Unit functional descriptor.
CDC_DSUBTYPE_CSInterface_ExtensionUnit | CDC class-specific Extension Unit functional descriptor.
CDC_DSUBTYPE_CSInterface_MultiChannel | CDC class-specific Multi-Channel Management functional descriptor.
CDC_DSUBTYPE_CSInterface_CAPI | CDC class-specific Common ISDN API functional descriptor.
CDC_DSUBTYPE_CSInterface_Ethernet | CDC class-specific Ethernet functional descriptor.
CDC_DSUBTYPE_CSInterface_ATM | CDC class-specific Asynchronous Transfer Mode functional descriptor.

enum CDC_LineEncodingFormats_t

Enum for the possible line encoding formats of a virtual serial port.

Enumerator
CDC_LINEENCODING_OneStopBit | Each frame contains one stop bit.
CDC_LINEENCODING_OneAndAHalfStopBits | Each frame contains one and a half stop bits.
CDC_LINEENCODING_TwoStopBits | Each frame contains two stop bits.

enum CDC_LineEncodingParity_t

Enum for the possible line encoding parity settings of a virtual serial port.

Enumerator
CDC_PARITY_None | No parity bit mode on each frame.
CDC_PARITY_Odd | Odd parity bit mode on each frame.
CDC_PARITY_Even | Even parity bit mode on each frame.
CDC_PARITY_Mark | Mark parity bit mode on each frame.
CDC_PARITY_Space | Space parity bit mode on each frame.