nrf52840_pac/
nvmc.rs

1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4    _reserved0: [u8; 0x0400],
5    #[doc = "0x400 - Ready flag"]
6    pub ready: READY,
7    _reserved1: [u8; 0x04],
8    #[doc = "0x408 - Ready flag"]
9    pub readynext: READYNEXT,
10    _reserved2: [u8; 0xf8],
11    #[doc = "0x504 - Configuration register"]
12    pub config: CONFIG,
13    _reserved_3_erasepage: [u8; 0x04],
14    #[doc = "0x50c - Register for erasing all non-volatile user memory"]
15    pub eraseall: ERASEALL,
16    #[doc = "0x510 - Deprecated register - Register for erasing a page in code area. Equivalent to ERASEPAGE."]
17    pub erasepcr0: ERASEPCR0,
18    #[doc = "0x514 - Register for erasing user information configuration registers"]
19    pub eraseuicr: ERASEUICR,
20    #[doc = "0x518 - Register for partial erase of a page in code area"]
21    pub erasepagepartial: ERASEPAGEPARTIAL,
22    #[doc = "0x51c - Register for partial erase configuration"]
23    pub erasepagepartialcfg: ERASEPAGEPARTIALCFG,
24    _reserved9: [u8; 0x20],
25    #[doc = "0x540 - I-code cache configuration register."]
26    pub icachecnf: ICACHECNF,
27    _reserved10: [u8; 0x04],
28    #[doc = "0x548 - I-code cache hit counter."]
29    pub ihit: IHIT,
30    #[doc = "0x54c - I-code cache miss counter."]
31    pub imiss: IMISS,
32}
33impl RegisterBlock {
34    #[doc = "0x508 - Deprecated register - Register for erasing a page in code area. Equivalent to ERASEPAGE."]
35    #[inline(always)]
36    pub fn erasepcr1(&self) -> &ERASEPCR1 {
37        unsafe { &*(((self as *const Self) as *const u8).add(1288usize) as *const ERASEPCR1) }
38    }
39    #[doc = "0x508 - Register for erasing a page in code area"]
40    #[inline(always)]
41    pub fn erasepage(&self) -> &ERASEPAGE {
42        unsafe { &*(((self as *const Self) as *const u8).add(1288usize) as *const ERASEPAGE) }
43    }
44}
45#[doc = "READY (r) register accessor: an alias for `Reg<READY_SPEC>`"]
46pub type READY = crate::Reg<ready::READY_SPEC>;
47#[doc = "Ready flag"]
48pub mod ready;
49#[doc = "READYNEXT (r) register accessor: an alias for `Reg<READYNEXT_SPEC>`"]
50pub type READYNEXT = crate::Reg<readynext::READYNEXT_SPEC>;
51#[doc = "Ready flag"]
52pub mod readynext;
53#[doc = "CONFIG (rw) register accessor: an alias for `Reg<CONFIG_SPEC>`"]
54pub type CONFIG = crate::Reg<config::CONFIG_SPEC>;
55#[doc = "Configuration register"]
56pub mod config;
57#[doc = "ERASEPAGE (rw) register accessor: an alias for `Reg<ERASEPAGE_SPEC>`"]
58pub type ERASEPAGE = crate::Reg<erasepage::ERASEPAGE_SPEC>;
59#[doc = "Register for erasing a page in code area"]
60pub mod erasepage;
61#[doc = "ERASEPCR1 (rw) register accessor: an alias for `Reg<ERASEPCR1_SPEC>`"]
62pub type ERASEPCR1 = crate::Reg<erasepcr1::ERASEPCR1_SPEC>;
63#[doc = "Deprecated register - Register for erasing a page in code area. Equivalent to ERASEPAGE."]
64pub mod erasepcr1;
65#[doc = "ERASEALL (rw) register accessor: an alias for `Reg<ERASEALL_SPEC>`"]
66pub type ERASEALL = crate::Reg<eraseall::ERASEALL_SPEC>;
67#[doc = "Register for erasing all non-volatile user memory"]
68pub mod eraseall;
69#[doc = "ERASEPCR0 (rw) register accessor: an alias for `Reg<ERASEPCR0_SPEC>`"]
70pub type ERASEPCR0 = crate::Reg<erasepcr0::ERASEPCR0_SPEC>;
71#[doc = "Deprecated register - Register for erasing a page in code area. Equivalent to ERASEPAGE."]
72pub mod erasepcr0;
73#[doc = "ERASEUICR (rw) register accessor: an alias for `Reg<ERASEUICR_SPEC>`"]
74pub type ERASEUICR = crate::Reg<eraseuicr::ERASEUICR_SPEC>;
75#[doc = "Register for erasing user information configuration registers"]
76pub mod eraseuicr;
77#[doc = "ERASEPAGEPARTIAL (rw) register accessor: an alias for `Reg<ERASEPAGEPARTIAL_SPEC>`"]
78pub type ERASEPAGEPARTIAL = crate::Reg<erasepagepartial::ERASEPAGEPARTIAL_SPEC>;
79#[doc = "Register for partial erase of a page in code area"]
80pub mod erasepagepartial;
81#[doc = "ERASEPAGEPARTIALCFG (rw) register accessor: an alias for `Reg<ERASEPAGEPARTIALCFG_SPEC>`"]
82pub type ERASEPAGEPARTIALCFG = crate::Reg<erasepagepartialcfg::ERASEPAGEPARTIALCFG_SPEC>;
83#[doc = "Register for partial erase configuration"]
84pub mod erasepagepartialcfg;
85#[doc = "ICACHECNF (rw) register accessor: an alias for `Reg<ICACHECNF_SPEC>`"]
86pub type ICACHECNF = crate::Reg<icachecnf::ICACHECNF_SPEC>;
87#[doc = "I-code cache configuration register."]
88pub mod icachecnf;
89#[doc = "IHIT (rw) register accessor: an alias for `Reg<IHIT_SPEC>`"]
90pub type IHIT = crate::Reg<ihit::IHIT_SPEC>;
91#[doc = "I-code cache hit counter."]
92pub mod ihit;
93#[doc = "IMISS (rw) register accessor: an alias for `Reg<IMISS_SPEC>`"]
94pub type IMISS = crate::Reg<imiss::IMISS_SPEC>;
95#[doc = "I-code cache miss counter."]
96pub mod imiss;