4#include <Settings/NamespaceSettings.hpp>
18#ifdef TEENSY_MIDIUSB_ENABLED
20#include <usb_private.h>
26 uint8_t c, intr_state;
30 if (!usb_configuration) {
34 UENUM = MIDI_RX_ENDPOINT;
37 if (!(c & (1 << RWAL))) {
38 if (c & (1 << RXOUTI)) {
46 packet.
data[0] = UEDATX;
47 packet.data[1] = UEDATX;
48 packet.data[2] = UEDATX;
49 packet.data[3] = UEDATX;
50 if (!(UEINTX & (1 << RWAL)))
58 uint8_t intr_state, timeout;
60 if (!usb_configuration)
64 UENUM = MIDI_TX_ENDPOINT;
65 timeout = UDFNUML + 2;
68 if (UEINTX & (1 << RWAL))
71 if (UDFNUML == timeout)
73 if (!usb_configuration)
77 UENUM = MIDI_TX_ENDPOINT;
79 UEDATX = data.data[0];
80 UEDATX = data.data[1];
81 UEDATX = data.data[2];
82 UEDATX = data.data[3];
83 if (!(UEINTX & (1 << RWAL)))
#define BEGIN_CS_NAMESPACE
void write(MIDIUSBPacket_t data)
bool preferImmediateSend()
void write(MIDIUSBPacket_t packet)
AH::Array< uint8_t, 4 > MIDIUSBPacket_t