ra4m2/
port0.rs

1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4    _reserved_0_pdr: [u8; 0x04],
5    _reserved_1_pidr: [u8; 0x04],
6    _reserved_2_porr: [u8; 0x04],
7}
8impl RegisterBlock {
9    #[doc = "0x00 - Port Control Register 1"]
10    #[inline(always)]
11    pub const fn podr(&self) -> &PODR {
12        unsafe { &*(self as *const Self).cast::<u8>().add(0usize).cast() }
13    }
14    #[doc = "0x00 - Port Control Register 1"]
15    #[inline(always)]
16    pub const fn pcntr1(&self) -> &PCNTR1 {
17        unsafe { &*(self as *const Self).cast::<u8>().add(0usize).cast() }
18    }
19    #[doc = "0x02 - Port Control Register 1"]
20    #[inline(always)]
21    pub const fn pdr(&self) -> &PDR {
22        unsafe { &*(self as *const Self).cast::<u8>().add(2usize).cast() }
23    }
24    #[doc = "0x04 - Port Control Register 2"]
25    #[inline(always)]
26    pub const fn pcntr2(&self) -> &PCNTR2 {
27        unsafe { &*(self as *const Self).cast::<u8>().add(4usize).cast() }
28    }
29    #[doc = "0x06 - Port Control Register 2"]
30    #[inline(always)]
31    pub const fn pidr(&self) -> &PIDR {
32        unsafe { &*(self as *const Self).cast::<u8>().add(6usize).cast() }
33    }
34    #[doc = "0x08 - Port Control Register 3"]
35    #[inline(always)]
36    pub const fn porr(&self) -> &PORR {
37        unsafe { &*(self as *const Self).cast::<u8>().add(8usize).cast() }
38    }
39    #[doc = "0x08 - Port Control Register 3"]
40    #[inline(always)]
41    pub const fn pcntr3(&self) -> &PCNTR3 {
42        unsafe { &*(self as *const Self).cast::<u8>().add(8usize).cast() }
43    }
44    #[doc = "0x0a - Port Control Register 3"]
45    #[inline(always)]
46    pub const fn posr(&self) -> &POSR {
47        unsafe { &*(self as *const Self).cast::<u8>().add(10usize).cast() }
48    }
49}
50#[doc = "PCNTR1 (rw) register accessor: an alias for `Reg<PCNTR1_SPEC>`"]
51pub type PCNTR1 = crate::Reg<pcntr1::PCNTR1_SPEC>;
52#[doc = "Port Control Register 1"]
53pub mod pcntr1;
54#[doc = "PODR (rw) register accessor: an alias for `Reg<PODR_SPEC>`"]
55pub type PODR = crate::Reg<podr::PODR_SPEC>;
56#[doc = "Port Control Register 1"]
57pub mod podr;
58#[doc = "PDR (rw) register accessor: an alias for `Reg<PDR_SPEC>`"]
59pub type PDR = crate::Reg<pdr::PDR_SPEC>;
60#[doc = "Port Control Register 1"]
61pub mod pdr;
62#[doc = "PCNTR2 (r) register accessor: an alias for `Reg<PCNTR2_SPEC>`"]
63pub type PCNTR2 = crate::Reg<pcntr2::PCNTR2_SPEC>;
64#[doc = "Port Control Register 2"]
65pub mod pcntr2;
66#[doc = "PIDR (r) register accessor: an alias for `Reg<PIDR_SPEC>`"]
67pub type PIDR = crate::Reg<pidr::PIDR_SPEC>;
68#[doc = "Port Control Register 2"]
69pub mod pidr;
70#[doc = "PCNTR3 (w) register accessor: an alias for `Reg<PCNTR3_SPEC>`"]
71pub type PCNTR3 = crate::Reg<pcntr3::PCNTR3_SPEC>;
72#[doc = "Port Control Register 3"]
73pub mod pcntr3;
74#[doc = "PORR (w) register accessor: an alias for `Reg<PORR_SPEC>`"]
75pub type PORR = crate::Reg<porr::PORR_SPEC>;
76#[doc = "Port Control Register 3"]
77pub mod porr;
78#[doc = "POSR (w) register accessor: an alias for `Reg<POSR_SPEC>`"]
79pub type POSR = crate::Reg<posr::POSR_SPEC>;
80#[doc = "Port Control Register 3"]
81pub mod posr;