Struct I2sRx

Source
pub struct I2sRx<'d, Dm>
where Dm: DriverMode,
{ /* private fields */ }
Available on crate feature unstable only.
Expand description

I2S RX channel

Implementations§

Source§

impl<'d> I2sRx<'d, Async>

Source

pub async fn read_dma_async(&mut self, words: &mut [u8]) -> Result<(), Error>

One-shot read I2S.

Source

pub fn read_dma_circular_async<RXBUF>( self, words: RXBUF, ) -> Result<I2sReadDmaTransferAsync<'d, RXBUF>, Error>
where RXBUF: WriteBuffer,

Continuously read from I2S. Returns I2sReadDmaTransferAsync

Source§

impl<Dm> I2sRx<'_, Dm>
where Dm: DriverMode,

Source

pub fn read_words( &mut self, words: &mut [impl AcceptedWord], ) -> Result<(), Error>

Reads a slice of data from the I2S peripheral and stores it in the provided buffer.

Source

pub fn read_dma<'t>( &'t mut self, words: &'t mut impl WriteBuffer, ) -> Result<DmaTransferRx<'t, Self>, Error>
where Self: DmaSupportRx,

Read I2S. Returns DmaTransferRx which represents the in-progress DMA transfer

Source

pub fn read_dma_circular<'t>( &'t mut self, words: &'t mut impl WriteBuffer, ) -> Result<DmaTransferRxCircular<'t, Self>, Error>
where Self: DmaSupportRx,

Continuously read from I2S. Returns DmaTransferRxCircular which represents the in-progress DMA transfer

Trait Implementations§

Source§

impl<Dm> Debug for I2sRx<'_, Dm>
where Dm: DriverMode,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'d, Dm> Freeze for I2sRx<'d, Dm>

§

impl<'d, Dm> RefUnwindSafe for I2sRx<'d, Dm>
where Dm: RefUnwindSafe,

§

impl<'d, Dm> Send for I2sRx<'d, Dm>
where Dm: Send,

§

impl<'d, Dm> !Sync for I2sRx<'d, Dm>

§

impl<'d, Dm> Unpin for I2sRx<'d, Dm>
where Dm: Unpin,

§

impl<'d, Dm> !UnwindSafe for I2sRx<'d, Dm>

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.