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
impl Status
const VARIANTS: &'static [Self] = _
const MAX_VARIANT: Self = _
const MIN_VARIANT: Self = _
const NEEDED_BITS: u32 = 8u32
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]"
Trait Implementations§
source§impl FromBits<u128> for Status
impl FromBits<u128> for Status
source§impl FromBits<u16> for Status
impl FromBits<u16> for Status
source§impl FromBits<u32> for Status
impl FromBits<u32> for Status
source§impl FromBits<u64> for Status
impl FromBits<u64> for Status
source§impl FromBits<u8> for Status
impl FromBits<u8> for Status
source§impl FromBits<usize> for Status
impl FromBits<usize> for Status
impl Copy for Status
impl Eq for Status
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)