Struct esp32s2::i2c0::sr::R

source · []
pub struct R(_);
Expand description

Register SR reader

Implementations

Bit 0 - The received ACK value in master mode or slave mode. 0: ACK. 1: NACK.

Bit 1 - When in slave mode, 1: master reads from slave. 0: master writes to slave.

Bit 2 - When the I2C controller takes more than I2C_TIME_OUT clocks to receive a data bit, this field changes to 1.

Bit 3 - When the I2C controller loses control of SCL line, this register changes to 1.

Bit 4 - 1: the I2C bus is busy transferring data. 0: the I2C bus is in idle state.

Bit 5 - When configured as an I2C Slave, and the address sent by the master is equal to the address of the slave, then this bit will be of high level.

Bit 6 - This field changes to 1 when one byte is transferred.

Bits 8:13 - This field represents the amount of data needed to be sent.

Bits 14:15 - The cause of stretching SCL low in slave mode. 0: stretching SCL low at the beginning of I2C read data state. 1: stretching SCL low when I2C TX FIFO is empty in slave mode. 2: stretching SCL low when I2C RX FIFO is full in slave mode.

Bits 18:23 - This field stores the amount of received data in RAM.

Bits 24:26 - This field indicates the states of the I2C module state machine. 0: Idle. 1: Address shift. 2: ACK address. 3: RX data. 4: TX data. 5: Send ACK. 6: Wait ACK

Bits 28:30 - This field indicates the states of the state machine used to produce SCL. 0: Idle. 1: Start. 2: Negative edge. 3: Low. 4: Positive edge. 5: High. 6: Stop

Methods from Deref<Target = R<SR_SPEC>>

Reads raw bits from register.

Trait Implementations

The resulting type after dereferencing.
Dereferences the value.
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.