pub enum EightBit {}
Expand description

CharSize variant for 8-bit transactions

Trait Implementations§

source§

impl CharSize for EightBit

§

type Word = u8

Word size for the character size
source§

const BITS: u8 = 0u8

Register bit pattern for the corresponding CharSize
source§

impl<P, M, A> Transfer<<EightBit as CharSize>::Word> for Spi<Config<P, M, EightBit>, A>where Config<P, M, EightBit>: ValidConfig, P: ValidPads, M: OpMode, A: Receive,

Implement Transfer for Spi structs that can Receive

The transfer accepts a slice of primitive integers, depending on the CharSize (u8 or u16).

§

type Error = Error

Error type
source§

fn transfer<'w>( &mut self, words: &'w mut [<EightBit as CharSize>::Word] ) -> Result<&'w [<EightBit as CharSize>::Word], Error>

Sends words to the slave. Returns the words received from the slave
source§

impl<P, M> Write<<EightBit as CharSize>::Word> for Spi<Config<P, M, EightBit>, Duplex>where Config<P, M, EightBit>: ValidConfig, P: ValidPads, M: OpMode,

Implement Write for Spi structs with Duplex Capability

The transfer accepts a slice of primitive integers, depending on the CharSize (u8 or u16).

§

type Error = Error

Error type
source§

fn write(&mut self, words: &[<EightBit as CharSize>::Word]) -> Result<(), Error>

Sends words to the slave, ignoring all the incoming words
source§

impl<P, M> Write<<EightBit as CharSize>::Word> for Spi<Config<P, M, EightBit>, Tx>where Config<P, M, EightBit>: ValidConfig, P: ValidPads, M: OpMode,

Implement Write for Spi structs with Tx Capability

The transfer accepts a slice of primitive integers, depending on the CharSize (u8 or u16).

Because the Capability is Tx, this implementation never reads the DATA register and ignores all buffer overflow errors.

§

type Error = Error

Error type
source§

fn write(&mut self, words: &[<EightBit as CharSize>::Word]) -> Result<(), Error>

Sends words to the slave, ignoring all the incoming words

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<C> AtomicSize for Cwhere C: CharSize,

source§

impl<C> Size for Cwhere C: CharSize,