Control Surface stm32
MIDI Control Surface library for Arduino
USBMIDI_Teensy3.hpp
Go to the documentation of this file.
1#include "USBMIDI.hpp"
2
4
6
11 void sendNow();
13};
14
16
17#ifdef TEENSY_MIDIUSB_ENABLED
18
19#include <string.h>
20#include <usb_midi.h>
21
23
25 return u32_to_bytes(usb_midi_read_message());
26}
27
28inline void USBDeviceMIDIBackend::write(MIDIUSBPacket_t data) {
29 usb_midi_write_packed(bytes_to_u32(data));
30}
31
32inline void USBDeviceMIDIBackend::sendNow() { usb_midi_flush_output(); }
33
34inline bool USBDeviceMIDIBackend::preferImmediateSend() { return false; }
35
37
38#endif
#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
MIDIUSBPacket_t read()
void write(MIDIUSBPacket_t data)
void write(MIDIUSBPacket_t packet)