ra4e1/
port1.rs

1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4    _reserved_0_pdr: [u8; 0x04],
5    _reserved_1_eidr: [u8; 0x04],
6    _reserved_2_porr: [u8; 0x04],
7    _reserved_3_eorr: [u8; 0x04],
8}
9impl RegisterBlock {
10    #[doc = "0x00 - Port Control Register 1"]
11    #[inline(always)]
12    pub const fn podr(&self) -> &PODR {
13        unsafe { &*(self as *const Self).cast::<u8>().add(0usize).cast() }
14    }
15    #[doc = "0x00 - Port Control Register 1"]
16    #[inline(always)]
17    pub const fn pcntr1(&self) -> &PCNTR1 {
18        unsafe { &*(self as *const Self).cast::<u8>().add(0usize).cast() }
19    }
20    #[doc = "0x02 - Port Control Register 1"]
21    #[inline(always)]
22    pub const fn pdr(&self) -> &PDR {
23        unsafe { &*(self as *const Self).cast::<u8>().add(2usize).cast() }
24    }
25    #[doc = "0x04 - Port Control Register 2"]
26    #[inline(always)]
27    pub const fn eidr(&self) -> &EIDR {
28        unsafe { &*(self as *const Self).cast::<u8>().add(4usize).cast() }
29    }
30    #[doc = "0x04 - Port Control Register 2"]
31    #[inline(always)]
32    pub const fn pcntr2(&self) -> &PCNTR2 {
33        unsafe { &*(self as *const Self).cast::<u8>().add(4usize).cast() }
34    }
35    #[doc = "0x06 - Port Control Register 2"]
36    #[inline(always)]
37    pub const fn pidr(&self) -> &PIDR {
38        unsafe { &*(self as *const Self).cast::<u8>().add(6usize).cast() }
39    }
40    #[doc = "0x08 - Port Control Register 3"]
41    #[inline(always)]
42    pub const fn porr(&self) -> &PORR {
43        unsafe { &*(self as *const Self).cast::<u8>().add(8usize).cast() }
44    }
45    #[doc = "0x08 - Port Control Register 3"]
46    #[inline(always)]
47    pub const fn pcntr3(&self) -> &PCNTR3 {
48        unsafe { &*(self as *const Self).cast::<u8>().add(8usize).cast() }
49    }
50    #[doc = "0x0a - Port Control Register 3"]
51    #[inline(always)]
52    pub const fn posr(&self) -> &POSR {
53        unsafe { &*(self as *const Self).cast::<u8>().add(10usize).cast() }
54    }
55    #[doc = "0x0c - Port Control Register 4"]
56    #[inline(always)]
57    pub const fn eorr(&self) -> &EORR {
58        unsafe { &*(self as *const Self).cast::<u8>().add(12usize).cast() }
59    }
60    #[doc = "0x0c - Port Control Register 4"]
61    #[inline(always)]
62    pub const fn pcntr4(&self) -> &PCNTR4 {
63        unsafe { &*(self as *const Self).cast::<u8>().add(12usize).cast() }
64    }
65    #[doc = "0x0e - Port Control Register 4"]
66    #[inline(always)]
67    pub const fn eosr(&self) -> &EOSR {
68        unsafe { &*(self as *const Self).cast::<u8>().add(14usize).cast() }
69    }
70}
71#[doc = "PCNTR1 (rw) register accessor: an alias for `Reg<PCNTR1_SPEC>`"]
72pub type PCNTR1 = crate::Reg<pcntr1::PCNTR1_SPEC>;
73#[doc = "Port Control Register 1"]
74pub mod pcntr1;
75#[doc = "PODR (rw) register accessor: an alias for `Reg<PODR_SPEC>`"]
76pub type PODR = crate::Reg<podr::PODR_SPEC>;
77#[doc = "Port Control Register 1"]
78pub mod podr;
79#[doc = "PDR (rw) register accessor: an alias for `Reg<PDR_SPEC>`"]
80pub type PDR = crate::Reg<pdr::PDR_SPEC>;
81#[doc = "Port Control Register 1"]
82pub mod pdr;
83#[doc = "PCNTR2 (r) register accessor: an alias for `Reg<PCNTR2_SPEC>`"]
84pub type PCNTR2 = crate::Reg<pcntr2::PCNTR2_SPEC>;
85#[doc = "Port Control Register 2"]
86pub mod pcntr2;
87#[doc = "EIDR (r) register accessor: an alias for `Reg<EIDR_SPEC>`"]
88pub type EIDR = crate::Reg<eidr::EIDR_SPEC>;
89#[doc = "Port Control Register 2"]
90pub mod eidr;
91#[doc = "PIDR (r) register accessor: an alias for `Reg<PIDR_SPEC>`"]
92pub type PIDR = crate::Reg<pidr::PIDR_SPEC>;
93#[doc = "Port Control Register 2"]
94pub mod pidr;
95#[doc = "PCNTR3 (w) register accessor: an alias for `Reg<PCNTR3_SPEC>`"]
96pub type PCNTR3 = crate::Reg<pcntr3::PCNTR3_SPEC>;
97#[doc = "Port Control Register 3"]
98pub mod pcntr3;
99#[doc = "PORR (w) register accessor: an alias for `Reg<PORR_SPEC>`"]
100pub type PORR = crate::Reg<porr::PORR_SPEC>;
101#[doc = "Port Control Register 3"]
102pub mod porr;
103#[doc = "POSR (w) register accessor: an alias for `Reg<POSR_SPEC>`"]
104pub type POSR = crate::Reg<posr::POSR_SPEC>;
105#[doc = "Port Control Register 3"]
106pub mod posr;
107#[doc = "PCNTR4 (rw) register accessor: an alias for `Reg<PCNTR4_SPEC>`"]
108pub type PCNTR4 = crate::Reg<pcntr4::PCNTR4_SPEC>;
109#[doc = "Port Control Register 4"]
110pub mod pcntr4;
111#[doc = "EORR (rw) register accessor: an alias for `Reg<EORR_SPEC>`"]
112pub type EORR = crate::Reg<eorr::EORR_SPEC>;
113#[doc = "Port Control Register 4"]
114pub mod eorr;
115#[doc = "EOSR (rw) register accessor: an alias for `Reg<EOSR_SPEC>`"]
116pub type EOSR = crate::Reg<eosr::EOSR_SPEC>;
117#[doc = "Port Control Register 4"]
118pub mod eosr;