pub struct I2s<'d, I, CH>where
I: RegisterAccess,
CH: ChannelTypes,{
pub i2s_tx: TxCreator<'d, I, CH>,
pub i2s_rx: RxCreator<'d, I, CH>,
}
Expand description
Instance of the I2S peripheral driver
Fields§
§i2s_tx: TxCreator<'d, I, CH>
§i2s_rx: RxCreator<'d, I, CH>
Implementations§
source§impl<'d, I, CH> I2s<'d, I, CH>where
I: RegisterAccess,
CH: ChannelTypes,
impl<'d, I, CH> I2s<'d, I, CH>where
I: RegisterAccess,
CH: ChannelTypes,
sourcepub fn new(
i2s: impl Peripheral<P = I> + 'd,
standard: Standard,
data_format: DataFormat,
sample_rate: impl Into<Rate<u32, 1, 1>>,
channel: Channel<'d, CH>,
clocks: &Clocks<'_>
) -> I2s<'d, I, CH>
pub fn new( i2s: impl Peripheral<P = I> + 'd, standard: Standard, data_format: DataFormat, sample_rate: impl Into<Rate<u32, 1, 1>>, channel: Channel<'d, CH>, clocks: &Clocks<'_> ) -> I2s<'d, I, CH>
Construct a new I2S peripheral driver instance for the first I2S peripheral
sourcepub fn new_i2s1(
i2s: impl Peripheral<P = I> + 'd,
standard: Standard,
data_format: DataFormat,
sample_rate: impl Into<Rate<u32, 1, 1>>,
channel: Channel<'d, CH>,
clocks: &Clocks<'_>
) -> I2s<'d, I, CH>
pub fn new_i2s1( i2s: impl Peripheral<P = I> + 'd, standard: Standard, data_format: DataFormat, sample_rate: impl Into<Rate<u32, 1, 1>>, channel: Channel<'d, CH>, clocks: &Clocks<'_> ) -> I2s<'d, I, CH>
Construct a new I2S peripheral driver instance for the second I2S peripheral
pub fn with_mclk<P>(self, pin: impl Peripheral<P = P> + 'd) -> I2s<'d, I, CH>where
P: OutputPin,
Auto Trait Implementations§
impl<'d, I, CH> RefUnwindSafe for I2s<'d, I, CH>where
I: RefUnwindSafe,
<CH as ChannelTypes>::Rx<'d>: RefUnwindSafe,
<CH as ChannelTypes>::Tx<'d>: RefUnwindSafe,
impl<'d, I, CH> Send for I2s<'d, I, CH>
impl<'d, I, CH> Sync for I2s<'d, I, CH>
impl<'d, I, CH> Unpin for I2s<'d, I, CH>
impl<'d, I, CH> UnwindSafe for I2s<'d, I, CH>where
I: UnwindSafe,
<CH as ChannelTypes>::Rx<'d>: UnwindSafe,
<CH as ChannelTypes>::Tx<'d>: UnwindSafe,
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