nrf51_pac/
ficr.rs

1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4    _reserved0: [u8; 0x10],
5    #[doc = "0x10 - Code memory page size in bytes."]
6    pub codepagesize: CODEPAGESIZE,
7    #[doc = "0x14 - Code memory size in pages."]
8    pub codesize: CODESIZE,
9    _reserved2: [u8; 0x10],
10    #[doc = "0x28 - Length of code region 0 in bytes."]
11    pub clenr0: CLENR0,
12    #[doc = "0x2c - Pre-programmed factory code present."]
13    pub ppfc: PPFC,
14    _reserved4: [u8; 0x04],
15    #[doc = "0x34 - Number of individualy controllable RAM blocks."]
16    pub numramblock: NUMRAMBLOCK,
17    _reserved_5_sizeramblock: [u8; 0x10],
18    _reserved6: [u8; 0x14],
19    #[doc = "0x5c - Configuration identifier."]
20    pub configid: CONFIGID,
21    #[doc = "0x60..0x68 - Device identifier."]
22    pub deviceid: [DEVICEID; 2],
23    _reserved8: [u8; 0x18],
24    #[doc = "0x80..0x90 - Encryption root."]
25    pub er: [ER; 4],
26    #[doc = "0x90..0xa0 - Identity root."]
27    pub ir: [IR; 4],
28    #[doc = "0xa0 - Device address type."]
29    pub deviceaddrtype: DEVICEADDRTYPE,
30    #[doc = "0xa4..0xac - Device address."]
31    pub deviceaddr: [DEVICEADDR; 2],
32    #[doc = "0xac - Radio calibration override enable."]
33    pub overrideen: OVERRIDEEN,
34    #[doc = "0xb0..0xc4 - Override values for the OVERRIDEn registers in RADIO for NRF_1Mbit mode."]
35    pub nrf_1mbit: [NRF_1MBIT; 5],
36    _reserved14: [u8; 0x28],
37    #[doc = "0xec..0x100 - Override values for the OVERRIDEn registers in RADIO for BLE_1Mbit mode."]
38    pub ble_1mbit: [BLE_1MBIT; 5],
39}
40impl RegisterBlock {
41    #[doc = "0x38..0x48 - Deprecated array of size of RAM block in bytes. This name is kept for backward compatinility purposes. Use SIZERAMBLOCKS instead."]
42    #[inline(always)]
43    pub fn sizeramblock(&self) -> &[SIZERAMBLOCK; 4] {
44        unsafe { &*(((self as *const Self) as *const u8).add(56usize) as *const [SIZERAMBLOCK; 4]) }
45    }
46    #[doc = "0x38 - Size of RAM blocks in bytes."]
47    #[inline(always)]
48    pub fn sizeramblocks(&self) -> &SIZERAMBLOCKS {
49        unsafe { &*(((self as *const Self) as *const u8).add(56usize) as *const SIZERAMBLOCKS) }
50    }
51}
52#[doc = "CODEPAGESIZE (r) register accessor: an alias for `Reg<CODEPAGESIZE_SPEC>`"]
53pub type CODEPAGESIZE = crate::Reg<codepagesize::CODEPAGESIZE_SPEC>;
54#[doc = "Code memory page size in bytes."]
55pub mod codepagesize;
56#[doc = "CODESIZE (r) register accessor: an alias for `Reg<CODESIZE_SPEC>`"]
57pub type CODESIZE = crate::Reg<codesize::CODESIZE_SPEC>;
58#[doc = "Code memory size in pages."]
59pub mod codesize;
60#[doc = "CLENR0 (r) register accessor: an alias for `Reg<CLENR0_SPEC>`"]
61pub type CLENR0 = crate::Reg<clenr0::CLENR0_SPEC>;
62#[doc = "Length of code region 0 in bytes."]
63pub mod clenr0;
64#[doc = "PPFC (r) register accessor: an alias for `Reg<PPFC_SPEC>`"]
65pub type PPFC = crate::Reg<ppfc::PPFC_SPEC>;
66#[doc = "Pre-programmed factory code present."]
67pub mod ppfc;
68#[doc = "NUMRAMBLOCK (r) register accessor: an alias for `Reg<NUMRAMBLOCK_SPEC>`"]
69pub type NUMRAMBLOCK = crate::Reg<numramblock::NUMRAMBLOCK_SPEC>;
70#[doc = "Number of individualy controllable RAM blocks."]
71pub mod numramblock;
72#[doc = "SIZERAMBLOCKS (r) register accessor: an alias for `Reg<SIZERAMBLOCKS_SPEC>`"]
73pub type SIZERAMBLOCKS = crate::Reg<sizeramblocks::SIZERAMBLOCKS_SPEC>;
74#[doc = "Size of RAM blocks in bytes."]
75pub mod sizeramblocks;
76#[doc = "SIZERAMBLOCK (r) register accessor: an alias for `Reg<SIZERAMBLOCK_SPEC>`"]
77pub type SIZERAMBLOCK = crate::Reg<sizeramblock::SIZERAMBLOCK_SPEC>;
78#[doc = "Deprecated array of size of RAM block in bytes. This name is kept for backward compatinility purposes. Use SIZERAMBLOCKS instead."]
79pub mod sizeramblock;
80#[doc = "CONFIGID (r) register accessor: an alias for `Reg<CONFIGID_SPEC>`"]
81pub type CONFIGID = crate::Reg<configid::CONFIGID_SPEC>;
82#[doc = "Configuration identifier."]
83pub mod configid;
84#[doc = "DEVICEID (r) register accessor: an alias for `Reg<DEVICEID_SPEC>`"]
85pub type DEVICEID = crate::Reg<deviceid::DEVICEID_SPEC>;
86#[doc = "Device identifier."]
87pub mod deviceid;
88#[doc = "ER (r) register accessor: an alias for `Reg<ER_SPEC>`"]
89pub type ER = crate::Reg<er::ER_SPEC>;
90#[doc = "Encryption root."]
91pub mod er;
92#[doc = "IR (r) register accessor: an alias for `Reg<IR_SPEC>`"]
93pub type IR = crate::Reg<ir::IR_SPEC>;
94#[doc = "Identity root."]
95pub mod ir;
96#[doc = "DEVICEADDRTYPE (r) register accessor: an alias for `Reg<DEVICEADDRTYPE_SPEC>`"]
97pub type DEVICEADDRTYPE = crate::Reg<deviceaddrtype::DEVICEADDRTYPE_SPEC>;
98#[doc = "Device address type."]
99pub mod deviceaddrtype;
100#[doc = "DEVICEADDR (r) register accessor: an alias for `Reg<DEVICEADDR_SPEC>`"]
101pub type DEVICEADDR = crate::Reg<deviceaddr::DEVICEADDR_SPEC>;
102#[doc = "Device address."]
103pub mod deviceaddr;
104#[doc = "OVERRIDEEN (r) register accessor: an alias for `Reg<OVERRIDEEN_SPEC>`"]
105pub type OVERRIDEEN = crate::Reg<overrideen::OVERRIDEEN_SPEC>;
106#[doc = "Radio calibration override enable."]
107pub mod overrideen;
108#[doc = "NRF_1MBIT (r) register accessor: an alias for `Reg<NRF_1MBIT_SPEC>`"]
109pub type NRF_1MBIT = crate::Reg<nrf_1mbit::NRF_1MBIT_SPEC>;
110#[doc = "Override values for the OVERRIDEn registers in RADIO for NRF_1Mbit mode."]
111pub mod nrf_1mbit;
112#[doc = "BLE_1MBIT (r) register accessor: an alias for `Reg<BLE_1MBIT_SPEC>`"]
113pub type BLE_1MBIT = crate::Reg<ble_1mbit::BLE_1MBIT_SPEC>;
114#[doc = "Override values for the OVERRIDEn registers in RADIO for BLE_1Mbit mode."]
115pub mod ble_1mbit;