pub struct SubBlock<Channel, Config, Direction = NoDir> { /* private fields */ }
Expand description
Wrapper for a single channel of the SAI and its configuration.
Implementations§
Source§impl<Ch> SubBlock<Ch, Asynchronous>where
Ch: Channel + SaiChannel,
impl<Ch> SubBlock<Ch, Asynchronous>where
Ch: Channel + SaiChannel,
Sourcepub fn master_rx(
self,
pins: (impl Into<Ch::Mclk>, impl Into<Ch::Fs>, impl Into<Ch::Sck>, impl Into<Ch::Sd>),
protocol: Protocol,
sample_freq: impl Into<Hertz>,
clocks: &Clocks,
) -> SubBlock<Ch, AsyncMaster<Ch>, Receive>
pub fn master_rx( self, pins: (impl Into<Ch::Mclk>, impl Into<Ch::Fs>, impl Into<Ch::Sck>, impl Into<Ch::Sd>), protocol: Protocol, sample_freq: impl Into<Hertz>, clocks: &Clocks, ) -> SubBlock<Ch, AsyncMaster<Ch>, Receive>
Configures the channel as a master and a receiver.
Sourcepub fn master_tx(
self,
pins: (impl Into<Ch::Mclk>, impl Into<Ch::Fs>, impl Into<Ch::Sck>, impl Into<Ch::Sd>),
protocol: Protocol,
sample_freq: impl Into<Hertz>,
clocks: &Clocks,
) -> SubBlock<Ch, AsyncMaster<Ch>, Transmit>
pub fn master_tx( self, pins: (impl Into<Ch::Mclk>, impl Into<Ch::Fs>, impl Into<Ch::Sck>, impl Into<Ch::Sd>), protocol: Protocol, sample_freq: impl Into<Hertz>, clocks: &Clocks, ) -> SubBlock<Ch, AsyncMaster<Ch>, Transmit>
Configures the channel as a master and a transmitter.
Source§impl<Ch> SubBlock<Ch, Synchronous>where
Ch: Channel + SaiChannel,
impl<Ch> SubBlock<Ch, Synchronous>where
Ch: Channel + SaiChannel,
Auto Trait Implementations§
impl<Channel, Config, Direction> Freeze for SubBlock<Channel, Config, Direction>
impl<Channel, Config, Direction> RefUnwindSafe for SubBlock<Channel, Config, Direction>
impl<Channel, Config, Direction> Send for SubBlock<Channel, Config, Direction>
impl<Channel, Config, Direction> Sync for SubBlock<Channel, Config, Direction>
impl<Channel, Config, Direction> Unpin for SubBlock<Channel, Config, Direction>
impl<Channel, Config, Direction> UnwindSafe for SubBlock<Channel, Config, Direction>
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