mikroSDK Reference Manual
Communication Device Class (CDC)

Topics

 Common Definitions
 
 Remote Network Driver Interface Specification (RNDIS)
 

Data Structures

struct  TU_ATTR_PACKED
 AUDIO Channel Cluster Descriptor (4.1) More...
 

Macros

#define midi_desc_out_jack_n_t(input_num)
 MIDI Out Jack Descriptor with multiple pins.
 
#define midi_desc_element_n_t(input_num)
 MIDI Element Descriptor with multiple pins.
 

Typedefs

typedef struct TU_ATTR_PACKED midi_desc_header_t
 MIDI Interface Header Descriptor.
 
typedef struct TU_ATTR_PACKED midi_desc_in_jack_t
 MIDI In Jack Descriptor.
 
typedef struct TU_ATTR_PACKED midi_desc_out_jack_t
 MIDI Out Jack Descriptor with single pin.
 
typedef struct TU_ATTR_PACKED midi_desc_element_t
 MIDI Element Descriptor.
 

Enumerations

enum  midi_cs_interface_subtype_t { MIDI_CS_INTERFACE_HEADER = 0x01 , MIDI_CS_INTERFACE_IN_JACK = 0x02 , MIDI_CS_INTERFACE_OUT_JACK = 0x03 , MIDI_CS_INTERFACE_ELEMENT = 0x04 }
 
enum  midi_cs_endpoint_subtype_t { MIDI_CS_ENDPOINT_GENERAL = 0x01 }
 
enum  midi_jack_type_t { MIDI_JACK_EMBEDDED = 0x01 , MIDI_JACK_EXTERNAL = 0x02 }
 
enum  midi_code_index_number_t {
  MIDI_CIN_MISC = 0 , MIDI_CIN_CABLE_EVENT = 1 , MIDI_CIN_SYSCOM_2BYTE = 2 , MIDI_CIN_SYSCOM_3BYTE = 3 ,
  MIDI_CIN_SYSEX_START = 4 , MIDI_CIN_SYSEX_END_1BYTE = 5 , MIDI_CIN_SYSEX_END_2BYTE = 6 , MIDI_CIN_SYSEX_END_3BYTE = 7 ,
  MIDI_CIN_NOTE_OFF = 8 , MIDI_CIN_NOTE_ON = 9 , MIDI_CIN_POLY_KEYPRESS = 10 , MIDI_CIN_CONTROL_CHANGE = 11 ,
  MIDI_CIN_PROGRAM_CHANGE = 12 , MIDI_CIN_CHANNEL_PRESSURE = 13 , MIDI_CIN_PITCH_BEND_CHANGE = 14 , MIDI_CIN_1BYTE_DATA = 15
}
 
enum  {
  MIDI_STATUS_SYSEX_START = 0xF0 , MIDI_STATUS_SYSEX_END = 0xF7 , MIDI_STATUS_SYSCOM_TIME_CODE_QUARTER_FRAME = 0xF1 , MIDI_STATUS_SYSCOM_SONG_POSITION_POINTER = 0xF2 ,
  MIDI_STATUS_SYSCOM_SONG_SELECT = 0xF3 , MIDI_STATUS_SYSCOM_TUNE_REQUEST = 0xF6 , MIDI_STATUS_SYSREAL_TIMING_CLOCK = 0xF8 , MIDI_STATUS_SYSREAL_START = 0xFA ,
  MIDI_STATUS_SYSREAL_CONTINUE = 0xFB , MIDI_STATUS_SYSREAL_STOP = 0xFC , MIDI_STATUS_SYSREAL_ACTIVE_SENSING = 0xFE , MIDI_STATUS_SYSREAL_SYSTEM_RESET = 0xFF
}
 

Variables

uint8_t TU_ATTR_PACKED::bLength
 Size of this descriptor in bytes: 9.
 
uint8_t TU_ATTR_PACKED::bDescriptorType
 Descriptor Type. Value: TUSB_DESC_CS_INTERFACE.
 
uint8_t TU_ATTR_PACKED::bDescriptorSubType
 Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_HEADER.
 
uint16_t TU_ATTR_PACKED::bcdCDC
 CDC release number in Binary-Coded Decimal.
 
uint8_t TU_ATTR_PACKED::bControlInterface
 Interface number of Communication Interface.
 
uint8_t TU_ATTR_PACKED::bSubordinateInterface
 Array of Interface number of Data Interface.
 
