Skip to content

daisy::MidiUartTransport::Config

Configuration structure for UART MIDI.

#include <midi.h>

Public Functions

Name
Config()

Public Attributes

Name
UartHandler::Config::Peripheral periph
dsy_gpio_pin rx
dsy_gpio_pin tx
uint8_t * rx_buffer
size_t rx_buffer_size

Public Functions Documentation

function Config

Config()

Public Attributes Documentation

variable periph

UartHandler::Config::Peripheral periph;

variable rx

dsy_gpio_pin rx;

variable tx

dsy_gpio_pin tx;

variable rx_buffer

uint8_t * 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.

variable rx_buffer_size

size_t 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.


Updated on 2024-01-03 at 19:41:01 +0000