Transport layer for sending and receiving MIDI data over UART. More...
Transport layer for sending and receiving MIDI data over UART.
This is the mode of communication used for TRS and DIN MIDI There is an additional 2kB of RAM data used within this class for processing bulk data from the UART peripheral
#include <midi.h>
Classes | |
struct | Config |
Configuration structure for UART MIDI. More... | |
Public Types | |
typedef void(* | MidiRxParseCallback) (uint8_t *data, size_t size, void *context) |
Public Member Functions | |
MidiUartTransport () | |
~MidiUartTransport () | |
void | Init (Config config) |
Initialization of UART using config struct. | |
void | StartRx (MidiRxParseCallback parse_callback, void *context) |
Start the UART peripheral in listening mode. This will fill an internal data structure in the background. | |
bool | RxActive () |
returns whether the UART peripheral is actively listening in the background or not | |
void | FlushRx () |
This is a no-op for UART transport - Rx is via DMA callback with circular buffer. | |
void | Tx (uint8_t *buff, size_t size) |
sends the buffer of bytes out of the UART peripheral | |
typedef void(* daisy::MidiUartTransport::MidiRxParseCallback) (uint8_t *data, size_t size, void *context) |
|
inline |
|
inline |
|
inline |
This is a no-op for UART transport - Rx is via DMA callback with circular buffer.
Initialization of UART using config struct.
zero the buffer to ensure emptiness regardless of source memory
|
inline |
returns whether the UART peripheral is actively listening in the background or not
|
inline |
Start the UART peripheral in listening mode. This will fill an internal data structure in the background.
sends the buffer of bytes out of the UART peripheral