Struct esp32_hal::i2s::I2sReadDmaTransfer
source · pub struct I2sReadDmaTransfer<T, P, RX, BUFFER>where
T: RegisterAccess,
P: I2sRxPins,
RX: Rx,{ /* private fields */ }
Expand description
An in-progress DMA read transfer.
Implementations§
source§impl<'d, T, P, RX, BUFFER> I2sReadDmaTransfer<T, P, RX, BUFFER>where
T: RegisterAccess,
P: I2sRxPins,
RX: Rx,
impl<'d, T, P, RX, BUFFER> I2sReadDmaTransfer<T, P, RX, BUFFER>where
T: RegisterAccess,
P: I2sRxPins,
RX: Rx,
pub fn pop(&mut self, data: &mut [u8]) -> Result<usize, Error>
sourcepub fn wait_receive(self, dst: &mut [u8]) -> (BUFFER, I2sRx<T, P, RX>, usize)
pub fn wait_receive(self, dst: &mut [u8]) -> (BUFFER, I2sRx<T, P, RX>, usize)
Wait for the DMA transfer to complete and return the buffers and the I2sTx instance after copying the read data to the given buffer. Length of the received data is returned at the third element of the tuple.