#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { _reserved_0_cr: [u8; 0x04], _reserved_1_mr: [u8; 0x04], _reserved_2_ier: [u8; 0x04], _reserved_3_idr: [u8; 0x04], _reserved_4_imr: [u8; 0x04], _reserved_5_csr: [u8; 0x04], #[doc = "0x18 - Receive Holding Register"] pub rhr: RHR, #[doc = "0x1c - Transmit Holding Register"] pub thr: THR, #[doc = "0x20 - Baud Rate Generator Register"] pub brgr: BRGR, #[doc = "0x24 - Receiver Time-out Register"] pub rtor: RTOR, #[doc = "0x28 - Transmitter Timeguard Register"] pub ttgr: TTGR, _reserved11: [u8; 0x14], #[doc = "0x40 - FI DI Ratio Register"] pub fidi: FIDI, #[doc = "0x44 - Number of Errors Register"] pub ner: NER, _reserved13: [u8; 0x04], #[doc = "0x4c - IrDA Filter Register"] pub if_: IF, #[doc = "0x50 - Manchester Configuration Register"] pub man: MAN, _reserved15: [u8; 0x90], #[doc = "0xe4 - Write Protection Mode Register"] pub wpmr: WPMR, #[doc = "0xe8 - Write Protection Status Register"] pub wpsr: WPSR, _reserved17: [u8; 0x14], #[doc = "0x100 - Receive Pointer Register"] pub rpr: RPR, #[doc = "0x104 - Receive Counter Register"] pub rcr: RCR, #[doc = "0x108 - Transmit Pointer Register"] pub tpr: TPR, #[doc = "0x10c - Transmit Counter Register"] pub tcr: TCR, #[doc = "0x110 - Receive Next Pointer Register"] pub rnpr: RNPR, #[doc = "0x114 - Receive Next Counter Register"] pub rncr: RNCR, #[doc = "0x118 - Transmit Next Pointer Register"] pub tnpr: TNPR, #[doc = "0x11c - Transmit Next Counter Register"] pub tncr: TNCR, #[doc = "0x120 - Transfer Control Register"] pub ptcr: PTCR, #[doc = "0x124 - Transfer Status Register"] pub ptsr: PTSR, } impl RegisterBlock { #[doc = "0x00 - Control Register"] #[inline(always)] pub const fn spi_mode_cr_spi_mode(&self) -> &SPI_MODE_CR_SPI_MODE { unsafe { &*(self as *const Self).cast::().add(0usize).cast() } } #[doc = "0x00 - Control Register"] #[inline(always)] pub const fn cr(&self) -> &CR { unsafe { &*(self as *const Self).cast::().add(0usize).cast() } } #[doc = "0x04 - Mode Register"] #[inline(always)] pub const fn spi_mode_mr_spi_mode(&self) -> &SPI_MODE_MR_SPI_MODE { unsafe { &*(self as *const Self).cast::().add(4usize).cast() } } #[doc = "0x04 - Mode Register"] #[inline(always)] pub const fn mr(&self) -> &MR { unsafe { &*(self as *const Self).cast::().add(4usize).cast() } } #[doc = "0x08 - Interrupt Enable Register"] #[inline(always)] pub const fn spi_mode_ier_spi_mode(&self) -> &SPI_MODE_IER_SPI_MODE { unsafe { &*(self as *const Self).cast::().add(8usize).cast() } } #[doc = "0x08 - Interrupt Enable Register"] #[inline(always)] pub const fn ier(&self) -> &IER { unsafe { &*(self as *const Self).cast::().add(8usize).cast() } } #[doc = "0x0c - Interrupt Disable Register"] #[inline(always)] pub const fn spi_mode_idr_spi_mode(&self) -> &SPI_MODE_IDR_SPI_MODE { unsafe { &*(self as *const Self).cast::().add(12usize).cast() } } #[doc = "0x0c - Interrupt Disable Register"] #[inline(always)] pub const fn idr(&self) -> &IDR { unsafe { &*(self as *const Self).cast::().add(12usize).cast() } } #[doc = "0x10 - Interrupt Mask Register"] #[inline(always)] pub const fn spi_mode_imr_spi_mode(&self) -> &SPI_MODE_IMR_SPI_MODE { unsafe { &*(self as *const Self).cast::().add(16usize).cast() } } #[doc = "0x10 - Interrupt Mask Register"] #[inline(always)] pub const fn imr(&self) -> &IMR { unsafe { &*(self as *const Self).cast::().add(16usize).cast() } } #[doc = "0x14 - Channel Status Register"] #[inline(always)] pub const fn spi_mode_csr_spi_mode(&self) -> &SPI_MODE_CSR_SPI_MODE { unsafe { &*(self as *const Self).cast::().add(20usize).cast() } } #[doc = "0x14 - Channel Status Register"] #[inline(always)] pub const fn csr(&self) -> &CSR { unsafe { &*(self as *const Self).cast::().add(20usize).cast() } } } #[doc = "CR (w) register accessor: an alias for `Reg`"] pub type CR = crate::Reg; #[doc = "Control Register"] pub mod cr; #[doc = "SPI_MODE_CR_SPI_MODE (w) register accessor: an alias for `Reg`"] pub type SPI_MODE_CR_SPI_MODE = crate::Reg; #[doc = "Control Register"] pub mod spi_mode_cr_spi_mode; #[doc = "MR (rw) register accessor: an alias for `Reg`"] pub type MR = crate::Reg; #[doc = "Mode Register"] pub mod mr; #[doc = "SPI_MODE_MR_SPI_MODE (rw) register accessor: an alias for `Reg`"] pub type SPI_MODE_MR_SPI_MODE = crate::Reg; #[doc = "Mode Register"] pub mod spi_mode_mr_spi_mode; #[doc = "IER (w) register accessor: an alias for `Reg`"] pub type IER = crate::Reg; #[doc = "Interrupt Enable Register"] pub mod ier; #[doc = "SPI_MODE_IER_SPI_MODE (w) register accessor: an alias for `Reg`"] pub type SPI_MODE_IER_SPI_MODE = crate::Reg; #[doc = "Interrupt Enable Register"] pub mod spi_mode_ier_spi_mode; #[doc = "IDR (w) register accessor: an alias for `Reg`"] pub type IDR = crate::Reg; #[doc = "Interrupt Disable Register"] pub mod idr; #[doc = "SPI_MODE_IDR_SPI_MODE (w) register accessor: an alias for `Reg`"] pub type SPI_MODE_IDR_SPI_MODE = crate::Reg; #[doc = "Interrupt Disable Register"] pub mod spi_mode_idr_spi_mode; #[doc = "IMR (r) register accessor: an alias for `Reg`"] pub type IMR = crate::Reg; #[doc = "Interrupt Mask Register"] pub mod imr; #[doc = "SPI_MODE_IMR_SPI_MODE (r) register accessor: an alias for `Reg`"] pub type SPI_MODE_IMR_SPI_MODE = crate::Reg; #[doc = "Interrupt Mask Register"] pub mod spi_mode_imr_spi_mode; #[doc = "CSR (r) register accessor: an alias for `Reg`"] pub type CSR = crate::Reg; #[doc = "Channel Status Register"] pub mod csr; #[doc = "SPI_MODE_CSR_SPI_MODE (r) register accessor: an alias for `Reg`"] pub type SPI_MODE_CSR_SPI_MODE = crate::Reg; #[doc = "Channel Status Register"] pub mod spi_mode_csr_spi_mode; #[doc = "RHR (r) register accessor: an alias for `Reg`"] pub type RHR = crate::Reg; #[doc = "Receive Holding Register"] pub mod rhr; #[doc = "THR (w) register accessor: an alias for `Reg`"] pub type THR = crate::Reg; #[doc = "Transmit Holding Register"] pub mod thr; #[doc = "BRGR (rw) register accessor: an alias for `Reg`"] pub type BRGR = crate::Reg; #[doc = "Baud Rate Generator Register"] pub mod brgr; #[doc = "RTOR (rw) register accessor: an alias for `Reg`"] pub type RTOR = crate::Reg; #[doc = "Receiver Time-out Register"] pub mod rtor; #[doc = "TTGR (rw) register accessor: an alias for `Reg`"] pub type TTGR = crate::Reg; #[doc = "Transmitter Timeguard Register"] pub mod ttgr; #[doc = "FIDI (rw) register accessor: an alias for `Reg`"] pub type FIDI = crate::Reg; #[doc = "FI DI Ratio Register"] pub mod fidi; #[doc = "NER (r) register accessor: an alias for `Reg`"] pub type NER = crate::Reg; #[doc = "Number of Errors Register"] pub mod ner; #[doc = "IF (rw) register accessor: an alias for `Reg`"] pub type IF = crate::Reg; #[doc = "IrDA Filter Register"] pub mod if_; #[doc = "MAN (rw) register accessor: an alias for `Reg`"] pub type MAN = crate::Reg; #[doc = "Manchester Configuration Register"] pub mod man; #[doc = "WPMR (rw) register accessor: an alias for `Reg`"] pub type WPMR = crate::Reg; #[doc = "Write Protection Mode Register"] pub mod wpmr; #[doc = "WPSR (r) register accessor: an alias for `Reg`"] pub type WPSR = crate::Reg; #[doc = "Write Protection Status Register"] pub mod wpsr; #[doc = "RPR (rw) register accessor: an alias for `Reg`"] pub type RPR = crate::Reg; #[doc = "Receive Pointer Register"] pub mod rpr; #[doc = "RCR (rw) register accessor: an alias for `Reg`"] pub type RCR = crate::Reg; #[doc = "Receive Counter Register"] pub mod rcr; #[doc = "TPR (rw) register accessor: an alias for `Reg`"] pub type TPR = crate::Reg; #[doc = "Transmit Pointer Register"] pub mod tpr; #[doc = "TCR (rw) register accessor: an alias for `Reg`"] pub type TCR = crate::Reg; #[doc = "Transmit Counter Register"] pub mod tcr; #[doc = "RNPR (rw) register accessor: an alias for `Reg`"] pub type RNPR = crate::Reg; #[doc = "Receive Next Pointer Register"] pub mod rnpr; #[doc = "RNCR (rw) register accessor: an alias for `Reg`"] pub type RNCR = crate::Reg; #[doc = "Receive Next Counter Register"] pub mod rncr; #[doc = "TNPR (rw) register accessor: an alias for `Reg`"] pub type TNPR = crate::Reg; #[doc = "Transmit Next Pointer Register"] pub mod tnpr; #[doc = "TNCR (rw) register accessor: an alias for `Reg`"] pub type TNCR = crate::Reg; #[doc = "Transmit Next Counter Register"] pub mod tncr; #[doc = "PTCR (w) register accessor: an alias for `Reg`"] pub type PTCR = crate::Reg; #[doc = "Transfer Control Register"] pub mod ptcr; #[doc = "PTSR (r) register accessor: an alias for `Reg`"] pub type PTSR = crate::Reg; #[doc = "Transfer Status Register"] pub mod ptsr;