Control Surface master
MIDI Control Surface library for Arduino
USBMIDI_Arduino_mbed.hpp
Go to the documentation of this file.
2#include <Settings/NamespaceSettings.hpp>
3
5
6#include <cstring> // memcpy
7
9
13 void write(uint8_t cn_cin, uint8_t midi_0, uint8_t midi_1, uint8_t midi_2) {
14 backend.write(bytes_to_u32(cn_cin, midi_0, midi_1, midi_2));
15 }
16 void sendNow() { backend.send_now(); }
17 bool preferImmediateSend() { return false; }
18
20};
21
#define END_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
AH::Array< uint8_t, 4 > u32_to_bytes(uint32_t u)
Definition: USBMIDI.hpp:9
uint32_t bytes_to_u32(uint8_t b0, uint8_t b1, uint8_t b2, uint8_t b3)
Definition: USBMIDI.hpp:18
uint32_t read()
Try reading a 4-byte MIDI USB message.
void send_now()
Try sending the buffered data now.
void write(uint32_t msg)
Send a MIDI USB message.
void write(uint8_t cn_cin, uint8_t midi_0, uint8_t midi_1, uint8_t midi_2)