Struct stm32_hal2::spi::Spi [−][src]
SPI peripheral operating in full duplex master mode
Implementations
impl Spi<SPI1>
[src]
pub fn new_spi1<C: ClockCfg>(
spi: SPI1,
mode: Mode,
freq: u32,
clocks: &C,
rcc: &mut RCC
) -> Self
[src]
spi: SPI1,
mode: Mode,
freq: u32,
clocks: &C,
rcc: &mut RCC
) -> Self
Configures the SPI peripheral to operate in full duplex master mode
pub fn reclock<F, C: ClockCfg>(&mut self, freq: u32, clocks: C)
[src]
Change the baud rate of the SPI
impl Spi<SPI2>
[src]
pub fn new_spi2<C: ClockCfg>(
spi: SPI2,
mode: Mode,
freq: u32,
clocks: &C,
rcc: &mut RCC
) -> Self
[src]
spi: SPI2,
mode: Mode,
freq: u32,
clocks: &C,
rcc: &mut RCC
) -> Self
Configures the SPI peripheral to operate in full duplex master mode
pub fn reclock<F, C: ClockCfg>(&mut self, freq: u32, clocks: C)
[src]
Change the baud rate of the SPI
Trait Implementations
impl Default<u8> for Spi<SPI1>
[src]
impl Default<u8> for Spi<SPI2>
[src]
impl Default<u8> for Spi<SPI1>
[src]
impl Default<u8> for Spi<SPI2>
[src]
impl FullDuplex<u8> for Spi<SPI1>
[src]
type Error = Error
An enumeration of SPI errors
fn read(&mut self) -> Result<u8, Error>
[src]
fn send(&mut self, byte: u8) -> Result<(), Error>
[src]
impl FullDuplex<u8> for Spi<SPI2>
[src]
Auto Trait Implementations
impl<SPI> Send for Spi<SPI> where
SPI: Send,
SPI: Send,
impl<SPI> Sync for Spi<SPI> where
SPI: Sync,
SPI: Sync,
impl<SPI> Unpin for Spi<SPI> where
SPI: Unpin,
SPI: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<W, S> Transfer<W> for S where
W: Clone,
S: Default<W>,
[src]
W: Clone,
S: Default<W>,
type Error = <S as FullDuplex<W>>::Error
Error type
pub fn transfer(
&mut self,
words: &'w mut [W]
) -> Result<&'w [W], <S as FullDuplex<W>>::Error>
[src]
&mut self,
words: &'w mut [W]
) -> Result<&'w [W], <S as FullDuplex<W>>::Error>
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<W, S> Write<W> for S where
W: Clone,
S: Default<W>,
[src]
W: Clone,
S: Default<W>,
type Error = <S as FullDuplex<W>>::Error
Error type