nxp-pac

Crates

git

Versions

mcxn235

Flavors

Lpi2c

Struct Lpi2c 

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

Low-Power Inter-Integrated Circuit.

Implementations§

Source§

impl Lpi2c

Source

pub const unsafe fn from_ptr(ptr: *mut ()) -> Self

Source

pub const fn as_ptr(&self) -> *mut ()

Source

pub const fn verid(self) -> Reg<NVerid, R>

Version ID.

Source

pub const fn param(self) -> Reg<NParam, R>

Parameter. Controller transmit and receive FIFOs each contain eight entries; burst windows do not describe FIFO depth.

Source

pub const fn mcr(self) -> Reg<Mcr, RW>

Controller Control. RTF/RRF are write-only FIFO reset commands and read zero. RST holds controller logic/registers except MCR in reset until software clears it. These controls do not select wrapper mode or enable the peripheral clock.

Source

pub const fn msr(self) -> Reg<NMsr, RW>

Controller Status. TDF/RDF/MBF/BBF are read-only; EPF/SDF/NDF/ALF/FEF/PLTF/DMF/STF are write-one-to-clear. Do not read-modify-write.

Source

pub const fn mier(self) -> Reg<Mier, RW>

Controller Interrupt Enable.

Source

pub const fn mder(self) -> Reg<Mder, RW>

Controller DMA Enable.

Source

pub const fn mcfgr0(self) -> Reg<Mcfgr0, RW>

Controller Configuration 0. Do not change HRSEL or HRPOL while host request is enabled.

Source

pub const fn mcfgr1(self) -> Reg<Mcfgr1, RW>

Controller Configuration 1. Write only with controller disabled. MATCFG encoding 1 is reserved. PINCFG names describe generic routing, not chip pin availability or HS controller support.

Source

pub const fn mcfgr2(self) -> Reg<Mcfgr2, RW>

Controller Configuration 2. Write only with controller disabled; filter timing uses functional clock cycles, not the prescaled clock.

Source

pub const fn mcfgr3(self) -> Reg<Mcfgr3, RW>

Controller Configuration 3. Write only with controller disabled.

Source

pub const fn mdmr(self) -> Reg<Mdmr, RW>

Controller Data Match. Write only with controller disabled or idle.

Source

pub const fn mccr0(self) -> Reg<Mccr0, RW>

Controller Clock Configuration 0. Change only with controller disabled. Raw clock counts, not a bus frequency or electrical timing guarantee.

Source

pub const fn mccr1(self) -> Reg<Mccr0, RW>

Controller Clock Configuration 1. Change only with controller disabled. The generic HS timing register does not establish chip-level HS controller support.

Source

pub const fn mfcr(self) -> Reg<NMfcr, RW>

Controller FIFO Control.

Source

pub const fn mfsr(self) -> Reg<NMfsr, R>

Controller FIFO Status.

Source

pub const fn mtdr(self) -> Reg<Mtdr, W>

Controller Transmit Data. Writes push command/data into the FIFO. Byte writes to CMD are ignored; byte writes to DATA zero-extend CMD. Command encodings do not establish chip-level HS controller support; the feature list documents HS target support only.

Source

pub const fn mrdr(self) -> Reg<NMrdr, R>

Controller Receive Data. Reads pull the first entry from the receive FIFO.

Source

pub const fn mrdror(self) -> Reg<NMrdror, R>

Controller Receive Data Read Only. Returns the first entry without pulling it from the FIFO.

Source

pub const fn scr(self) -> Reg<Scr, RW>

Target Control. RTF/RRF are write-only reset commands and read zero. RST holds target logic/registers except SCR in reset until software clears it. Update FILTEN/FILTDZ only with target disabled.

Source

pub const fn ssr(self) -> Reg<NSsr, RW>

Target Status. Only RSF/SDF/BEF/FEF are write-one-to-clear; all other fields are read-only. SASR reads clear AVF/AM0F/AM1F/GCF/SARF, STAR writes clear TAF, STDR writes clear TDF, and SRDR reads clear RDF or AVF according to RXCFG. Do not read-modify-write. On masks covered by ERR053287, target mode can incorrectly count SCL and unexpectedly NAK valid data or addresses; target mode is not recommended for production and there is no workaround.

