Struct embassy_stm32::sai::Sai
source · pub struct Sai<'d, T: Instance, C: Channel, W: Word> { /* private fields */ }
Expand description
SAI sub-block driver.
Implementations§
source§impl<'d, T: Instance, C: Channel, W: Word> Sai<'d, T, C, W>
impl<'d, T: Instance, C: Channel, W: Word> Sai<'d, T, C, 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 = C> + '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 = C> + '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 = C> + '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 = C> + '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 = C> + '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 = C> + '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
.
Trait Implementations§
Auto Trait Implementations§
impl<'d, T, C, W> RefUnwindSafe for Sai<'d, T, C, W>
impl<'d, T, C, W> Send for Sai<'d, T, C, W>
impl<'d, T, C, W> Sync for Sai<'d, T, C, W>
impl<'d, T, C, W> Unpin for Sai<'d, T, C, W>
impl<'d, T, C, W> !UnwindSafe for Sai<'d, T, C, 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