1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4 ctrla: Ctrla,
5 _reserved1: [u8; 0x02],
6 ctrlb: Ctrlb,
7 _reserved2: [u8; 0x02],
8 param: Param,
9 intenclr: Intenclr,
10 intenset: Intenset,
11 intflag: Intflag,
12 status: Status,
13 addr: Addr,
14 runlock: Runlock,
15 pbldata: [Pbldata; 2],
16 eccerr: Eccerr,
17 dbgctrl: Dbgctrl,
18 _reserved12: [u8; 0x01],
19 seecfg: Seecfg,
20 _reserved13: [u8; 0x01],
21 seestat: Seestat,
22}
23impl RegisterBlock {
24#[doc = "0x00 - Control A"]
25 #[inline(always)]
26pub const fn ctrla(&self) -> &Ctrla {
27&self.ctrla
28 }
29#[doc = "0x04 - Control B"]
30 #[inline(always)]
31pub const fn ctrlb(&self) -> &Ctrlb {
32&self.ctrlb
33 }
34#[doc = "0x08 - NVM Parameter"]
35 #[inline(always)]
36pub const fn param(&self) -> &Param {
37&self.param
38 }
39#[doc = "0x0c - Interrupt Enable Clear"]
40 #[inline(always)]
41pub const fn intenclr(&self) -> &Intenclr {
42&self.intenclr
43 }
44#[doc = "0x0e - Interrupt Enable Set"]
45 #[inline(always)]
46pub const fn intenset(&self) -> &Intenset {
47&self.intenset
48 }
49#[doc = "0x10 - Interrupt Flag Status and Clear"]
50 #[inline(always)]
51pub const fn intflag(&self) -> &Intflag {
52&self.intflag
53 }
54#[doc = "0x12 - Status"]
55 #[inline(always)]
56pub const fn status(&self) -> &Status {
57&self.status
58 }
59#[doc = "0x14 - Address"]
60 #[inline(always)]
61pub const fn addr(&self) -> &Addr {
62&self.addr
63 }
64#[doc = "0x18 - Lock Section"]
65 #[inline(always)]
66pub const fn runlock(&self) -> &Runlock {
67&self.runlock
68 }
69#[doc = "0x1c..0x24 - Page Buffer Load Data x"]
70 #[inline(always)]
71pub const fn pbldata(&self, n: usize) -> &Pbldata {
72&self.pbldata[n]
73 }
74#[doc = "Iterator for array of:"]
75 #[doc = "0x1c..0x24 - Page Buffer Load Data x"]
76 #[inline(always)]
77pub fn pbldata_iter(&self) -> impl Iterator<Item = &Pbldata> {
78self.pbldata.iter()
79 }
80#[doc = "0x24 - ECC Error Status Register"]
81 #[inline(always)]
82pub const fn eccerr(&self) -> &Eccerr {
83&self.eccerr
84 }
85#[doc = "0x28 - Debug Control"]
86 #[inline(always)]
87pub const fn dbgctrl(&self) -> &Dbgctrl {
88&self.dbgctrl
89 }
90#[doc = "0x2a - SmartEEPROM Configuration Register"]
91 #[inline(always)]
92pub const fn seecfg(&self) -> &Seecfg {
93&self.seecfg
94 }
95#[doc = "0x2c - SmartEEPROM Status Register"]
96 #[inline(always)]
97pub const fn seestat(&self) -> &Seestat {
98&self.seestat
99 }
100}
101#[doc = "CTRLA (rw) register accessor: Control A\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrla::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrla::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ctrla`]
102module"]
103#[doc(alias = "CTRLA")]
104pub type Ctrla = crate::Reg<ctrla::CtrlaSpec>;
105#[doc = "Control A"]
106pub mod ctrla;
107#[doc = "CTRLB (w) register accessor: Control B\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrlb::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ctrlb`]
108module"]
109#[doc(alias = "CTRLB")]
110pub type Ctrlb = crate::Reg<ctrlb::CtrlbSpec>;
111#[doc = "Control B"]
112pub mod ctrlb;
113#[doc = "PARAM (r) register accessor: NVM Parameter\n\nYou can [`read`](crate::Reg::read) this register and get [`param::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@param`]
114module"]
115#[doc(alias = "PARAM")]
116pub type Param = crate::Reg<param::ParamSpec>;
117#[doc = "NVM Parameter"]
118pub mod param;
119#[doc = "INTENCLR (rw) register accessor: Interrupt Enable Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`intenclr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intenclr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@intenclr`]
120module"]
121#[doc(alias = "INTENCLR")]
122pub type Intenclr = crate::Reg<intenclr::IntenclrSpec>;
123#[doc = "Interrupt Enable Clear"]
124pub mod intenclr;
125#[doc = "INTENSET (rw) register accessor: Interrupt Enable Set\n\nYou can [`read`](crate::Reg::read) this register and get [`intenset::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intenset::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@intenset`]
126module"]
127#[doc(alias = "INTENSET")]
128pub type Intenset = crate::Reg<intenset::IntensetSpec>;
129#[doc = "Interrupt Enable Set"]
130pub mod intenset;
131#[doc = "INTFLAG (rw) register accessor: Interrupt Flag Status and Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`intflag::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intflag::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@intflag`]
132module"]
133#[doc(alias = "INTFLAG")]
134pub type Intflag = crate::Reg<intflag::IntflagSpec>;
135#[doc = "Interrupt Flag Status and Clear"]
136pub mod intflag;
137#[doc = "STATUS (r) register accessor: Status\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@status`]
138module"]
139#[doc(alias = "STATUS")]
140pub type Status = crate::Reg<status::StatusSpec>;
141#[doc = "Status"]
142pub mod status;
143#[doc = "ADDR (rw) register accessor: Address\n\nYou can [`read`](crate::Reg::read) this register and get [`addr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`addr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@addr`]
144module"]
145#[doc(alias = "ADDR")]
146pub type Addr = crate::Reg<addr::AddrSpec>;
147#[doc = "Address"]
148pub mod addr;
149#[doc = "RUNLOCK (r) register accessor: Lock Section\n\nYou can [`read`](crate::Reg::read) this register and get [`runlock::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@runlock`]
150module"]
151#[doc(alias = "RUNLOCK")]
152pub type Runlock = crate::Reg<runlock::RunlockSpec>;
153#[doc = "Lock Section"]
154pub mod runlock;
155#[doc = "PBLDATA (r) register accessor: Page Buffer Load Data x\n\nYou can [`read`](crate::Reg::read) this register and get [`pbldata::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@pbldata`]
156module"]
157#[doc(alias = "PBLDATA")]
158pub type Pbldata = crate::Reg<pbldata::PbldataSpec>;
159#[doc = "Page Buffer Load Data x"]
160pub mod pbldata;
161#[doc = "ECCERR (r) register accessor: ECC Error Status Register\n\nYou can [`read`](crate::Reg::read) this register and get [`eccerr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@eccerr`]
162module"]
163#[doc(alias = "ECCERR")]
164pub type Eccerr = crate::Reg<eccerr::EccerrSpec>;
165#[doc = "ECC Error Status Register"]
166pub mod eccerr;
167#[doc = "DBGCTRL (rw) register accessor: Debug Control\n\nYou can [`read`](crate::Reg::read) this register and get [`dbgctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dbgctrl::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@dbgctrl`]
168module"]
169#[doc(alias = "DBGCTRL")]
170pub type Dbgctrl = crate::Reg<dbgctrl::DbgctrlSpec>;
171#[doc = "Debug Control"]
172pub mod dbgctrl;
173#[doc = "SEECFG (rw) register accessor: SmartEEPROM Configuration Register\n\nYou can [`read`](crate::Reg::read) this register and get [`seecfg::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`seecfg::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@seecfg`]
174module"]
175#[doc(alias = "SEECFG")]
176pub type Seecfg = crate::Reg<seecfg::SeecfgSpec>;
177#[doc = "SmartEEPROM Configuration Register"]
178pub mod seecfg;
179#[doc = "SEESTAT (r) register accessor: SmartEEPROM Status Register\n\nYou can [`read`](crate::Reg::read) this register and get [`seestat::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@seestat`]
180module"]
181#[doc(alias = "SEESTAT")]
182pub type Seestat = crate::Reg<seestat::SeestatSpec>;
183#[doc = "SmartEEPROM Status Register"]
184pub mod seestat;