pub struct Lpspi { /* private fields */ }Expand description
Low-Power Serial Peripheral Interface.
Implementations§
Source§impl Lpspi
impl Lpspi
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. Transmit/command and receive FIFOs each contain eight entries; burst address-window lengths are not FIFO depth.
Sourcepub const fn cr(self) -> Reg<Cr, RW>
pub const fn cr(self) -> Reg<Cr, RW>
Control. RTF/RRF are write-only FIFO reset commands and read zero. RST holds logic/registers except CR in reset until software clears it. Change DBGEN only with MEN zero. Wrapper mode and clocks are separate controls.
Sourcepub const fn sr(self) -> Reg<NSr, RW>
pub const fn sr(self) -> Reg<NSr, RW>
Status. TDF/RDF/MBF are read-only; WCF/FCF/TCF/TEF/REF/DMF are write-one-to-clear. Do not read-modify-write. On affected masks ERR051588 requires transmit FIFO reset after peripheral-mode underrun; no workaround is implemented here.
Sourcepub const fn cfgr0(self) -> Reg<Cfgr0, RW>
pub const fn cfgr0(self) -> Reg<Cfgr0, RW>
Configuration 0. Enable RDMO only when idle and SR.DMF is zero; clear RDMO before clearing DMF to avoid losing receive data.
Sourcepub const fn cfgr1(self) -> Reg<Cfgr1, RW>
pub const fn cfgr1(self) -> Reg<Cfgr1, RW>
Configuration 1. Write only with module disabled. MATCFG encoding 1 is reserved and transitions between nonzero match configurations require an intervening zero. PCSPOL is a per-PCS polarity mask, not a single polarity selector. Generic pin/PCS options do not establish chip pin routing.
Sourcepub const fn ccr(self) -> Reg<Ccr, RW>
pub const fn ccr(self) -> Reg<Ccr, RW>
Clock Configuration. Change only when CR.MEN is zero. SCKDIV and DBT read zero and writes update CCR1 timing fields; a 32-bit write overwrites CCR1. Use the documented byte/halfword sequence when preserving CCR1 fields; do not read-modify-write this alias as independent storage.
Sourcepub const fn ccr1(self) -> Reg<Ccr1, RW>
pub const fn ccr1(self) -> Reg<Ccr1, RW>
Clock Configuration 1. Controller-mode timing; change only when CR.MEN is zero. Also updated by writes through CCR.SCKDIV and CCR.DBT.
Sourcepub const fn tcr(self) -> Reg<NTcr, RW>
pub const fn tcr(self) -> Reg<NTcr, RW>
Transmit Command. Only 32-bit writes are supported and enqueue command words into the transmit FIFO, not ordinary storage. In peripheral mode, change only while idle with no SPI bus transfer. CPOL/CPHA/PRESCALE/PCS update only with PCS deasserted. Reads can be incorrect while the command loads from the FIFO; read when the FIFO is empty or compare repeated reads. Avoid read-modify-write and FIFO reset before the command updates. WIDTH encoding 3 is reserved.
Sourcepub const fn rdr(self) -> Reg<Rdr, R>
pub const fn rdr(self) -> Reg<Rdr, R>
Receive Data. Reads pull the first entry from the receive FIFO.
Sourcepub const fn rdror(self) -> Reg<Rdr, R>
pub const fn rdror(self) -> Reg<Rdr, R>
Receive Data Read Only. Returns the first FIFO entry without removing it.
Sourcepub const fn tcbr(self) -> Reg<Tcbr, W>
pub const fn tcbr(self) -> Reg<Tcbr, W>
Transmit Command Burst alias of TCR for DMA command writes; not independent storage.