Enum mnemos_d1_core::drivers::twi::Status

source ·
#[repr(u8)]
enum Status {
Show 31 variants BusError = 0, StartTransmitted = 8, RepeatedStartTransmitted = 16, Addr1WriteAcked = 24, Addr1WriteNacked = 32, TxDataAcked = 40, TxDataNacked = 48, ArbitrationLost = 56, Addr1ReadAcked = 64, Addr1ReadNacked = 72, RxDataAcked = 80, RxDataNacked = 88, TargetAddrWriteAcked = 96, ArbitrationLostTargetWrite = 104, GeneralCall = 112, ArbitrationLostGeneralCall = 120, TargetRxDataAcked = 128, TargetRxDataNacked = 136, GeneralCallRxDataAcked = 144, GeneralCallRxDataNacked = 152, TargetStopOrRepeatedStart = 160, TargetAddrReadAcked = 168, ArbitrationLostTargetRead = 176, TargetTxDataAcked = 184, TargetTxDataNacked = 192, TargetTxLastDataAcked = 200, Addr2WriteAcked = 208, Addr2WriteNacked = 216, Addr2ReadAcked = 224, Addr2ReadNacked = 232, None = 248,
}
Expand description

Values of the TWI_STAT register.

Variants§

§

BusError = 0

0x00: Bus error

§

StartTransmitted = 8

0x08: START condition transmitted

§

RepeatedStartTransmitted = 16

Ox10: Repeated START condition transmitted

§

Addr1WriteAcked = 24

0x18: Address + Write bit transmitted, ACK received

§

Addr1WriteNacked = 32

0x20: Address + Write bit transmitted, NACK received

§

TxDataAcked = 40

0x28: Data byte transmitted in controller mode, ACK received

§

TxDataNacked = 48

0x30: Data byte transmitted in controller mode, ACK not received

§

ArbitrationLost = 56

0x38: Arbitration lost in address or data byte

§

Addr1ReadAcked = 64

0x40: Address + Read bit transmitted, ACK received

§

Addr1ReadNacked = 72

0x48: Address + Read bit transmitted, ACK not received

§

RxDataAcked = 80

0x50: Data byte received in controller mode, ACK transmitted

§

RxDataNacked = 88

0x58: Data byte received in controller mode, no ACK transmitted

§

TargetAddrWriteAcked = 96

0x60: Target address and write bit received, ACK transmitted

§

ArbitrationLostTargetWrite = 104

0x68: Arbitration lost in the address as controller, target address

  • Write bit recieved, ACK transmitted
§

GeneralCall = 112

0x70: General call address received, ACK transmitted

§

ArbitrationLostGeneralCall = 120

0x78: Arbitration lost in the address as controller, General Call address transmitted, ACK received

§

TargetRxDataAcked = 128

0x80: Data byte recieved after target address received, ACK transmitted.

§

TargetRxDataNacked = 136

0x80: Data byte recieved after target address received, no ACK transmitted.

§

GeneralCallRxDataAcked = 144

0x90: Data byte received after General Call received, ACK transmitted.

§

GeneralCallRxDataNacked = 152

0x98: Data byte received after General Call received, no ACK transmitted

§

TargetStopOrRepeatedStart = 160

0xA0: STOP or repeated START condition received in target mode

§

TargetAddrReadAcked = 168

0xA8: Target address + Read bit received, ACK transmitted

§

ArbitrationLostTargetRead = 176

0xB0: Arbitration lost in address as controller, target address + Read bit received, ACK transmitted

§

TargetTxDataAcked = 184

0xB8: Data byte transmitted in target mode, ACK received

§

TargetTxDataNacked = 192

0xC0: Data byte transmitted in target mode, ACK not received

§

TargetTxLastDataAcked = 200

0xC8: Last data byte transmitted in target mode, ACK received

§

Addr2WriteAcked = 208

0xD0: Second Address byte + Write bit transmitted, ACK received

§

Addr2WriteNacked = 216

0xD8: Second Address byte + Write bit transmitted, ACK not received

§

Addr2ReadAcked = 224

0xE0: Address 2 + Read bit received, ACK transmitted

Note that the D1 manual neglects to mention this state (and the corresponding NACK state), but it’s in the Linux driver, so I presume it’s real.alloc

§

Addr2ReadNacked = 232

0xE8: Address 2 + Read bit received, ACK transmitted

Note that the D1 manual neglects to mention this state (and the corresponding NACK state), but it’s in the Linux driver, so I presume it’s real.alloc

§

