Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
USBMIDI_ESP32.hpp
Go to the documentation of this file.
2#include <Settings/NamespaceSettings.hpp>
3
4#include <USB.h>
5#include <USBMIDI.h>
6
8
13 void begin() {
14 backend.begin();
15 USB.begin();
16 }
19 midiEventPacket_t packet {0, 0, 0, 0};
20 backend.readPacket(&packet);
21 return {packet.header, packet.byte1, packet.byte2, packet.byte3};
22 }
25 midiEventPacket_t packet {p[0], p[1], p[2], p[3]};
26 backend.writePacket(&packet);
27 }
29 void sendNow() {}
31 bool preferImmediateSend() { return false; }
33 USBMIDI backend;
34};
35
#define END_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
A class for serial-in/parallel-out shift registers, like the 74HC595 that are connected to the SPI bu...
void sendNow()
Transmit the output buffer immediately (not implemented).
MIDIUSBPacket_t read()
Read a single packet. Return a packet of all zeros if there is no packet.
void write(MIDIUSBPacket_t p)
Write a single packet to the output buffer.
bool preferImmediateSend()
No explicit call to sendNow is required.
USBMIDI backend
The actual low-level USB MIDI backend provided by the core libraries.
void begin()
Called once upon initialization.