nrf51_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; 0x0100],
8    #[doc = "0x504 - Configuration register."]
9    pub config: CONFIG,
10    _reserved_2_erasepage: [u8; 0x04],
11    #[doc = "0x50c - Register for erasing all non-volatile user memory."]
12    pub eraseall: ERASEALL,
13    #[doc = "0x510 - Register for erasing a protected non-volatile memory page."]
14    pub erasepcr0: ERASEPCR0,
15    #[doc = "0x514 - Register for start erasing User Information Congfiguration Registers."]
16    pub eraseuicr: ERASEUICR,
17}
18impl RegisterBlock {
19    #[doc = "0x508 - Register for erasing a non-protected non-volatile memory page."]
20    #[inline(always)]
21    pub fn erasepcr1(&self) -> &ERASEPCR1 {
22        unsafe { &*(((self as *const Self) as *const u8).add(1288usize) as *const ERASEPCR1) }
23    }
24    #[doc = "0x508 - Register for erasing a non-protected non-volatile memory page."]
25    #[inline(always)]
26    pub fn erasepage(&self) -> &ERASEPAGE {
27        unsafe { &*(((self as *const Self) as *const u8).add(1288usize) as *const ERASEPAGE) }
28    }
29}
30#[doc = "READY (r) register accessor: an alias for `Reg<READY_SPEC>`"]
31pub type READY = crate::Reg<ready::READY_SPEC>;
32#[doc = "Ready flag."]
33pub mod ready;
34#[doc = "CONFIG (rw) register accessor: an alias for `Reg<CONFIG_SPEC>`"]
35pub type CONFIG = crate::Reg<config::CONFIG_SPEC>;
36#[doc = "Configuration register."]
37pub mod config;
38#[doc = "ERASEPAGE (rw) register accessor: an alias for `Reg<ERASEPAGE_SPEC>`"]
39pub type ERASEPAGE = crate::Reg<erasepage::ERASEPAGE_SPEC>;
40#[doc = "Register for erasing a non-protected non-volatile memory page."]
41pub mod erasepage;
42#[doc = "ERASEPCR1 (rw) register accessor: an alias for `Reg<ERASEPCR1_SPEC>`"]
43pub type ERASEPCR1 = crate::Reg<erasepcr1::ERASEPCR1_SPEC>;
44#[doc = "Register for erasing a non-protected non-volatile memory page."]
45pub mod erasepcr1;
46#[doc = "ERASEALL (rw) register accessor: an alias for `Reg<ERASEALL_SPEC>`"]
47pub type ERASEALL = crate::Reg<eraseall::ERASEALL_SPEC>;
48#[doc = "Register for erasing all non-volatile user memory."]
49pub mod eraseall;
50#[doc = "ERASEPCR0 (rw) register accessor: an alias for `Reg<ERASEPCR0_SPEC>`"]
51pub type ERASEPCR0 = crate::Reg<erasepcr0::ERASEPCR0_SPEC>;
52#[doc = "Register for erasing a protected non-volatile memory page."]
53pub mod erasepcr0;
54#[doc = "ERASEUICR (rw) register accessor: an alias for `Reg<ERASEUICR_SPEC>`"]
55pub type ERASEUICR = crate::Reg<eraseuicr::ERASEUICR_SPEC>;
56#[doc = "Register for start erasing User Information Congfiguration Registers."]
57pub mod eraseuicr;