esp_hal::peripherals

Struct LP_I2C0

Source
pub struct LP_I2C0 { /* private fields */ }
Expand description

Represents a virtual peripheral with no associated hardware.

This struct is generated by the create_peripheral! macro when the peripheral is defined as virtual.

Implementations§

Source§

impl LP_I2C0

Source

pub unsafe fn steal() -> Self

Unsafely create an instance of this peripheral out of thin air.

§Safety

You must ensure that you’re only using one instance of this type at a time.

Source§

impl LP_I2C0

Source

pub const PTR: *const <LP_I2C0 as Deref>::Target = {0x600b1800 as *const <esp32c6::LP_I2C0 as core::ops::Deref>::Target}

Pointer to the register block

Source

pub const fn ptr() -> *const <LP_I2C0 as Deref>::Target

Return the pointer to the register block

Methods from Deref<Target = RegisterBlock>§

Source

pub fn scl_low_period(&self) -> &Reg<SCL_LOW_PERIOD_SPEC>

0x00 - Configures the low level width of the SCL Clock

Source

pub fn ctr(&self) -> &Reg<CTR_SPEC>

0x04 - Transmission setting

Source

pub fn sr(&self) -> &Reg<SR_SPEC>

0x08 - Describe I2C work status.

Source

pub fn to(&self) -> &Reg<TO_SPEC>

0x0c - Setting time out control for receiving data.

Source

pub fn fifo_st(&self) -> &Reg<FIFO_ST_SPEC>

0x14 - FIFO status register.

Source

pub fn fifo_conf(&self) -> &Reg<FIFO_CONF_SPEC>

0x18 - FIFO configuration register.

Source

pub fn data(&self) -> &Reg<DATA_SPEC>

0x1c - Rx FIFO read data.

Source

pub fn int_raw(&self) -> &Reg<INT_RAW_SPEC>

0x20 - Raw interrupt status

Source

pub fn int_clr(&self) -> &Reg<INT_CLR_SPEC>

0x24 - Interrupt clear bits

Source

pub fn int_ena(&self) -> &Reg<INT_ENA_SPEC>

0x28 - Interrupt enable bits

Source

pub fn int_st(&self) -> &Reg<INT_ST_SPEC>

0x2c - Status of captured I2C communication events

Source

pub fn sda_hold(&self) -> &Reg<SDA_HOLD_SPEC>

0x30 - Configures the hold time after a negative SCL edge.

Source

pub fn sda_sample(&self) -> &Reg<SDA_SAMPLE_SPEC>

0x34 - Configures the sample time after a positive SCL edge.

Source

pub fn scl_high_period(&self) -> &Reg<SCL_HIGH_PERIOD_SPEC>

0x38 - Configures the high level width of SCL

Source

pub fn scl_start_hold(&self) -> &Reg<SCL_START_HOLD_SPEC>

0x40 - Configures the delay between the SDA and SCL negative edge for a start condition

Source

pub fn scl_rstart_setup(&self) -> &Reg<SCL_RSTART_SETUP_SPEC>

0x44 - Configures the delay between the positive edge of SCL and the negative edge of SDA

Source

pub fn scl_stop_hold(&self) -> &Reg<SCL_STOP_HOLD_SPEC>

0x48 - Configures the delay after the SCL clock edge for a stop condition

Source

pub fn scl_stop_setup(&self) -> &Reg<SCL_STOP_SETUP_SPEC>

0x4c - Configures the delay between the SDA and SCL positive edge for a stop condition

Source

pub fn filter_cfg(&self) -> &Reg<FILTER_CFG_SPEC>

0x50 - SCL and SDA filter configuration register

Source

pub fn clk_conf(&self) -> &Reg<CLK_CONF_SPEC>

0x54 - I2C CLK configuration register

Source

pub fn comd(&self, n: usize) -> &Reg<COMD_SPEC>

0x58..0x78 - I2C command register %s

Source

pub fn comd_iter(&self) -> impl Iterator<Item = &Reg<COMD_SPEC>>

Iterator for array of: 0x58..0x78 - I2C command register %s

Source

pub fn scl_st_time_out(&self) -> &Reg<SCL_ST_TIME_OUT_SPEC>

0x78 - SCL status time out register

Source

pub fn scl_main_st_time_out(&self) -> &Reg<SCL_MAIN_ST_TIME_OUT_SPEC>

0x7c - SCL main status time out register

Source

pub fn scl_sp_conf(&self) -> &Reg<SCL_SP_CONF_SPEC>

0x80 - Power configuration register

Source

pub fn date(&self) -> &Reg<DATE_SPEC>

0xf8 - Version register

Source

pub fn txfifo_start_addr(&self) -> &Reg<TXFIFO_START_ADDR_SPEC>

0x100 - I2C TXFIFO base address register

Source

pub fn rxfifo_start_addr(&self) -> &Reg<RXFIFO_START_ADDR_SPEC>

0x180 - I2C RXFIFO base address register

Trait Implementations§

Source§

impl Debug for LP_I2C0

Source§

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

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

impl Deref for LP_I2C0

Source§

type Target = <LP_I2C0 as Deref>::Target

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl DerefMut for LP_I2C0

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl Peripheral for LP_I2C0

Source§

type P = LP_I2C0

Peripheral singleton type
Source§

unsafe fn clone_unchecked(&self) -> Self::P

Unsafely clone (duplicate) a peripheral singleton. Read more
Source§

fn into_ref<'a>(self) -> PeripheralRef<'a, Self::P>
where Self: 'a,

Convert a value into a PeripheralRef. Read more
Source§

fn map_into<U>(self) -> U
where Self::P: Into<U>, U: Peripheral<P = U>,

Map the peripheral using Into. Read more

Auto Trait Implementations§

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> 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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

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

Source§

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.