pub struct I2S<'d> { /* private fields */ }Expand description
I2S driver.
Implementations§
Source§impl<'d> I2S<'d>
impl<'d> I2S<'d>
Sourcepub 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
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.
Sourcepub 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
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.
Sourcepub 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
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
Sourcepub 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>
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
Sourcepub 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>
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
Sourcepub 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>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more