nxp-pac

Crates

git

Versions

mcxn556

Flavors

Lpuart

Struct Lpuart 

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

LPUART.

Implementations§

Source§

impl Lpuart

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. Documented reset, not a live capability probe.

Source

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

Parameter. The transmit and receive FIFOs each contain eight entries; burst address windows are aliases, not FIFO depth.

Source

pub const fn global(self) -> Reg<Global, RW>

Global. RST holds all LPUART logic/registers except GLOBAL in reset until software clears it; no minimum delay is required before clearing. This is not a wrapper mode or clock control.

Source

pub const fn pincfg(self) -> Reg<Pincfg, RW>

Pin Configuration. Change TRGSEL only with transmitter and receiver disabled. The raw trigger selector does not establish chip routing.

Source

pub const fn baud(self) -> Reg<NBaud, RW>

Baud Rate. Change configuration only with transmitter and receiver disabled. OSR encodings 1 and 2 are reserved; OSR 3..6 requires BOTHEDGE.

Source

pub const fn stat(self) -> Reg<NStat, RW>

Status. MSF/TSF and RDRF/TC/TDRE/RAF are read-only. MA2F/MA1F/PF/FE/NF/OR/IDLE/RXEDGIF/LBKDIF are write-one-to-clear; avoid read-modify-write. Some flags also participate in DATA access clearing sequences. Change MSBF/AME/LBKFE only with both directions disabled, RXINV/RWUID with receiver disabled, and BRK13 with transmitter disabled. On affected masks ERR051629 can prevent TC from asserting after flushing TX FIFO with CTS negated and TXCTSE set; no workaround is implemented here.

Source

pub const fn ctrl(self) -> Reg<Ctrl, RW>

Control. Bit6 is reserved in both detailed N manuals, despite N23 XML exposing DOZEEN. Change M/M7/PE/ILT/RSRC/LOOPS configuration only with transmitter and receiver disabled as specified by the field descriptions. R9T8/R8T9 read receive bits but write transmit bits; read-modify-write does not preserve the transmit value. Enabling TE can queue an idle preamble; RE/TE may remain set until the current character finishes after disable.

Source

pub const fn data(self) -> Reg<NData, RW>

Data. Reads pop the receive FIFO and participate in automatic status-flag clearing; writes push the transmit FIFO. These are distinct read/write views, not ordinary storage; do not read-modify-write. Receive-only status bits must not be interpreted as transmit commands. FRETSC writes select a special character with T9 and require T8..T0 zero.

Source

pub const fn match_(self) -> Reg<Match, RW>

Match Address. Write MA1/MA2 only while the corresponding BAUD.MAEN1/MAEN2 is disabled.

Source

pub const fn modir(self) -> Reg<NModir, RW>

MODEM IrDA. Change RTSWATER/RXRTSE with receiver disabled, TXRTSE/TXRTSPOL with transmitter disabled, and TNP/IREN with both disabled. Do not enable RXRTSE and TXRTSE together.

Source

pub const fn fifo(self) -> Reg<NFifo, RW>

FIFO. RXFIFOSIZE/TXFIFOSIZE/RXEMPT/TXEMPT are read-only; RXUF/TXOF are write-one-to-clear; RXFLUSH/TXFLUSH are flush commands. Avoid read-modify-write. The register description requires writes with CTRL.RE/TE zero and FIFO empty; FIFO operations also have specific command/flag semantics.

Source

pub const fn water(self) -> Reg<NWater, RW>

Watermark. TXCOUNT and RXCOUNT are read-only. Write only with CTRL.TE zero.

Source

pub const fn dataro(self) -> Reg<NDataro, R>

Data Read-Only. Returns DATA without removing the receive FIFO entry.

Source

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

MODEM Control.

Source

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

MODEM Status. Delta flags are write-one-to-clear; pin-state bits are read-only. Pad configuration affects observed reset values; the generated default is the documented reset, not sampled pin state. Do not read-modify-write.

Source

pub const fn reir(self) -> Reg<Reir, RW>

Receiver Extended Idle. Change only with receiver disabled; zero disables extended idle and the minimum enabled interval is one idle character.

Source

pub const fn teir(self) -> Reg<Teir, RW>

Transmitter Extended Idle. Change only with transmitter disabled; zero disables extended idle and the minimum enabled interval is one idle character.

Source

pub const fn hdcr(self) -> Reg<Hdcr, RW>

Half Duplex Control. Raw controls, not a mode or pin-ownership operation.

Source

pub const fn tocr(self) -> Reg<Tocr, RW>

Timeout Control. Counters 0/1 monitor the receiver; 2/3 monitor the transmitter.

Source

pub const fn tosr(self) -> Reg<Tosr, RW>

Timeout Status. TOZ is read-only; each TOF bit is write-one-to-clear and disables its counter when set. Do not read-modify-write.

Source

pub const fn timeout(self, n: usize) -> Reg<Timeout, RW>

Timeout N. Write only when the corresponding timeout is disabled or its timeout flag is set. Counters 0/1 monitor receive; 2/3 monitor transmit.

Source

pub const fn tcbr(self, n: usize) -> Reg<Tcbr, W>

Transmit Command Burst aliases of DATA, not independent storage. A 32-bit or low-halfword write pushes one FIFO entry; a low-byte write stages data until the high byte is written. Upper-halfword byte/halfword writes are ignored. The field payload is 16 bits but register access remains 32 bits.

Source

pub const fn tdbr(self, n: usize) -> Reg<Tdbr, W>

Transmit Data Burst aliases of DATA, not independent storage or 256 FIFO entries. A word pushes four bytes DATA0 first, with three wait states; a halfword pushes two bytes with one wait state. Bytes use CTRL R8T9/R9T8 for upper data bits and zero-extend FRETSC. UART/SPI views overlap physically; selection is external to this model.

Trait Implementations§

Source§

impl Clone for Lpuart

Source§

fn clone(&self) -> Lpuart

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 Lpuart

Source§

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

Source§

impl Eq for Lpuart

Source§

impl Send for Lpuart

Source§

impl StructuralPartialEq for Lpuart

Source§

impl Sync for Lpuart

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.