Control Surface
main
MIDI Control Surface library for Arduino
Toggle main menu visibility
Main Page
User Manual
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
u
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Typedefs
a
b
c
k
m
n
p
t
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
i
l
m
p
r
s
t
v
w
Enumerations
Enumerator
a
b
d
f
h
i
l
m
n
o
p
r
s
v
w
Related Symbols
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Functions
a
b
c
d
e
g
i
l
m
o
p
s
u
v
Variables
c
e
f
h
i
l
m
n
o
p
s
u
v
Typedefs
a
b
c
e
f
i
k
m
n
p
s
t
u
v
Enumerations
Enumerator
Macros
a
b
c
d
e
f
h
i
n
u
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
src
MIDI_Interfaces
USBMIDI
USBMIDI_Teensy3.hpp
Go to the documentation of this file.
1
#include "
USBMIDI.hpp
"
2
3
#include <
AH/Teensy/TeensyUSBTypes.hpp
>
4
5
BEGIN_CS_NAMESPACE
6
7
struct
Teensy3_USBDeviceMIDIBackend
{
8
using
MIDIUSBPacket_t
=
AH::Array<uint8_t, 4>
;
9
MIDIUSBPacket_t
read
();
10
void
write
(
MIDIUSBPacket_t
data);
11
void
sendNow
();
12
bool
preferImmediateSend
();
13
};
7
struct
Teensy3_USBDeviceMIDIBackend
{
…
};
14
15
END_CS_NAMESPACE
16
17
#ifdef TEENSY_MIDIUSB_ENABLED
18
19
#include <string.h>
20
#include <usb_midi.h>
21
22
BEGIN_CS_NAMESPACE
23
24
inline
Teensy3_USBDeviceMIDIBackend::MIDIUSBPacket_t
25
Teensy3_USBDeviceMIDIBackend::read
() {
26
return
u32_to_bytes
(usb_midi_read_message());
27
}
25
Teensy3_USBDeviceMIDIBackend::read
() {
…
}
28
29
inline
void
Teensy3_USBDeviceMIDIBackend::write
(
MIDIUSBPacket_t
data) {
30
usb_midi_write_packed(
bytes_to_u32
(data));
31
}
29
inline
void
Teensy3_USBDeviceMIDIBackend::write
(
MIDIUSBPacket_t
data) {
…
}
32
33
inline
void
Teensy3_USBDeviceMIDIBackend::sendNow
() { usb_midi_flush_output(); }
34
35
inline
bool
Teensy3_USBDeviceMIDIBackend::preferImmediateSend
() {
36
return
false
;
37
}
35
inline
bool
Teensy3_USBDeviceMIDIBackend::preferImmediateSend
() {
…
}
38
39
END_CS_NAMESPACE
40
41
#endif
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition
Settings/NamespaceSettings.hpp:14
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition
Settings/NamespaceSettings.hpp:11
TeensyUSBTypes.hpp
USBMIDI.hpp
u32_to_bytes
AH::Array< uint8_t, 4 > u32_to_bytes(uint32_t u)
Definition
USBMIDI.hpp:16
bytes_to_u32
uint32_t bytes_to_u32(uint8_t b0, uint8_t b1, uint8_t b2, uint8_t b3)
Definition
USBMIDI.hpp:25
AH::SPIShiftRegisterOut
A class for serial-in/parallel-out shift registers, like the 74HC595 that are connected to the SPI bu...
Definition
SPIShiftRegisterOut.hpp:28
AH::Array< uint8_t, 4 >
Teensy3_USBDeviceMIDIBackend
Definition
USBMIDI_Teensy3.hpp:7
Teensy3_USBDeviceMIDIBackend::sendNow
void sendNow()
Definition
USBMIDI_Teensy3.hpp:33
Teensy3_USBDeviceMIDIBackend::write
void write(MIDIUSBPacket_t data)
Definition
USBMIDI_Teensy3.hpp:29
Teensy3_USBDeviceMIDIBackend::preferImmediateSend
bool preferImmediateSend()
Definition
USBMIDI_Teensy3.hpp:35
Teensy3_USBDeviceMIDIBackend::read
MIDIUSBPacket_t read()
Definition
USBMIDI_Teensy3.hpp:25
Generated by
1.10.0