Struct tm4c123x_hal::spi::Spi
source · pub struct Spi<SPI, PINS> { /* private fields */ }
Expand description
SPI peripheral operating in full duplex master mode
Implementations
sourceimpl<SCK, MISO, MOSI> Spi<SSI0, (SCK, MISO, MOSI)>
impl<SCK, MISO, MOSI> Spi<SSI0, (SCK, MISO, MOSI)>
sourcepub fn spi0<F>(
spi: SSI0,
pins: (SCK, MISO, MOSI),
mode: Mode,
freq: F,
clocks: &Clocks,
pc: &PowerControl
) -> Selfwhere
F: Into<Hertz>,
SCK: SckPin<SSI0>,
MISO: MisoPin<SSI0>,
MOSI: MosiPin<SSI0>,
pub fn spi0<F>(
spi: SSI0,
pins: (SCK, MISO, MOSI),
mode: Mode,
freq: F,
clocks: &Clocks,
pc: &PowerControl
) -> Selfwhere
F: Into<Hertz>,
SCK: SckPin<SSI0>,
MISO: MisoPin<SSI0>,
MOSI: MosiPin<SSI0>,
Configures the SPI peripheral to operate in full duplex master mode
sourcepub fn free(self) -> (SSI0, (SCK, MISO, MOSI))
pub fn free(self) -> (SSI0, (SCK, MISO, MOSI))
Releases the SPI peripheral and associated pins
sourceimpl<SCK, MISO, MOSI> Spi<SSI1, (SCK, MISO, MOSI)>
impl<SCK, MISO, MOSI> Spi<SSI1, (SCK, MISO, MOSI)>
sourcepub fn spi1<F>(
spi: SSI1,
pins: (SCK, MISO, MOSI),
mode: Mode,
freq: F,
clocks: &Clocks,
pc: &PowerControl
) -> Selfwhere
F: Into<Hertz>,
SCK: SckPin<SSI1>,
MISO: MisoPin<SSI1>,
MOSI: MosiPin<SSI1>,
pub fn spi1<F>(
spi: SSI1,
pins: (SCK, MISO, MOSI),
mode: Mode,
freq: F,
clocks: &Clocks,
pc: &PowerControl
) -> Selfwhere
F: Into<Hertz>,
SCK: SckPin<SSI1>,
MISO: MisoPin<SSI1>,
MOSI: MosiPin<SSI1>,
Configures the SPI peripheral to operate in full duplex master mode
sourcepub fn free(self) -> (SSI1, (SCK, MISO, MOSI))
pub fn free(self) -> (SSI1, (SCK, MISO, MOSI))
Releases the SPI peripheral and associated pins
sourceimpl<SCK, MISO, MOSI> Spi<SSI2, (SCK, MISO, MOSI)>
impl<SCK, MISO, MOSI> Spi<SSI2, (SCK, MISO, MOSI)>
sourcepub fn spi2<F>(
spi: SSI2,
pins: (SCK, MISO, MOSI),
mode: Mode,
freq: F,
clocks: &Clocks,
pc: &PowerControl
) -> Selfwhere
F: Into<Hertz>,
SCK: SckPin<SSI2>,
MISO: MisoPin<SSI2>,
MOSI: MosiPin<SSI2>,
pub fn spi2<F>(
spi: SSI2,
pins: (SCK, MISO, MOSI),
mode: Mode,
freq: F,
clocks: &Clocks,
pc: &PowerControl
) -> Selfwhere
F: Into<Hertz>,
SCK: SckPin<SSI2>,
MISO: MisoPin<SSI2>,
MOSI: MosiPin<SSI2>,
Configures the SPI peripheral to operate in full duplex master mode
sourcepub fn free(self) -> (SSI2, (SCK, MISO, MOSI))
pub fn free(self) -> (SSI2, (SCK, MISO, MOSI))
Releases the SPI peripheral and associated pins
sourceimpl<SCK, MISO, MOSI> Spi<SSI3, (SCK, MISO, MOSI)>
impl<SCK, MISO, MOSI> Spi<SSI3, (SCK, MISO, MOSI)>
sourcepub fn spi3<F>(
spi: SSI3,
pins: (SCK, MISO, MOSI),
mode: Mode,
freq: F,
clocks: &Clocks,
pc: &PowerControl
) -> Selfwhere
F: Into<Hertz>,
SCK: SckPin<SSI3>,
MISO: MisoPin<SSI3>,
MOSI: MosiPin<SSI3>,
pub fn spi3<F>(
spi: SSI3,
pins: (SCK, MISO, MOSI),
mode: Mode,
freq: F,
clocks: &Clocks,
pc: &PowerControl
) -> Selfwhere
F: Into<Hertz>,
SCK: SckPin<SSI3>,
MISO: MisoPin<SSI3>,
MOSI: MosiPin<SSI3>,
Configures the SPI peripheral to operate in full duplex master mode
sourcepub fn free(self) -> (SSI3, (SCK, MISO, MOSI))
pub fn free(self) -> (SSI3, (SCK, MISO, MOSI))
Releases the SPI peripheral and associated pins
Trait Implementations
sourceimpl<PINS> FullDuplex<u8> for Spi<SSI0, PINS>
impl<PINS> FullDuplex<u8> for Spi<SSI0, PINS>
sourceimpl<PINS> FullDuplex<u8> for Spi<SSI1, PINS>
impl<PINS> FullDuplex<u8> for Spi<SSI1, PINS>
sourceimpl<PINS> FullDuplex<u8> for Spi<SSI2, PINS>
impl<PINS> FullDuplex<u8> for Spi<SSI2, PINS>
sourceimpl<PINS> FullDuplex<u8> for Spi<SSI3, PINS>
impl<PINS> FullDuplex<u8> for Spi<SSI3, PINS>
impl<PINS> Default<u8> for Spi<SSI0, PINS>
impl<PINS> Default<u8> for Spi<SSI0, PINS>
impl<PINS> Default<u8> for Spi<SSI1, PINS>
impl<PINS> Default<u8> for Spi<SSI1, PINS>
impl<PINS> Default<u8> for Spi<SSI2, PINS>
impl<PINS> Default<u8> for Spi<SSI2, PINS>
impl<PINS> Default<u8> for Spi<SSI3, PINS>
impl<PINS> Default<u8> for Spi<SSI3, PINS>
Auto Trait Implementations
impl<SPI, PINS> RefUnwindSafe for Spi<SPI, PINS>where
PINS: RefUnwindSafe,
SPI: RefUnwindSafe,
impl<SPI, PINS> Send for Spi<SPI, PINS>where
PINS: Send,
SPI: Send,
impl<SPI, PINS> Sync for Spi<SPI, PINS>where
PINS: Sync,
SPI: Sync,
impl<SPI, PINS> Unpin for Spi<SPI, PINS>where
PINS: Unpin,
SPI: Unpin,
impl<SPI, PINS> UnwindSafe for Spi<SPI, PINS>where
PINS: UnwindSafe,
SPI: 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
sourceimpl<W, S> Transfer<W> for Swhere
S: Default<W>,
W: Clone,
impl<W, S> Transfer<W> for Swhere
S: Default<W>,
W: Clone,
type Error = <S as FullDuplex<W>>::Error
type Error = <S as FullDuplex<W>>::Error
Error type