mimxrt685s_pac/
hashcrypt.rs

1#[repr(C)]
2#[cfg_attr(feature = "debug", derive(Debug))]
3#[doc = "Register block"]
4pub struct RegisterBlock {
5    ctrl: Ctrl,
6    status: Status,
7    intenset: Intenset,
8    intenclr: Intenclr,
9    memctrl: Memctrl,
10    memaddr: Memaddr,
11    _reserved6: [u8; 0x08],
12    indata: Indata,
13    alias: [Alias; 7],
14    digest0: [Digest0; 8],
15    _reserved9: [u8; 0x20],
16    cryptcfg: Cryptcfg,
17    config: Config,
18    _reserved11: [u8; 0x04],
19    lock: Lock,
20    mask: [Mask; 4],
21    reload: [Reload; 8],
22    _reserved14: [u8; 0x10],
23    prng_seed: PrngSeed,
24    _reserved15: [u8; 0x04],
25    prng_out: PrngOut,
26}
27impl RegisterBlock {
28    #[doc = "0x00 - Control register to enable and operate Hash and Crypto"]
29    #[inline(always)]
30    pub const fn ctrl(&self) -> &Ctrl {
31        &self.ctrl
32    }
33    #[doc = "0x04 - Indicates status of Hash peripheral."]
34    #[inline(always)]
35    pub const fn status(&self) -> &Status {
36        &self.status
37    }
38    #[doc = "0x08 - Write 1 to enable interrupts; reads back with which are set."]
39    #[inline(always)]
40    pub const fn intenset(&self) -> &Intenset {
41        &self.intenset
42    }
43    #[doc = "0x0c - Write 1 to clear interrupts."]
44    #[inline(always)]
45    pub const fn intenclr(&self) -> &Intenclr {
46        &self.intenclr
47    }
48    #[doc = "0x10 - Setup Master to access memory (if available)"]
49    #[inline(always)]
50    pub const fn memctrl(&self) -> &Memctrl {
51        &self.memctrl
52    }
53    #[doc = "0x14 - Address to start memory access from (if available)."]
54    #[inline(always)]
55    pub const fn memaddr(&self) -> &Memaddr {
56        &self.memaddr
57    }
58    #[doc = "0x20 - Input of 16 words at a time to load up buffer."]
59    #[inline(always)]
60    pub const fn indata(&self) -> &Indata {
61        &self.indata
62    }
63    #[doc = "0x24..0x40 - no description available"]
64    #[inline(always)]
65    pub const fn alias(&self, n: usize) -> &Alias {
66        &self.alias[n]
67    }
68    #[doc = "Iterator for array of:"]
69    #[doc = "0x24..0x40 - no description available"]
70    #[inline(always)]
71    pub fn alias_iter(&self) -> impl Iterator<Item = &Alias> {
72        self.alias.iter()
73    }
74    #[doc = "0x40..0x60 - no description available"]
75    #[inline(always)]
76    pub const fn digest0(&self, n: usize) -> &Digest0 {
77        &self.digest0[n]
78    }
79    #[doc = "Iterator for array of:"]
80    #[doc = "0x40..0x60 - no description available"]
81    #[inline(always)]
82    pub fn digest0_iter(&self) -> impl Iterator<Item = &Digest0> {
83        self.digest0.iter()
84    }
85    #[doc = "0x80 - Crypto settings for AES and Salsa and ChaCha"]
86    #[inline(always)]
87    pub const fn cryptcfg(&self) -> &Cryptcfg {
88        &self.cryptcfg
89    }
90    #[doc = "0x84 - Returns the configuration of this block in this chip - indicates what services are available."]
91    #[inline(always)]
92    pub const fn config(&self) -> &Config {
93        &self.config
94    }
95    #[doc = "0x8c - Lock register allows locking to the current security level or unlocking by the lock holding level."]
96    #[inline(always)]
97    pub const fn lock(&self) -> &Lock {
98        &self.lock
99    }
100    #[doc = "0x90..0xa0 - no description available"]
101    #[inline(always)]
102    pub const fn mask(&self, n: usize) -> &Mask {
103        &self.mask[n]
104    }
105    #[doc = "Iterator for array of:"]
106    #[doc = "0x90..0xa0 - no description available"]
107    #[inline(always)]
108    pub fn mask_iter(&self) -> impl Iterator<Item = &Mask> {
109        self.mask.iter()
110    }
111    #[doc = "0xa0..0xc0 - no description available"]
112    #[inline(always)]
113    pub const fn reload(&self, n: usize) -> &Reload {
114        &self.reload[n]
115    }
116    #[doc = "Iterator for array of:"]
117    #[doc = "0xa0..0xc0 - no description available"]
118    #[inline(always)]
119    pub fn reload_iter(&self) -> impl Iterator<Item = &Reload> {
120        self.reload.iter()
121    }
122    #[doc = "0xd0 - PRNG random seed input value used as an entropy source"]
123    #[inline(always)]
124    pub const fn prng_seed(&self) -> &PrngSeed {
125        &self.prng_seed
126    }
127    #[doc = "0xd8 - PRNG software-accessable random output value"]
128    #[inline(always)]
129    pub const fn prng_out(&self) -> &PrngOut {
130        &self.prng_out
131    }
132}
133#[doc = "CTRL (rw) register accessor: Control register to enable and operate Hash and Crypto\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrl::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@ctrl`]
134module"]
135#[doc(alias = "CTRL")]
136pub type Ctrl = crate::Reg<ctrl::CtrlSpec>;
137#[doc = "Control register to enable and operate Hash and Crypto"]
138pub mod ctrl;
139#[doc = "STATUS (rw) register accessor: Indicates status of Hash peripheral.\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`status::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@status`]
140module"]
141#[doc(alias = "STATUS")]
142pub type Status = crate::Reg<status::StatusSpec>;
143#[doc = "Indicates status of Hash peripheral."]
144pub mod status;
145#[doc = "INTENSET (rw) register accessor: Write 1 to enable interrupts; reads back with which are 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`]
146module"]
147#[doc(alias = "INTENSET")]
148pub type Intenset = crate::Reg<intenset::IntensetSpec>;
149#[doc = "Write 1 to enable interrupts; reads back with which are set."]
150pub mod intenset;
151#[doc = "INTENCLR (rw) register accessor: Write 1 to clear interrupts.\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`]
152module"]
153#[doc(alias = "INTENCLR")]
154pub type Intenclr = crate::Reg<intenclr::IntenclrSpec>;
155#[doc = "Write 1 to clear interrupts."]
156pub mod intenclr;
157#[doc = "MEMCTRL (rw) register accessor: Setup Master to access memory (if available)\n\nYou can [`read`](crate::Reg::read) this register and get [`memctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`memctrl::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@memctrl`]
158module"]
159#[doc(alias = "MEMCTRL")]
160pub type Memctrl = crate::Reg<memctrl::MemctrlSpec>;
161#[doc = "Setup Master to access memory (if available)"]
162pub mod memctrl;
163#[doc = "MEMADDR (rw) register accessor: Address to start memory access from (if available).\n\nYou can [`read`](crate::Reg::read) this register and get [`memaddr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`memaddr::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@memaddr`]
164module"]
165#[doc(alias = "MEMADDR")]
166pub type Memaddr = crate::Reg<memaddr::MemaddrSpec>;
167#[doc = "Address to start memory access from (if available)."]
168pub mod memaddr;
169#[doc = "INDATA (w) register accessor: Input of 16 words at a time to load up buffer.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`indata::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@indata`]
170module"]
171#[doc(alias = "INDATA")]
172pub type Indata = crate::Reg<indata::IndataSpec>;
173#[doc = "Input of 16 words at a time to load up buffer."]
174pub mod indata;
175#[doc = "ALIAS (w) register accessor: no description available\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`alias::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@alias`]
176module"]
177#[doc(alias = "ALIAS")]
178pub type Alias = crate::Reg<alias::AliasSpec>;
179#[doc = "no description available"]
180pub mod alias;
181#[doc = "DIGEST0 (r) register accessor: no description available\n\nYou can [`read`](crate::Reg::read) this register and get [`digest0::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@digest0`]
182module"]
183#[doc(alias = "DIGEST0")]
184pub type Digest0 = crate::Reg<digest0::Digest0Spec>;
185#[doc = "no description available"]
186pub mod digest0;
187#[doc = "CRYPTCFG (rw) register accessor: Crypto settings for AES and Salsa and ChaCha\n\nYou can [`read`](crate::Reg::read) this register and get [`cryptcfg::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cryptcfg::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@cryptcfg`]
188module"]
189#[doc(alias = "CRYPTCFG")]
190pub type Cryptcfg = crate::Reg<cryptcfg::CryptcfgSpec>;
191#[doc = "Crypto settings for AES and Salsa and ChaCha"]
192pub mod cryptcfg;
193#[doc = "CONFIG (rw) register accessor: Returns the configuration of this block in this chip - indicates what services are available.\n\nYou can [`read`](crate::Reg::read) this register and get [`config::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`config::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@config`]
194module"]
195#[doc(alias = "CONFIG")]
196pub type Config = crate::Reg<config::ConfigSpec>;
197#[doc = "Returns the configuration of this block in this chip - indicates what services are available."]
198pub mod config;
199#[doc = "LOCK (rw) register accessor: Lock register allows locking to the current security level or unlocking by the lock holding level.\n\nYou can [`read`](crate::Reg::read) this register and get [`lock::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`lock::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@lock`]
200module"]
201#[doc(alias = "LOCK")]
202pub type Lock = crate::Reg<lock::LockSpec>;
203#[doc = "Lock register allows locking to the current security level or unlocking by the lock holding level."]
204pub mod lock;
205#[doc = "MASK (w) register accessor: no description available\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mask::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@mask`]
206module"]
207#[doc(alias = "MASK")]
208pub type Mask = crate::Reg<mask::MaskSpec>;
209#[doc = "no description available"]
210pub mod mask;
211#[doc = "RELOAD (w) register accessor: no description available\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`reload::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@reload`]
212module"]
213#[doc(alias = "RELOAD")]
214pub type Reload = crate::Reg<reload::ReloadSpec>;
215#[doc = "no description available"]
216pub mod reload;
217#[doc = "PRNG_SEED (w) register accessor: PRNG random seed input value used as an entropy source\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`prng_seed::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@prng_seed`]
218module"]
219#[doc(alias = "PRNG_SEED")]
220pub type PrngSeed = crate::Reg<prng_seed::PrngSeedSpec>;
221#[doc = "PRNG random seed input value used as an entropy source"]
222pub mod prng_seed;
223#[doc = "PRNG_OUT (r) register accessor: PRNG software-accessable random output value\n\nYou can [`read`](crate::Reg::read) this register and get [`prng_out::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@prng_out`]
224module"]
225#[doc(alias = "PRNG_OUT")]
226pub type PrngOut = crate::Reg<prng_out::PrngOutSpec>;
227#[doc = "PRNG software-accessable random output value"]
228pub mod prng_out;