[−][src]Struct imxrt1062_hal::spi::SPI
An SPI master
By default, the SPI master runs at 8Mhz, Use set_clock_speed
to vary
the SPI bus speed.
Methods
impl<M> SPI<M> where
M: Module,
[src]
M: Module,
pub fn enable_chip_select_0<PCS>(&mut self, pcs: PCS) where
PCS: Pin<Module = M, Wire = PCS0> + IntoDaisy,
[src]
PCS: Pin<Module = M, Wire = PCS0> + IntoDaisy,
Enables the peripheral-controlled chip select 0 (PCS0)
Using the peripheral-controlled chip select is typically more efficient, and it means that software doesn't need to cooridnate its control.
pub fn set_mode(&mut self, mode: Mode) -> Result<(), ModeError>
[src]
Set the SPI mode for the peripheral
pub fn set_clock_speed(
&mut self,
clock_speed: ClockSpeed
) -> Result<(), ClockSpeedError>
[src]
&mut self,
clock_speed: ClockSpeed
) -> Result<(), ClockSpeedError>
Set the SPI master clock speed
pub fn clear_fifo(&mut self)
[src]
Clear any existing data in the SPI receive or transfer FIFOs
Trait Implementations
impl<M> Default<u16> for SPI<M> where
M: Module,
[src]
M: Module,
impl<M> Default<u16> for SPI<M> where
M: Module,
[src]
M: Module,
impl<M> Default<u16> for SPI<M> where
M: Module,
[src]
M: Module,
impl<M> Default<u8> for SPI<M> where
M: Module,
[src]
M: Module,
impl<M> Default<u8> for SPI<M> where
M: Module,
[src]
M: Module,
impl<M> Default<u8> for SPI<M> where
M: Module,
[src]
M: Module,
impl<M> FullDuplex<u16> for SPI<M> where
M: Module,
[src]
M: Module,
type Error = Error
An enumeration of SPI errors
fn read(&mut self) -> Result<u16, Self::Error>
[src]
fn send(&mut self, word: u16) -> Result<(), Self::Error>
[src]
impl<M> FullDuplex<u8> for SPI<M> where
M: Module,
[src]
M: Module,
Auto Trait Implementations
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,
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
S: Default<W>,
W: Clone,
[src]
S: Default<W>,
W: Clone,
type Error = <S as FullDuplex<W>>::Error
Error type
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<W, S> Write<W> for S where
S: Default<W>,
W: Clone,
[src]
S: Default<W>,
W: Clone,
type Error = <S as FullDuplex<W>>::Error
Error type
fn write(&mut self, words: &[W]) -> Result<(), <S as FullDuplex<W>>::Error>
[src]
impl<W, S> WriteIter<W> for S where
S: Default<W>,
W: Clone,
[src]
S: Default<W>,
W: Clone,
type Error = <S as FullDuplex<W>>::Error
Error type
fn write_iter<WI>(
&mut self,
words: WI
) -> Result<(), <S as FullDuplex<W>>::Error> where
WI: IntoIterator<Item = W>,
[src]
&mut self,
words: WI
) -> Result<(), <S as FullDuplex<W>>::Error> where
WI: IntoIterator<Item = W>,