Skip to content

Class daisy::MidiUartTransport

ClassList > daisy > MidiUartTransport

Transport layer for sending and receiving MIDI data over UART. More...

  • #include <midi.h>

Classes

Type Name
struct Config
Configuration structure for UART MIDI.

Public Types

Type Name
typedef void(* MidiRxParseCallback

Public Functions

Type Name
void FlushRx ()
This is a no-op for UART transport - Rx is via DMA callback with circular buffer.
void Init (Config config)
Initialization of UART using config struct.
MidiUartTransport ()
bool RxActive ()
returns whether the UART peripheral is actively listening in the background or not
void StartRx (MidiRxParseCallback parse_callback, void * context)
Start the UART peripheral in listening mode. This will fill an internal data structure in the background.
void Tx (uint8_t * buff, size_t size)
sends the buffer of bytes out of the UART peripheral
~MidiUartTransport ()

Detailed Description

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

Public Types Documentation

typedef MidiRxParseCallback

typedef void(* daisy::MidiUartTransport::MidiRxParseCallback) (uint8_t *data, size_t size, void *context);

Public Functions Documentation

function FlushRx

This is a no-op for UART transport - Rx is via DMA callback with circular buffer.

inline void daisy::MidiUartTransport::FlushRx () 


function Init

Initialization of UART using config struct.

inline void daisy::MidiUartTransport::Init (
    Config config
) 


function MidiUartTransport

inline daisy::MidiUartTransport::MidiUartTransport () 

function RxActive

returns whether the UART peripheral is actively listening in the background or not

inline bool daisy::MidiUartTransport::RxActive () 


function StartRx

Start the UART peripheral in listening mode. This will fill an internal data structure in the background.

inline void daisy::MidiUartTransport::StartRx (
    MidiRxParseCallback parse_callback,
    void * context
) 


function Tx

sends the buffer of bytes out of the UART peripheral

inline void daisy::MidiUartTransport::Tx (
    uint8_t * buff,
    size_t size
) 


function ~MidiUartTransport

inline daisy::MidiUartTransport::~MidiUartTransport () 


The documentation for this class was generated from the following file external-docs/libDaisy/src/hid/midi.h