Struct esp32c6::lp_i2c0::i2c_sr::R

source ·
pub struct R(_);
Expand description

Register I2C_SR reader

Implementations§

source§

impl R

source

pub fn i2c_resp_rec(&self) -> I2C_RESP_REC_R

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

source

pub fn i2c_arb_lost(&self) -> I2C_ARB_LOST_R

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

source

pub fn i2c_bus_busy(&self) -> I2C_BUS_BUSY_R

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

source

pub fn i2c_rxfifo_cnt(&self) -> I2C_RXFIFO_CNT_R

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

source

pub fn i2c_txfifo_cnt(&self) -> I2C_TXFIFO_CNT_R

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

source

pub fn i2c_scl_main_state_last(&self) -> I2C_SCL_MAIN_STATE_LAST_R

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

source

pub fn i2c_scl_state_last(&self) -> I2C_SCL_STATE_LAST_R

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<I2C_SR_SPEC>>§

source

pub fn bits(&self) -> REG::Ux

Reads raw bits from register.

Trait Implementations§

source§

impl Deref for R

§

type Target = R<I2C_SR_SPEC>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl From<R<I2C_SR_SPEC>> for R

source§

fn from(reader: R<I2C_SR_SPEC>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl RefUnwindSafe for R

§

impl Send for R

§

impl Sync for R

§

impl Unpin for R

§

impl UnwindSafe for R

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, 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.