1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4 ctrla: Ctrla,
5 ctrlb: Ctrlb,
6 intenclr: Intenclr,
7 intenset: Intenset,
8 intflag: Intflag,
9 databufptr: Databufptr,
10 dbgctrl: Dbgctrl,
11 _reserved7: [u8; 0x02],
12 keyword: [Keyword; 8],
13 _reserved8: [u8; 0x0c],
14 indata: Indata,
15 intvectv: [Intvectv; 4],
16 _reserved10: [u8; 0x10],
17 hashkey: [Hashkey; 4],
18 ghash: [Ghash; 4],
19 _reserved12: [u8; 0x04],
20 ciplen: Ciplen,
21 randseed: Randseed,
22}
23impl RegisterBlock {
24 #[doc = "0x00 - Control A"]
25 #[inline(always)]
26 pub const fn ctrla(&self) -> &Ctrla {
27 &self.ctrla
28 }
29 #[doc = "0x04 - Control B"]
30 #[inline(always)]
31 pub const fn ctrlb(&self) -> &Ctrlb {
32 &self.ctrlb
33 }
34 #[doc = "0x05 - Interrupt Enable Clear"]
35 #[inline(always)]
36 pub const fn intenclr(&self) -> &Intenclr {
37 &self.intenclr
38 }
39 #[doc = "0x06 - Interrupt Enable Set"]
40 #[inline(always)]
41 pub const fn intenset(&self) -> &Intenset {
42 &self.intenset
43 }
44 #[doc = "0x07 - Interrupt Flag Status"]
45 #[inline(always)]
46 pub const fn intflag(&self) -> &Intflag {
47 &self.intflag
48 }
49 #[doc = "0x08 - Data buffer pointer"]
50 #[inline(always)]
51 pub const fn databufptr(&self) -> &Databufptr {
52 &self.databufptr
53 }
54 #[doc = "0x09 - Debug control"]
55 #[inline(always)]
56 pub const fn dbgctrl(&self) -> &Dbgctrl {
57 &self.dbgctrl
58 }
59 #[doc = "0x0c..0x2c - Keyword n"]
60 #[inline(always)]
61 pub const fn keyword(&self, n: usize) -> &Keyword {
62 &self.keyword[n]
63 }
64 #[doc = "Iterator for array of:"]
65 #[doc = "0x0c..0x2c - Keyword n"]
66 #[inline(always)]
67 pub fn keyword_iter(&self) -> impl Iterator<Item = &Keyword> {
68 self.keyword.iter()
69 }
70 #[doc = "0x38 - Indata"]
71 #[inline(always)]
72 pub const fn indata(&self) -> &Indata {
73 &self.indata
74 }
75 #[doc = "0x3c..0x4c - Initialisation Vector n"]
76 #[inline(always)]
77 pub const fn intvectv(&self, n: usize) -> &Intvectv {
78 &self.intvectv[n]
79 }
80 #[doc = "Iterator for array of:"]
81 #[doc = "0x3c..0x4c - Initialisation Vector n"]
82 #[inline(always)]
83 pub fn intvectv_iter(&self) -> impl Iterator<Item = &Intvectv> {
84 self.intvectv.iter()
85 }
86 #[doc = "0x5c..0x6c - Hash key n"]
87 #[inline(always)]
88 pub const fn hashkey(&self, n: usize) -> &Hashkey {
89 &self.hashkey[n]
90 }
91 #[doc = "Iterator for array of:"]
92 #[doc = "0x5c..0x6c - Hash key n"]
93 #[inline(always)]
94 pub fn hashkey_iter(&self) -> impl Iterator<Item = &Hashkey> {
95 self.hashkey.iter()
96 }
97 #[doc = "0x6c..0x7c - Galois Hash n"]
98 #[inline(always)]
99 pub const fn ghash(&self, n: usize) -> &Ghash {
100 &self.ghash[n]
101 }
102 #[doc = "Iterator for array of:"]
103 #[doc = "0x6c..0x7c - Galois Hash n"]
104 #[inline(always)]
105 pub fn ghash_iter(&self) -> impl Iterator<Item = &Ghash> {
106 self.ghash.iter()
107 }
108 #[doc = "0x80 - Cipher Length"]
109 #[inline(always)]
110 pub const fn ciplen(&self) -> &Ciplen {
111 &self.ciplen
112 }
113 #[doc = "0x84 - Random Seed"]
114 #[inline(always)]
115 pub const fn randseed(&self) -> &Randseed {
116 &self.randseed
117 }
118}
119#[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`]
120module"]
121#[doc(alias = "CTRLA")]
122pub type Ctrla = crate::Reg<ctrla::CtrlaSpec>;
123#[doc = "Control A"]
124pub mod ctrla;
125#[doc = "CTRLB (rw) register accessor: Control B\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrlb::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrlb::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@ctrlb`]
126module"]
127#[doc(alias = "CTRLB")]
128pub type Ctrlb = crate::Reg<ctrlb::CtrlbSpec>;
129#[doc = "Control B"]
130pub mod ctrlb;
131#[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`]
132module"]
133#[doc(alias = "INTENCLR")]
134pub type Intenclr = crate::Reg<intenclr::IntenclrSpec>;
135#[doc = "Interrupt Enable Clear"]
136pub mod intenclr;
137#[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`]
138module"]
139#[doc(alias = "INTENSET")]
140pub type Intenset = crate::Reg<intenset::IntensetSpec>;
141#[doc = "Interrupt Enable Set"]
142pub mod intenset;
143#[doc = "INTFLAG (rw) register accessor: Interrupt Flag Status\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`]
144module"]
145#[doc(alias = "INTFLAG")]
146pub type Intflag = crate::Reg<intflag::IntflagSpec>;
147#[doc = "Interrupt Flag Status"]
148pub mod intflag;
149#[doc = "DATABUFPTR (rw) register accessor: Data buffer pointer\n\nYou can [`read`](crate::Reg::read) this register and get [`databufptr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`databufptr::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@databufptr`]
150module"]
151#[doc(alias = "DATABUFPTR")]
152pub type Databufptr = crate::Reg<databufptr::DatabufptrSpec>;
153#[doc = "Data buffer pointer"]
154pub mod databufptr;
155#[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`]
156module"]
157#[doc(alias = "DBGCTRL")]
158pub type Dbgctrl = crate::Reg<dbgctrl::DbgctrlSpec>;
159#[doc = "Debug control"]
160pub mod dbgctrl;
161#[doc = "KEYWORD (w) register accessor: Keyword n\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`keyword::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@keyword`]
162module"]
163#[doc(alias = "KEYWORD")]
164pub type Keyword = crate::Reg<keyword::KeywordSpec>;
165#[doc = "Keyword n"]
166pub mod keyword;
167#[doc = "INDATA (rw) register accessor: Indata\n\nYou can [`read`](crate::Reg::read) this register and get [`indata::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`indata::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@indata`]
168module"]
169#[doc(alias = "INDATA")]
170pub type Indata = crate::Reg<indata::IndataSpec>;
171#[doc = "Indata"]
172pub mod indata;
173#[doc = "INTVECTV (w) register accessor: Initialisation Vector n\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intvectv::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@intvectv`]
174module"]
175#[doc(alias = "INTVECTV")]
176pub type Intvectv = crate::Reg<intvectv::IntvectvSpec>;
177#[doc = "Initialisation Vector n"]
178pub mod intvectv;
179#[doc = "HASHKEY (rw) register accessor: Hash key n\n\nYou can [`read`](crate::Reg::read) this register and get [`hashkey::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`hashkey::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@hashkey`]
180module"]
181#[doc(alias = "HASHKEY")]
182pub type Hashkey = crate::Reg<hashkey::HashkeySpec>;
183#[doc = "Hash key n"]
184pub mod hashkey;
185#[doc = "GHASH (rw) register accessor: Galois Hash n\n\nYou can [`read`](crate::Reg::read) this register and get [`ghash::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ghash::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@ghash`]
186module"]
187#[doc(alias = "GHASH")]
188pub type Ghash = crate::Reg<ghash::GhashSpec>;
189#[doc = "Galois Hash n"]
190pub mod ghash;
191#[doc = "CIPLEN (rw) register accessor: Cipher Length\n\nYou can [`read`](crate::Reg::read) this register and get [`ciplen::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ciplen::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@ciplen`]
192module"]
193#[doc(alias = "CIPLEN")]
194pub type Ciplen = crate::Reg<ciplen::CiplenSpec>;
195#[doc = "Cipher Length"]
196pub mod ciplen;
197#[doc = "RANDSEED (rw) register accessor: Random Seed\n\nYou can [`read`](crate::Reg::read) this register and get [`randseed::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`randseed::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@randseed`]
198module"]
199#[doc(alias = "RANDSEED")]
200pub type Randseed = crate::Reg<randseed::RandseedSpec>;
201#[doc = "Random Seed"]
202pub mod randseed;