13#if defined(SBL_HAS_USB) && defined(SBL_HAS_USB_MIDI)
28template<
typename UartDriver>
30 while (UartDriver::available()) {
31 parser.
push(UartDriver::read_byte());
35#if defined(SBL_HAS_USB) && defined(SBL_HAS_USB_MIDI)
45inline void poll_usb(Parser& parser) {
49 parser.push(buf,
static_cast<uint16_t
>(n));
MIDI byte stream parser — state machine with running status.
void push(uint8_t byte)
Feed one byte from UART RX.
static uint32_t read(uint8_t *buf, uint32_t max_len)
Read decoded MIDI bytes from USB (RX)
void poll(Parser &parser)
Poll UART for MIDI bytes and feed them to the parser.
USB MIDI device interface.