1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4 #[doc = "0x00 - Length of code region 0."]
5 pub clenr0: CLENR0,
6 #[doc = "0x04 - Readback protection configuration."]
7 pub rbpconf: RBPCONF,
8 #[doc = "0x08 - Reset value for CLOCK XTALFREQ register."]
9 pub xtalfreq: XTALFREQ,
10 _reserved3: [u8; 0x04],
11 #[doc = "0x10 - Firmware ID."]
12 pub fwid: FWID,
13 _reserved_4_nrffw: [u8; 0x3c],
14 #[doc = "0x50..0x80 - Reserved for Nordic hardware design."]
15 pub nrfhw: [NRFHW; 12],
16 #[doc = "0x80..0x100 - Reserved for customer."]
17 pub customer: [CUSTOMER; 32],
18}
19impl RegisterBlock {
20 #[doc = "0x14..0x50 - Reserved for Nordic firmware design."]
21 #[inline(always)]
22 pub fn nrffw(&self) -> &[NRFFW; 15] {
23 unsafe { &*(((self as *const Self) as *const u8).add(20usize) as *const [NRFFW; 15]) }
24 }
25 #[doc = "0x14 - Bootloader start address."]
26 #[inline(always)]
27 pub fn bootloaderaddr(&self) -> &BOOTLOADERADDR {
28 unsafe { &*(((self as *const Self) as *const u8).add(20usize) as *const BOOTLOADERADDR) }
29 }
30}
31#[doc = "CLENR0 (rw) register accessor: an alias for `Reg<CLENR0_SPEC>`"]
32pub type CLENR0 = crate::Reg<clenr0::CLENR0_SPEC>;
33#[doc = "Length of code region 0."]
34pub mod clenr0;
35#[doc = "RBPCONF (rw) register accessor: an alias for `Reg<RBPCONF_SPEC>`"]
36pub type RBPCONF = crate::Reg<rbpconf::RBPCONF_SPEC>;
37#[doc = "Readback protection configuration."]
38pub mod rbpconf;
39#[doc = "XTALFREQ (rw) register accessor: an alias for `Reg<XTALFREQ_SPEC>`"]
40pub type XTALFREQ = crate::Reg<xtalfreq::XTALFREQ_SPEC>;
41#[doc = "Reset value for CLOCK XTALFREQ register."]
42pub mod xtalfreq;
43#[doc = "FWID (r) register accessor: an alias for `Reg<FWID_SPEC>`"]
44pub type FWID = crate::Reg<fwid::FWID_SPEC>;
45#[doc = "Firmware ID."]
46pub mod fwid;
47#[doc = "BOOTLOADERADDR (rw) register accessor: an alias for `Reg<BOOTLOADERADDR_SPEC>`"]
48pub type BOOTLOADERADDR = crate::Reg<bootloaderaddr::BOOTLOADERADDR_SPEC>;
49#[doc = "Bootloader start address."]
50pub mod bootloaderaddr;
51#[doc = "NRFFW (rw) register accessor: an alias for `Reg<NRFFW_SPEC>`"]
52pub type NRFFW = crate::Reg<nrffw::NRFFW_SPEC>;
53#[doc = "Reserved for Nordic firmware design."]
54pub mod nrffw;
55#[doc = "NRFHW (rw) register accessor: an alias for `Reg<NRFHW_SPEC>`"]
56pub type NRFHW = crate::Reg<nrfhw::NRFHW_SPEC>;
57#[doc = "Reserved for Nordic hardware design."]
58pub mod nrfhw;
59#[doc = "CUSTOMER (rw) register accessor: an alias for `Reg<CUSTOMER_SPEC>`"]
60pub type CUSTOMER = crate::Reg<customer::CUSTOMER_SPEC>;
61#[doc = "Reserved for customer."]
62pub mod customer;