uint8_t TU_ATTR_PACKED::iCountryCodeRelDate
 Index of a string giving the release date for the implemented ISO 3166 Country Codes.
 
uint16_t TU_ATTR_PACKED::wCountryCode
 Country code in the format as defined in [ISO3166], release date as specified inoffset 3 for the first supported country.
 
uint8_t   TU_ATTR_PACKED::handle_call: 1 
 0 - Device sends/receives call management information only over the Communications Class interface. 1 - Device can send/receive call management information over a Data Class interface.
 
uint8_t   TU_ATTR_PACKED::send_recv_call: 1 
 0 - Device does not handle call management itself. 1 - Device handles call management itself.
 
uint8_t   TU_ATTR_PACKED::TU_RESERVED: 6 
 
struct { 
 
TU_ATTR_PACKED::bmCapabilities 
 
uint8_t TU_ATTR_PACKED::bDataInterface
 
uint8_t TU_ATTR_PACKED::support_comm_request: 1
 Device supports the request combination of Set_Comm_Feature, Clear_Comm_Feature, and Get_Comm_Feature.
 
uint8_t TU_ATTR_PACKED::support_line_request: 1
 Device supports the request combination of Set_Line_Coding, Set_Control_Line_State, Get_Line_Coding, and the notification Serial_State.
 
uint8_t TU_ATTR_PACKED::support_send_break: 1
 Device supports the request Send_Break.
 
uint8_t TU_ATTR_PACKED::support_notification_network_connection: 1
 Device supports the notification Network_Connection.
 
cdc_acm_capability_t TU_ATTR_PACKED::bmCapabilities
 
uint8_t   TU_ATTR_PACKED::require_pulse_setup: 1 
 Device requires extra Pulse_Setup request during pulse dialing sequence to disengage holding circuit.
 
uint8_t   TU_ATTR_PACKED::support_aux_request: 1 
 Device supports the request combination of Set_Aux_Line_State, Ring_Aux_Jack, and notification Aux_Jack_Hook_State.
 
uint8_t   TU_ATTR_PACKED::support_pulse_request: 1 
 Device supports the request combination of Pulse_Setup, Send_Pulse, and Set_Pulse_Time.
 
uint8_t   TU_ATTR_PACKED::TU_RESERVED: 5 
 
struct { 
 
TU_ATTR_PACKED::bmCapabilities 
 
uint8_t TU_ATTR_PACKED::bRingerVolSteps
 
uint8_t TU_ATTR_PACKED::bNumRingerPatterns
 
uint8_t   TU_ATTR_PACKED::simple_mode: 1 
 
uint8_t   TU_ATTR_PACKED::standalone_mode: 1 
 
uint8_t   TU_ATTR_PACKED::computer_centric_mode: 1 
 
uint8_t   TU_ATTR_PACKED::TU_RESERVED: 5 
 
struct { 
 
TU_ATTR_PACKED::bmCapabilities 
 
uint32_t   TU_ATTR_PACKED::interrupted_dialtone: 1 
 0 : Reports only dialtone (does not differentiate between normal and interrupted dialtone). 1 : Reports interrupted dialtone in addition to normal dialtone
 
uint32_t   TU_ATTR_PACKED::ringback_busy_fastbusy: 1 
 0 : Reports only dialing state. 1 : Reports ringback, busy, and fast busy states.
 
uint32_t   TU_ATTR_PACKED::caller_id: 1 
 0 : Does not report caller ID. 1 : Reports caller ID information.
 
uint32_t   TU_ATTR_PACKED::incoming_distinctive: 1 
 0 : Reports only incoming ringing. 1 : Reports incoming distinctive ringing patterns.
 
uint32_t   TU_ATTR_PACKED::dual_tone_multi_freq: 1 
 0 : Cannot report dual tone multi-frequency (DTMF) digits input remotely over the telephone line. 1 : Can report DTMF digits input remotely over the telephone line.
 
uint32_t   TU_ATTR_PACKED::line_state_change: 1 
 0 : Does not support line state change notification. 1 : Does support line state change notification
 
uint32_t   TU_ATTR_PACKED::TU_RESERVED0: 2 
 
uint32_t   TU_ATTR_PACKED::TU_RESERVED1: 16 
 
uint32_t   TU_ATTR_PACKED::TU_RESERVED2: 8 
 
struct { 
 
TU_ATTR_PACKED::bmCapabilities 
 
uint32_t TU_ATTR_PACKED::bit_rate
 
uint8_t TU_ATTR_PACKED::stop_bits
 0: 1 stop bit - 1: 1.5 stop bits - 2: 2 stop bits
 
uint8_t TU_ATTR_PACKED::parity
 0: None - 1: Odd - 2: Even - 3: Mark - 4: Space
 
uint8_t TU_ATTR_PACKED::data_bits
 can be 5, 6, 7, 8 or 16
 
uint16_t TU_ATTR_PACKED::dtr: 1
 
uint16_t TU_ATTR_PACKED::rts: 1
 
uint16_t : 6
 
uint16_t : 8
 

Macro Definition Documentation

◆ midi_desc_element_n_t

#define midi_desc_element_n_t ( input_num)
Value:
struct TU_ATTR_PACKED { \
uint8_t bLength; \
uint8_t bDescriptorType; \
uint8_t bDescriptorSubType; \
uint8_t bElementID; \
uint8_t bNrInputPins; \
struct TU_ATTR_PACKED { \
uint8_t baSourceID; \
uint8_t baSourcePin; \
} pins[input_num]; \
uint8_t bNrOutputPins; \
uint8_t bInTerminalLink; \
uint8_t bOutTerminalLink; \
uint8_t bElCapsSize; \
uint16_t bmElementCaps; \
uint8_t iElement; \
}
uint8_t bDescriptorSubType
Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_HEADER.
Definition audio.h:658
uint8_t bDescriptorType
Descriptor Type. Value: TUSB_DESC_CS_INTERFACE.
Definition audio.h:657
uint8_t bLength
Size of this descriptor in bytes: 9.
Definition audio.h:656
AUDIO Channel Cluster Descriptor (4.1)
Definition audio.h:647

◆ midi_desc_out_jack_n_t

#define midi_desc_out_jack_n_t ( input_num)
Value:
struct TU_ATTR_PACKED { \
uint8_t bLength ; \
uint8_t bDescriptorType ; \
uint8_t bDescriptorSubType ; \
uint8_t bJackType ; \
uint8_t bJackID ; \
uint8_t bNrInputPins ; \
struct TU_ATTR_PACKED { \
uint8_t baSourceID; \
uint8_t baSourcePin; \
} pins[input_num]; \
uint8_t iJack ; \
}
uint8_t bJackID
Unique ID for MIDI IN Jack.
Definition midi.h:126
uint8_t bJackType
Embedded or External.
Definition midi.h:125
uint8_t iJack
string descriptor
Definition midi.h:127

Variable Documentation

◆ bDescriptorSubType

uint8_t TU_ATTR_PACKED::bDescriptorSubType

Descriptor SubType.

Descriptor SubType one of above CDC_FUCN_DESC_.

Descriptor SubType one of above CDC_FUNC_DESC_.

Descriptor SubType. Value: AUDIO_CS_EP_SUBTYPE_GENERAL.

Descriptor SubType. Value: AUDIO_CS_AS_INTERFACE_FORMAT_TYPE.

Descriptor SubType. Value: AUDIO_CS_AS_INTERFACE_AS_GENERAL.

Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_FEATURE_UNIT.

Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_OUTPUT_TERMINAL.

Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_INPUT_TERMINAL.

Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_CLOCK_MULTIPLIER.

Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_CLOCK_SELECTOR.

Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_CLOCK_SOURCE.

◆ bDescriptorType

uint8_t TU_ATTR_PACKED::bDescriptorType

Descriptor Type.

Device Qualifier Type.

Other_speed_Configuration Type.

INTERFACE Descriptor Type.

CONFIGURATION Descriptor Type.

DEVICE Descriptor Type.

Descriptor Type, must be Class-Specific.

Descriptor Type. Value: TUSB_DESC_CS_ENDPOINT.

Constant name specifying type of HID descriptor.

◆ bLength

uint8_t TU_ATTR_PACKED::bLength

Size of descriptor.

Size of this descriptor in bytes.

Size of this descriptor, in bytes: 8.

Size of this descriptor, in bytes: 6.

Size of this descriptor, in bytes: 16.

Size of this descriptor, in bytes: 14.

Size of this descriptor, in bytes: 12.

Size of this descriptor, in bytes: 17.

Size of this descriptor, in bytes: 7.

Size of this descriptor, in bytes: 7+p.

Size of this descriptor in bytes: 8.

Numeric expression that is the total size of the HID descriptor