pub struct Lpi2c { /* private fields */ }Expand description
Low-Power Inter-Integrated Circuit.
Implementations§
Source§impl Lpi2c
impl Lpi2c
pub const unsafe fn from_ptr(ptr: *mut ()) -> Self
pub const fn as_ptr(&self) -> *mut ()
Sourcepub const fn param(self) -> Reg<NParam, R>
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.
Sourcepub const fn mcr(self) -> Reg<Mcr, RW>
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.
Sourcepub const fn msr(self) -> Reg<NMsr, RW>
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.
Sourcepub const fn mcfgr0(self) -> Reg<Mcfgr0, RW>
pub const fn mcfgr0(self) -> Reg<Mcfgr0, RW>
Controller Configuration 0. Do not change HRSEL or HRPOL while host request is enabled.
Sourcepub const fn mcfgr1(self) -> Reg<Mcfgr1, RW>
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.
Sourcepub const fn mcfgr2(self) -> Reg<Mcfgr2, RW>
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.
Sourcepub const fn mcfgr3(self) -> Reg<Mcfgr3, RW>
pub const fn mcfgr3(self) -> Reg<Mcfgr3, RW>
Controller Configuration 3. Write only with controller disabled.
Sourcepub const fn mdmr(self) -> Reg<Mdmr, RW>
pub const fn mdmr(self) -> Reg<Mdmr, RW>
Controller Data Match. Write only with controller disabled or idle.
Sourcepub const fn mccr0(self) -> Reg<Mccr0, RW>
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.
Sourcepub const fn mccr1(self) -> Reg<Mccr0, RW>
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.
Sourcepub const fn mtdr(self) -> Reg<Mtdr, W>
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.
Sourcepub const fn mrdr(self) -> Reg<NMrdr, R>
pub const fn mrdr(self) -> Reg<NMrdr, R>
Controller Receive Data. Reads pull the first entry from the receive FIFO.
Sourcepub const fn mrdror(self) -> Reg<NMrdror, R>
pub const fn mrdror(self) -> Reg<NMrdror, R>
Controller Receive Data Read Only. Returns the first entry without pulling it from the FIFO.
Sourcepub const fn scr(self) -> Reg<Scr, RW>
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.
Sourcepub const fn ssr(self) -> Reg<NSsr, RW>
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.
Sourcepub const fn scfgr0(self) -> Reg<Scfgr0, RW>
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.
Sourcepub const fn scfgr1(self) -> Reg<Scfgr1, RW>
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.
Sourcepub const fn scfgr2(self) -> Reg<Scfgr2, RW>
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.
Sourcepub const fn samr(self) -> Reg<Samr, RW>
pub const fn samr(self) -> Reg<Samr, RW>
Target Address Match. Write only with target disabled.
Sourcepub const fn sasr(self) -> Reg<NSasr, R>
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.
Sourcepub const fn star(self) -> Reg<Star, RW>
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.
Sourcepub const fn stdr(self) -> Reg<Stdr, W>
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.
Sourcepub const fn srdr(self) -> Reg<NSrdr, R>
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.
Sourcepub const fn srdror(self) -> Reg<NSrdror, R>
pub const fn srdror(self) -> Reg<NSrdror, R>
Target Receive Data Read Only. Returns received data without pulling it from the receive register.
Sourcepub const fn mtcbr(self, n: usize) -> Reg<Mtdr, W>
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.
Sourcepub const fn mtdbr(self, n: usize) -> Reg<Mtdbr, W>
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.