None = 248

0xF8: No relevant status information, INT_FLAG = 0

Implementations§

source§

impl Status

source

const VARIANTS: &'static [Self] = _

source

const MAX_VARIANT: Self = _

source

const MIN_VARIANT: Self = _

source

const NEEDED_BITS: u32 = 8u32

source

const ERROR: &'static str = "invalid value for Status: expected one of [0x00, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38, 0x40, 0x48, 0x50, 0x58, 0x60, 0x68, 0x70, 0x78, 0x80, 0x88, 0x90, 0x98, 0xA0, 0xA8, 0xB0, 0xB8, 0xC0, 0xC8, 0xD0, 0xD8, 0xE0, 0xE8, 0xF8]"

source§

impl Status

Trait Implementations§

source§

impl Clone for Status

source§

fn clone(&self) -> Status

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Status

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromBits<u128> for Status

§

type Error = &'static str

The error type returned by Self::try_from_bits when an invalid bit pattern is encountered. Read more
source§

const BITS: u32 = 8u32

The number of bits required to represent a value of this type.
source§

fn try_from_bits(u: u128) -> Result<Self, Self::Error>

Attempt to convert bits into a value of this type. Read more
source§

fn into_bits(self) -> u128

Convert self into a raw bit representation. Read more
source§

impl FromBits<u16> for Status

§

type Error = &'static str

The error type returned by Self::try_from_bits when an invalid bit pattern is encountered. Read more
source§

const BITS: u32 = 8u32

The number of bits required to represent a value of this type.
source§

fn try_from_bits(u: u16) -> Result<Self, Self::Error>

Attempt to convert bits into a value of this type. Read more
source§

fn into_bits(self) -> u16

Convert self into a raw bit representation. Read more
source§

impl FromBits<u32> for Status

§

type Error = &'static str

The error type returned by Self::try_from_bits when an invalid bit pattern is encountered. Read more
source§

const BITS: u32 = 8u32

The number of bits required to represent a value of this type.
source§

fn try_from_bits(u: u32) -> Result<Self, Self::Error>

Attempt to convert bits into a value of this type. Read more
source§

fn into_bits(self) -> u32

Convert self into a raw bit representation. Read more
source§

impl FromBits<u64> for Status

§

type Error = &'static str

The error type returned by Self::try_from_bits when an invalid bit pattern is encountered. Read more
source§

const BITS: u32 = 8u32

The number of bits required to represent a value of this type.
source§

fn try_from_bits(u: u64) -> Result<Self, Self::Error>

Attempt to convert bits into a value of this type. Read more
source§

fn into_bits(self) -> u64

Convert self into a raw bit representation. Read more
source§

impl FromBits<u8> for Status

§

type Error = &'static str

The error type returned by Self::try_from_bits when an invalid bit pattern is encountered. Read more
source§

const BITS: u32 = 8u32

The number of bits required to represent a value of this type.
source§

fn try_from_bits(u: u8) -> Result<Self, Self::Error>

Attempt to convert bits into a value of this type. Read more
source§

fn into_bits(self) -> u8

Convert self into a raw bit representation. Read more
source§

impl FromBits<usize> for Status

§

type Error = &'static str

The error type returned by Self::try_from_bits when an invalid bit pattern is encountered. Read more
source§

const BITS: u32 = 8u32

The number of bits required to represent a value of this type.
source§

fn try_from_bits(u: usize) -> Result<Self, Self::Error>

Attempt to convert bits into a value of this type. Read more
source§

fn into_bits(self) -> usize

Convert self into a raw bit representation. Read more
source§

impl PartialEq for Status

source§

fn eq(&self, other: &Status) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<u128> for Status

§

type Error = &'static str

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

fn try_from(u: u128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<u16> for Status

§

type Error = &'static str

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

fn try_from(u: u16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<u32> for Status

§

type Error = &'static str

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

fn try_from(u: u32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<u64> for Status

§

type Error = &'static str

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

fn try_from(u: u64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<u8> for Status

§

type Error = &'static str

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

fn try_from(value: u8) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<usize> for Status

§

type Error = &'static str

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

fn try_from(u: usize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Copy for Status

source§

impl Eq for Status

source§

impl StructuralPartialEq for Status

Auto Trait Implementations§

§

impl Freeze for Status

§

impl RefUnwindSafe for Status

§

impl Send for Status

§

impl Sync for Status

§

impl Unpin for Status

§

impl UnwindSafe for Status

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Az for T

source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where 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> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where 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 T
where 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<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.