35#include "common/tusb_common.h"
47 MIDI_CS_INTERFACE_HEADER = 0x01,
48 MIDI_CS_INTERFACE_IN_JACK = 0x02,
49 MIDI_CS_INTERFACE_OUT_JACK = 0x03,
50 MIDI_CS_INTERFACE_ELEMENT = 0x04,
51} midi_cs_interface_subtype_t;
55 MIDI_CS_ENDPOINT_GENERAL = 0x01
56} midi_cs_endpoint_subtype_t;
60 MIDI_JACK_EMBEDDED = 0x01,
61 MIDI_JACK_EXTERNAL = 0x02
67 MIDI_CIN_CABLE_EVENT = 1,
68 MIDI_CIN_SYSCOM_2BYTE = 2,
69 MIDI_CIN_SYSCOM_3BYTE = 3,
70 MIDI_CIN_SYSEX_START = 4,
71 MIDI_CIN_SYSEX_END_1BYTE = 5,
72 MIDI_CIN_SYSEX_END_2BYTE = 6,
73 MIDI_CIN_SYSEX_END_3BYTE = 7,
74 MIDI_CIN_NOTE_OFF = 8,
76 MIDI_CIN_POLY_KEYPRESS = 10,
77 MIDI_CIN_CONTROL_CHANGE = 11,
78 MIDI_CIN_PROGRAM_CHANGE = 12,
79 MIDI_CIN_CHANNEL_PRESSURE = 13,
80 MIDI_CIN_PITCH_BEND_CHANGE = 14,
81 MIDI_CIN_1BYTE_DATA = 15
82} midi_code_index_number_t;
88 MIDI_STATUS_SYSEX_START = 0xF0,
89 MIDI_STATUS_SYSEX_END = 0xF7,
92 MIDI_STATUS_SYSCOM_TIME_CODE_QUARTER_FRAME = 0xF1,
93 MIDI_STATUS_SYSCOM_SONG_POSITION_POINTER = 0xF2,
94 MIDI_STATUS_SYSCOM_SONG_SELECT = 0xF3,
96 MIDI_STATUS_SYSCOM_TUNE_REQUEST = 0xF6,
99 MIDI_STATUS_SYSREAL_TIMING_CLOCK = 0xF8,
101 MIDI_STATUS_SYSREAL_START = 0xFA,
102 MIDI_STATUS_SYSREAL_CONTINUE = 0xFB,
103 MIDI_STATUS_SYSREAL_STOP = 0xFC,
105 MIDI_STATUS_SYSREAL_ACTIVE_SENSING = 0xFE,
106 MIDI_STATUS_SYSREAL_SYSTEM_RESET = 0xFF,
139 uint8_t bNrInputPins;
148#define midi_desc_out_jack_n_t(input_num) \
149 struct TU_ATTR_PACKED { \
151 uint8_t bDescriptorType ; \
152 uint8_t bDescriptorSubType ; \
153 uint8_t bJackType ; \
155 uint8_t bNrInputPins ; \
156 struct TU_ATTR_PACKED { \
157 uint8_t baSourceID; \
158 uint8_t baSourcePin; \
171 uint8_t bNrInputPins;
175 uint8_t bNrOutputPins;
176 uint8_t bInTerminalLink;
177 uint8_t bOutTerminalLink;
180 uint16_t bmElementCaps;
185#define midi_desc_element_n_t(input_num) \
186 struct TU_ATTR_PACKED { \
188 uint8_t bDescriptorType; \
189 uint8_t bDescriptorSubType; \
190 uint8_t bElementID; \
191 uint8_t bNrInputPins; \
192 struct TU_ATTR_PACKED { \
193 uint8_t baSourceID; \
194 uint8_t baSourcePin; \
196 uint8_t bNrOutputPins; \
197 uint8_t bInTerminalLink; \
198 uint8_t bOutTerminalLink; \
199 uint8_t bElCapsSize; \
200 uint16_t bmElementCaps; \
uint8_t bDescriptorSubType
Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_HEADER.
Definition audio.h:658
struct TU_ATTR_PACKED midi_desc_header_t
MIDI Interface Header Descriptor.
struct TU_ATTR_PACKED midi_desc_element_t
MIDI Element Descriptor.
struct TU_ATTR_PACKED midi_desc_out_jack_t
MIDI Out Jack Descriptor with single pin.
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
struct TU_ATTR_PACKED midi_desc_in_jack_t
MIDI In Jack Descriptor.
AUDIO Channel Cluster Descriptor (4.1)
Definition audio.h:647
uint8_t bJackID
Unique ID for MIDI IN Jack.
Definition midi.h:126
uint16_t bcdMSC
MidiStreaming SubClass release number in Binary-Coded Decimal.
Definition midi.h:115
uint8_t bJackType
Embedded or External.
Definition midi.h:125
uint16_t wTotalLength
Total number of bytes returned for the class-specific AudioControl interface descriptor....
Definition audio.h:661
uint8_t iJack
string descriptor
Definition midi.h:127