Struct nrf52833_hal::spi::Spi [−][src]
pub struct Spi<T>(_);
Expand description
Interface to a SPI instance.
Implementations
Trait Implementations
Must only be called after send
as the interface will read and write at the same time.
Must only be called the same number of times as read
.
nRF51 is double buffered; two bytes can be written before data must be read.
Auto Trait Implementations
impl<T> RefUnwindSafe for Spi<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Spi<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Casts the value.
Performs the conversion.
Performs the conversion.
Casts the value.
Casts the value.
type Error = <S as FullDuplex<W>>::Error
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>
pub fn transfer(
&mut self,
words: &'w mut [W]
) -> Result<&'w [W], <S as FullDuplex<W>>::Error>
Sends words
to the slave. Returns the words
received from the slave
Casts the value.
Casts the value.
type Error = <S as FullDuplex<W>>::Error
type Error = <S as FullDuplex<W>>::Error
Error type
type Error = <S as FullDuplex<W>>::Error
type Error = <S as FullDuplex<W>>::Error
Error type
pub fn write_iter<WI>(
&mut self,
words: WI
) -> Result<(), <S as FullDuplex<W>>::Error> where
WI: IntoIterator<Item = W>,
pub fn write_iter<WI>(
&mut self,
words: WI
) -> Result<(), <S as FullDuplex<W>>::Error> where
WI: IntoIterator<Item = W>,
Sends words
to the slave, ignoring all the incoming words