pub fn new(
        rx_descriptors: &'static mut [DmaDescriptor],
        tx_descriptors: &'static mut [DmaDescriptor],
        buffer: &'static mut [u8],
    ) -> Result<Self, DmaBufError> {
        let mut buf = Self {
            rx_descriptors: DescriptorSet::new(rx_descriptors)?,
            tx_descriptors: DescriptorSet::new(tx_descriptors)?,
            buffer,
            burst: BurstConfig::default(),
        };

        let capacity = buf.capacity();
        buf.configure(buf.burst, capacity)?;

        Ok(buf)
    }
Creates a new [DmaRxTxBuf] from some descriptors and a buffer.

There must be enough descriptors for the provided buffer.
Each descriptor can handle 4092 bytes worth of buffer.

Both the descriptors and buffer must be in DMA-capable memory.
Only DRAM is supported.
esp-hal/src/dma/buffers.rs