Source

pub const fn sier(self) -> Reg<Sier, RW>

Target Interrupt Enable.

Source

pub const fn sder(self) -> Reg<Sder, RW>

Target DMA Enable.

Source

pub const fn scfgr0(self) -> Reg<Scfgr0, RW>

Target Configuration 0. RDACK is read-only. RDREQ issues a target read request only while the bus is idle; writes while busy may be ignored, so confirm acknowledgement before initiating controller transfer.

Source

pub const fn scfgr1(self) -> Reg<Scfgr1, RW>

Target Configuration 1. Write only with target disabled. RXCFG/TXCFG refer to target SSR flags; MSR references in the generic encoding prose are inconsistent with the detailed SSR behavior.

Source

pub const fn scfgr2(self) -> Reg<Scfgr2, RW>

Target Configuration 2. Write only with target disabled. Filter/delay counts are not affected by MCFGR1.PRESCALE and are disabled in HS mode.

Source

pub const fn samr(self) -> Reg<Samr, RW>

Target Address Match. Write only with target disabled.

Source

pub const fn sasr(self) -> Reg<NSasr, R>

Target Address Status. Read only when SSR.AVF is set. Reading acknowledges the address and clears SSR.AVF/AM0F/AM1F/GCF/SARF; SRDR can return this view when RXCFG selects it.

Source

pub const fn star(self) -> Reg<Star, RW>

Target Transmit ACK. Function prose restricts writes to ACKSTALL=1; the field table also permits default ACK/NACK configuration while target is disabled or idle. During ACKSTALL transfers, write once per matching address/received word; this releases the ACK clock stall and clears SSR.TAF. The raw view does not resolve the differing write restrictions.

Source

pub const fn stdr(self) -> Reg<Stdr, W>

Target Transmit Data. Write only when SSR.TDF is set. Writes clear TDF and release a TXDSTALL clock stall. Without TXDSTALL, data must be ready before the target-transmit transfer starts or SSR.FEF is set.

Source

pub const fn srdr(self) -> Reg<NSrdr, R>

Target Receive Data. Read only when SSR.RDF is set, or when SSR.AVF is set and RXCFG is one. Read clears SSR.RDF or returns SASR and acknowledges the address according to SCFGR1.RXCFG. Not ordinary storage.

Source

pub const fn srdror(self) -> Reg<NSrdror, R>

Target Receive Data Read Only. Returns received data without pulling it from the receive register.

Source

pub const fn mtcbr(self, n: usize) -> Reg<Mtdr, W>

Controller Transmit Command Burst aliases of MTDR, not independent storage. A word or low-halfword write pushes one command/data entry. Unlike MTDR byte accesses, a low-byte write stages DATA without pushing; a high-byte write pushes CMD with the previously staged DATA. Upper-halfword byte/halfword writes are ignored. Access width remains 32 bits despite the 11-bit payload.

Source

pub const fn mtdbr(self, n: usize) -> Reg<Mtdbr, W>

Transmit Data Burst aliases of MTDR, not independent storage. The documented map ends at MTDBR252 (0x7F0), despite generic 1024-byte wording. Word/halfword writes push four/two bytes DATA0 first with zero CMD; ensure four/two empty FIFO slots because overflow prevention does not signal an error. This view is at the LPI2C mode base, 0x800 above its wrapper base.

Trait Implementations§

Source§

impl Clone for Lpi2c

Source§

fn clone(&self) -> Lpi2c

Returns a duplicate 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 PartialEq for Lpi2c

Source§

fn eq(&self, other: &Lpi2c) -> 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 Copy for Lpi2c

Source§

impl Eq for Lpi2c

Source§

impl Send for Lpi2c

Source§

impl StructuralPartialEq for Lpi2c

Source§

impl Sync for Lpi2c

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<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.