|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
USB MIDI device interface. More...
Go to the source code of this file.
Classes | |
| class | sbl::usb::MidiPort |
| USB MIDI device port (static class) More... | |
Namespaces | |
| namespace | sbl |
| Root namespace for all Sound Byte Libs functionality. | |
| namespace | sbl::usb |
| USB device support. | |
USB MIDI device interface.
Provides bidirectional USB MIDI 1.0 via TinyUSB's MIDI device class. Operates on cable 0 (single virtual cable).
RX path: tud_midi_stream_read() → raw MIDI bytes → feed to sbl::midi::Parser TX path: MidiEvent → raw MIDI bytes → tud_midi_stream_write()
Requires CFG_TUD_MIDI=1 in tusb_config.h and the composite CDC+MIDI descriptor in usb_descriptors.c.
Usage: // RX: poll in main loop (or use sbl::midi::poll_usb()) uint8_t buf[64]; uint32_t n = sbl::usb::MidiPort::read(buf, sizeof(buf)); parser.push(buf, n);
// TX: send events sbl::usb::MidiPort::send(event);
Definition in file midi.hpp.