embassy-nrf

Crates

git

Versions

nrf52833

Flavors

Skip to main content

I2S

Struct I2S 

Source
pub struct I2S<'d> { /* private fields */ }
Expand description

I2S driver.

Implementations§

Source§

impl<'d> I2S<'d>

Source

pub fn new_master<T: Instance>( i2s: Peri<'d, T>, sck: Peri<'d, impl GpioPin>, lrck: Peri<'d, impl GpioPin>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, master_clock: MasterClock, config: Config, ) -> Self

Create a new I2S in master mode without an MCK output pin.

Source

pub fn new_master_with_mck<T: Instance>( i2s: Peri<'d, T>, mck: Peri<'d, impl GpioPin>, sck: Peri<'d, impl GpioPin>, lrck: Peri<'d, impl GpioPin>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, master_clock: MasterClock, config: Config, ) -> Self

Create a new I2S in master mode with an MCK output pin.

Source

pub fn new_slave<T: Instance>( _i2s: Peri<'d, T>, sck: Peri<'d, impl GpioPin>, lrck: Peri<'d, impl GpioPin>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, config: Config, ) -> Self

Create a new I2S in slave mode

Source

pub fn output<S: Sample, const NB: usize, const NS: usize>( self, sdout: Peri<'d, impl GpioPin>, buffers: MultiBuffering<S, NB, NS>, ) -> OutputStream<'d, S, NB, NS>

I2S output only

Source

pub fn input<S: Sample, const NB: usize, const NS: usize>( self, sdin: Peri<'d, impl GpioPin>, buffers: MultiBuffering<S, NB, NS>, ) -> InputStream<'d, S, NB, NS>

I2S input only

Source

pub fn full_duplex<S: Sample, const NB: usize, const NS: usize>( self, sdin: Peri<'d, impl GpioPin>, sdout: Peri<'d, impl GpioPin>, buffers_out: MultiBuffering<S, NB, NS>, buffers_in: MultiBuffering<S, NB, NS>, ) -> FullDuplexStream<'d, S, NB, NS>

I2S full duplex (input and output)

Auto Trait Implementations§

§

impl<'d> !RefUnwindSafe for I2S<'d>

§

impl<'d> !UnwindSafe for I2S<'d>

§

impl<'d> Freeze for I2S<'d>

§

impl<'d> Send for I2S<'d>

§

impl<'d> Sync for I2S<'d>

§

impl<'d> Unpin for I2S<'d>

§

impl<'d> UnsafeUnpin for I2S<'d>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = !

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.