libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
daisy::MidiUartTransport::Config Struct Reference

Configuration structure for UART MIDI. More...

Detailed Description

Configuration structure for UART MIDI.

#include <midi.h>

Public Member Functions

 Config ()
 

Public Attributes

UartHandler::Config::Peripheral periph
 
Pin rx
 
Pin tx
 
uint8_trx_buffer
 
size_t rx_buffer_size
 

Constructor & Destructor Documentation

◆ Config()

daisy::MidiUartTransport::Config::Config ( )

Member Data Documentation

◆ periph

UartHandler::Config::Peripheral daisy::MidiUartTransport::Config::periph

◆ rx

Pin daisy::MidiUartTransport::Config::rx

◆ rx_buffer

uint8_t* daisy::MidiUartTransport::Config::rx_buffer

Pointer to buffer for DMA UART rx byte transfer in background.

By default this uses a shared buffer in DMA_BUFFER_MEM_SECTION, which can only be utilized for a single UART peripheral. To use MIDI with multiple UART peripherals, you must provide your own buffer, allocated to a DMA-capable memory section.

◆ rx_buffer_size

size_t daisy::MidiUartTransport::Config::rx_buffer_size

Size in bytes of rx_buffer.

This size determines the maximum Rx bytes readable by the UART in the background. By default it's set to the size of the default shared rx_buffer (256 bytes). While much smaller sizes can be used, data can get missed if the buffer is too small.

◆ tx

Pin daisy::MidiUartTransport::Config::tx

The documentation for this struct was generated from the following file: