Struct stm32f4xx_hal::i2s::I2s
source · [−]pub struct I2s<I, PINS> { /* private fields */ }
Expand description
An I2s wrapper around an SPI object and pins
Implementations
sourceimpl<SPI, WS, CK, MCLK, SD> I2s<SPI, (WS, CK, MCLK, SD)>where
SPI: Instance,
(WS, CK, MCLK, SD): Pins<SPI>,
impl<SPI, WS, CK, MCLK, SD> I2s<SPI, (WS, CK, MCLK, SD)>where
SPI: Instance,
(WS, CK, MCLK, SD): Pins<SPI>,
sourcepub fn new(spi: SPI, pins: (WS, CK, MCLK, SD), clocks: &Clocks) -> Self
pub fn new(spi: SPI, pins: (WS, CK, MCLK, SD), clocks: &Clocks) -> Self
Creates an I2s object around an SPI peripheral and pins
This function enables and resets the SPI peripheral, but does not configure it.
The returned I2s object implements stm32_i2s_v12x::I2sPeripheral
, so it can be used to
configure the peripheral and communicate.
Panics
This function panics if the I2S clock input (from the I2S PLL or similar) is not configured.
pub fn release(self) -> (SPI, (WS, CK, MCLK, SD))
sourceimpl<SPI, PINS: Pins<SPI>> I2s<SPI, PINS>
impl<SPI, PINS: Pins<SPI>> I2s<SPI, PINS>
pub fn ws_pin(&self) -> &PINS::WsPin
pub fn ws_pin_mut(&mut self) -> &mut PINS::WsPin
sourceimpl<I, PINS> I2s<I, PINS>
impl<I, PINS> I2s<I, PINS>
sourcepub fn input_clock(&self) -> Hertz
pub fn input_clock(&self) -> Hertz
Returns the frequency of the clock signal that the SPI peripheral is receiving from the I2S PLL or similar source
Auto Trait Implementations
impl<I, PINS> RefUnwindSafe for I2s<I, PINS>where
I: RefUnwindSafe,
PINS: RefUnwindSafe,
impl<I, PINS> Send for I2s<I, PINS>where
I: Send,
PINS: Send,
impl<I, PINS> Sync for I2s<I, PINS>where
I: Sync,
PINS: Sync,
impl<I, PINS> Unpin for I2s<I, PINS>where
I: Unpin,
PINS: Unpin,
impl<I, PINS> UnwindSafe for I2s<I, PINS>where
I: UnwindSafe,
PINS: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more