Skip to main content

dma_tx_stream_buffer

Macro dma_tx_stream_buffer 

Source
macro_rules! dma_tx_stream_buffer {
    ($tx_size:expr) => { ... };
    ($tx_size:expr, $chunk_size:expr) => { ... };
}
Available on crate feature unstable only.
Expand description

Convenience macro to create a DmaTxStreamBuf from buffer size and optional chunk size (uses max if unspecified). The buffer and descriptors are statically allocated and used to create the DmaTxStreamBuf.

Smaller chunk sizes are recommended for lower latency.

ยงUsage

use esp_hal::dma_tx_stream_buffer;

let buf = dma_tx_stream_buffer!(32000);
let buf = dma_tx_stream_buffer!(32000, 1000);