Skip to main content

dma_rx_buffer

Macro dma_rx_buffer 

Source
macro_rules! dma_rx_buffer {
    ($rx_size:expr, burst = $burst:ident) => { ... };
    ($rx_size:expr) => { ... };
}
Available on crate feature unstable only.
Expand description

Convenience macro to create a DmaRxBuf from buffer size. The buffer and descriptors are statically allocated and used to create the DmaRxBuf.

With burst = SizeN, the macro creates the buffer with DmaRxBuf::new_with_min_burst. See BurstSize.

ยงExamples

use esp_hal::dma_rx_buffer;

let rx_buf = dma_rx_buffer!(32000)?;

// A buffer with a minimum burst of 64 bytes.
let rx_buf = dma_rx_buffer!(32000, burst = Size64)?;