#[non_exhaustive]pub struct I2s<'d, Dm>where
    Dm: DriverMode,{
    pub i2s_rx: RxCreator<'d, Dm>,
    pub i2s_tx: TxCreator<'d, Dm>,
}Expand description
Instance of the I2S peripheral driver
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.i2s_rx: RxCreator<'d, Dm>Handles the reception (RX) side of the I2S peripheral.
i2s_tx: TxCreator<'d, Dm>Handles the transmission (TX) side of the I2S peripheral.
Implementations§
Source§impl<Dm> I2s<'_, Dm>where
    Dm: DriverMode,
 
impl<Dm> I2s<'_, Dm>where
    Dm: DriverMode,
Sourcepub fn set_interrupt_handler(&mut self, handler: InterruptHandler)
 Available on crate feature unstable only.
pub fn set_interrupt_handler(&mut self, handler: InterruptHandler)
unstable only.Registers an interrupt handler for the peripheral.
Note that this will replace any previously registered interrupt handlers.
You can restore the default/unhandled interrupt handler by using crate::interrupt::DEFAULT_INTERRUPT_HANDLER
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn listen(&mut self, interrupts: impl Into<EnumSet<I2sInterrupt>>)
 Available on crate feature unstable only.
pub fn listen(&mut self, interrupts: impl Into<EnumSet<I2sInterrupt>>)
unstable only.Listen for the given interrupts
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn unlisten(&mut self, interrupts: impl Into<EnumSet<I2sInterrupt>>)
 Available on crate feature unstable only.
pub fn unlisten(&mut self, interrupts: impl Into<EnumSet<I2sInterrupt>>)
unstable only.Unlisten the given interrupts
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn interrupts(&mut self) -> EnumSet<I2sInterrupt>
 Available on crate feature unstable only.
pub fn interrupts(&mut self) -> EnumSet<I2sInterrupt>
unstable only.Gets asserted interrupts
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn clear_interrupts(&mut self, interrupts: impl Into<EnumSet<I2sInterrupt>>)
 Available on crate feature unstable only.
pub fn clear_interrupts(&mut self, interrupts: impl Into<EnumSet<I2sInterrupt>>)
unstable only.Resets asserted interrupts
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Source§impl<'d> I2s<'d, Blocking>
 
impl<'d> I2s<'d, Blocking>
Sourcepub fn new(
    i2s: impl Instance + 'd,
    channel: impl DmaChannelFor<AnyI2s<'d>>,
    config: Config,
) -> Result<Self, ConfigError>
 
pub fn new( i2s: impl Instance + 'd, channel: impl DmaChannelFor<AnyI2s<'d>>, config: Config, ) -> Result<Self, ConfigError>
Construct a new I2s instance.
Sourcepub fn into_async(self) -> I2s<'d, Async>
 
pub fn into_async(self) -> I2s<'d, Async>
Converts the I2S instance into async mode.
Source§impl<'d, Dm> I2s<'d, Dm>where
    Dm: DriverMode,
 
impl<'d, Dm> I2s<'d, Dm>where
    Dm: DriverMode,
Sourcepub fn with_mclk(self, mclk: impl PeripheralOutput<'d>) -> Self
 
pub fn with_mclk(self, mclk: impl PeripheralOutput<'d>) -> Self
Configures the I2S peripheral to use a master clock (MCLK) output pin.
Trait Implementations§
Source§impl<Dm> InterruptConfigurable for I2s<'_, Dm>where
    Dm: DriverMode,
Available on crate feature unstable only. 
impl<Dm> InterruptConfigurable for I2s<'_, Dm>where
    Dm: DriverMode,
unstable only.