Configuration structure for UART MIDI. More...
Configuration structure for UART MIDI.
#include <midi.h>
Public Member Functions | |
Config () | |
Public Attributes | |
UartHandler::Config::Peripheral | periph |
Pin | rx |
Pin | tx |
uint8_t * | rx_buffer |
size_t | rx_buffer_size |
daisy::MidiUartTransport::Config::Config | ( | ) |
UartHandler::Config::Peripheral daisy::MidiUartTransport::Config::periph |
Pin daisy::MidiUartTransport::Config::rx |
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.
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.
Pin daisy::MidiUartTransport::Config::tx |