pub struct Sai<'d, T: Instance, W: Word> { /* private fields */ }
Expand description
SAI sub-block driver.
Implementations§
Source§impl<'d, T: Instance, W: Word> Sai<'d, T, W>
impl<'d, T: Instance, W: Word> Sai<'d, T, W>
Sourcepub fn new_asynchronous_with_mclk<S: SubBlockInstance>(
peri: SubBlock<'d, T, S>,
sck: impl Peripheral<P = impl SckPin<T, S>> + 'd,
sd: impl Peripheral<P = impl SdPin<T, S>> + 'd,
fs: impl Peripheral<P = impl FsPin<T, S>> + 'd,
mclk: impl Peripheral<P = impl MclkPin<T, S>> + 'd,
dma: impl Peripheral<P = impl Channel + Dma<T, S>> + 'd,
dma_buf: &'d mut [W],
config: Config,
) -> Self
pub fn new_asynchronous_with_mclk<S: SubBlockInstance>( peri: SubBlock<'d, T, S>, sck: impl Peripheral<P = impl SckPin<T, S>> + 'd, sd: impl Peripheral<P = impl SdPin<T, S>> + 'd, fs: impl Peripheral<P = impl FsPin<T, S>> + 'd, mclk: impl Peripheral<P = impl MclkPin<T, S>> + 'd, dma: impl Peripheral<P = impl Channel + Dma<T, S>> + 'd, dma_buf: &'d mut [W], config: Config, ) -> Self
Create a new SAI driver in asynchronous mode with MCLK.
You can obtain the SubBlock
with split_subblocks
.
Sourcepub fn new_asynchronous<S: SubBlockInstance>(
peri: SubBlock<'d, T, S>,
sck: impl Peripheral<P = impl SckPin<T, S>> + 'd,
sd: impl Peripheral<P = impl SdPin<T, S>> + 'd,
fs: impl Peripheral<P = impl FsPin<T, S>> + 'd,
dma: impl Peripheral<P = impl Channel + Dma<T, S>> + 'd,
dma_buf: &'d mut [W],
config: Config,
) -> Self
pub fn new_asynchronous<S: SubBlockInstance>( peri: SubBlock<'d, T, S>, sck: impl Peripheral<P = impl SckPin<T, S>> + 'd, sd: impl Peripheral<P = impl SdPin<T, S>> + 'd, fs: impl Peripheral<P = impl FsPin<T, S>> + 'd, dma: impl Peripheral<P = impl Channel + Dma<T, S>> + 'd, dma_buf: &'d mut [W], config: Config, ) -> Self
Create a new SAI driver in asynchronous mode without MCLK.
You can obtain the SubBlock
with split_subblocks
.
Sourcepub fn new_synchronous<S: SubBlockInstance>(
peri: SubBlock<'d, T, S>,
sd: impl Peripheral<P = impl SdPin<T, S>> + 'd,
dma: impl Peripheral<P = impl Channel + Dma<T, S>> + 'd,
dma_buf: &'d mut [W],
config: Config,
) -> Self
pub fn new_synchronous<S: SubBlockInstance>( peri: SubBlock<'d, T, S>, sd: impl Peripheral<P = impl SdPin<T, S>> + 'd, dma: impl Peripheral<P = impl Channel + Dma<T, S>> + 'd, dma_buf: &'d mut [W], config: Config, ) -> Self
Create a new SAI driver in synchronous mode.
You can obtain the SubBlock
with split_subblocks
.
Sourcepub fn is_muted(&self) -> Result<bool, Error>
pub fn is_muted(&self) -> Result<bool, Error>
Determine the mute state of the receiver.
Clears the mute state flag in the status register.
Trait Implementations§
Auto Trait Implementations§
impl<'d, T, W> Freeze for Sai<'d, T, W>where
T: Freeze,
impl<'d, T, W> RefUnwindSafe for Sai<'d, T, W>where
T: RefUnwindSafe,
W: RefUnwindSafe,
impl<'d, T, W> Send for Sai<'d, T, W>
impl<'d, T, W> Sync for Sai<'d, T, W>
impl<'d, T, W> Unpin for Sai<'d, T, W>where
T: Unpin,
impl<'d, T, W> !UnwindSafe for Sai<'d, T, W>
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