esp32/
sha.rs

1#[repr(C)]
2#[cfg_attr(feature = "impl-register-debug", derive(Debug))]
3#[doc = "Register block"]
4pub struct RegisterBlock {
5    text: [TEXT; 32],
6    sha1_start: SHA1_START,
7    sha1_continue: SHA1_CONTINUE,
8    sha1_load: SHA1_LOAD,
9    sha1_busy: SHA1_BUSY,
10    sha256_start: SHA256_START,
11    sha256_continue: SHA256_CONTINUE,
12    sha256_load: SHA256_LOAD,
13    sha256_busy: SHA256_BUSY,
14    sha384_start: SHA384_START,
15    sha384_continue: SHA384_CONTINUE,
16    sha384_load: SHA384_LOAD,
17    sha384_busy: SHA384_BUSY,
18    sha512_start: SHA512_START,
19    sha512_continue: SHA512_CONTINUE,
20    sha512_load: SHA512_LOAD,
21    sha512_busy: SHA512_BUSY,
22}
23impl RegisterBlock {
24    #[doc = "0x00..0x80 - "]
25    #[inline(always)]
26    pub const fn text(&self, n: usize) -> &TEXT {
27        &self.text[n]
28    }
29    #[doc = "Iterator for array of:"]
30    #[doc = "0x00..0x80 - "]
31    #[inline(always)]
32    pub fn text_iter(&self) -> impl Iterator<Item = &TEXT> {
33        self.text.iter()
34    }
35    #[doc = "0x80 - "]
36    #[inline(always)]
37    pub const fn sha1_start(&self) -> &SHA1_START {
38        &self.sha1_start
39    }
40    #[doc = "0x84 - "]
41    #[inline(always)]
42    pub const fn sha1_continue(&self) -> &SHA1_CONTINUE {
43        &self.sha1_continue
44    }
45    #[doc = "0x88 - "]
46    #[inline(always)]
47    pub const fn sha1_load(&self) -> &SHA1_LOAD {
48        &self.sha1_load
49    }
50    #[doc = "0x8c - "]
51    #[inline(always)]
52    pub const fn sha1_busy(&self) -> &SHA1_BUSY {
53        &self.sha1_busy
54    }
55    #[doc = "0x90 - "]
56    #[inline(always)]
57    pub const fn sha256_start(&self) -> &SHA256_START {
58        &self.sha256_start
59    }
60    #[doc = "0x94 - "]
61    #[inline(always)]
62    pub const fn sha256_continue(&self) -> &SHA256_CONTINUE {
63        &self.sha256_continue
64    }
65    #[doc = "0x98 - "]
66    #[inline(always)]
67    pub const fn sha256_load(&self) -> &SHA256_LOAD {
68        &self.sha256_load
69    }
70    #[doc = "0x9c - "]
71    #[inline(always)]
72    pub const fn sha256_busy(&self) -> &SHA256_BUSY {
73        &self.sha256_busy
74    }
75    #[doc = "0xa0 - "]
76    #[inline(always)]
77    pub const fn sha384_start(&self) -> &SHA384_START {
78        &self.sha384_start
79    }
80    #[doc = "0xa4 - "]
81    #[inline(always)]
82    pub const fn sha384_continue(&self) -> &SHA384_CONTINUE {
83        &self.sha384_continue
84    }
85    #[doc = "0xa8 - "]
86    #[inline(always)]
87    pub const fn sha384_load(&self) -> &SHA384_LOAD {
88        &self.sha384_load
89    }
90    #[doc = "0xac - "]
91    #[inline(always)]
92    pub const fn sha384_busy(&self) -> &SHA384_BUSY {
93        &self.sha384_busy
94    }
95    #[doc = "0xb0 - "]
96    #[inline(always)]
97    pub const fn sha512_start(&self) -> &SHA512_START {
98        &self.sha512_start
99    }
100    #[doc = "0xb4 - "]
101    #[inline(always)]
102    pub const fn sha512_continue(&self) -> &SHA512_CONTINUE {
103        &self.sha512_continue
104    }
105    #[doc = "0xb8 - "]
106    #[inline(always)]
107    pub const fn sha512_load(&self) -> &SHA512_LOAD {
108        &self.sha512_load
109    }
110    #[doc = "0xbc - "]
111    #[inline(always)]
112    pub const fn sha512_busy(&self) -> &SHA512_BUSY {
113        &self.sha512_busy
114    }
115}
116#[doc = "TEXT (rw) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`text::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`text::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@text`] module"]
117pub type TEXT = crate::Reg<text::TEXT_SPEC>;
118#[doc = ""]
119pub mod text;
120#[doc = "SHA1_START (w) register accessor: \n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sha1_start::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha1_start`] module"]
121pub type SHA1_START = crate::Reg<sha1_start::SHA1_START_SPEC>;
122#[doc = ""]
123pub mod sha1_start;
124#[doc = "SHA1_CONTINUE (w) register accessor: \n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sha1_continue::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha1_continue`] module"]
125pub type SHA1_CONTINUE = crate::Reg<sha1_continue::SHA1_CONTINUE_SPEC>;
126#[doc = ""]
127pub mod sha1_continue;
128#[doc = "SHA1_LOAD (w) register accessor: \n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sha1_load::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha1_load`] module"]
129pub type SHA1_LOAD = crate::Reg<sha1_load::SHA1_LOAD_SPEC>;
130#[doc = ""]
131pub mod sha1_load;
132#[doc = "SHA1_BUSY (r) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`sha1_busy::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha1_busy`] module"]
133pub type SHA1_BUSY = crate::Reg<sha1_busy::SHA1_BUSY_SPEC>;
134#[doc = ""]
135pub mod sha1_busy;
136#[doc = "SHA256_START (w) register accessor: \n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sha256_start::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha256_start`] module"]
137pub type SHA256_START = crate::Reg<sha256_start::SHA256_START_SPEC>;
138#[doc = ""]
139pub mod sha256_start;
140#[doc = "SHA256_LOAD (w) register accessor: \n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sha256_load::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha256_load`] module"]
141pub type SHA256_LOAD = crate::Reg<sha256_load::SHA256_LOAD_SPEC>;
142#[doc = ""]
143pub mod sha256_load;
144#[doc = "SHA256_CONTINUE (w) register accessor: \n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sha256_continue::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha256_continue`] module"]
145pub type SHA256_CONTINUE = crate::Reg<sha256_continue::SHA256_CONTINUE_SPEC>;
146#[doc = ""]
147pub mod sha256_continue;
148#[doc = "SHA256_BUSY (r) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`sha256_busy::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha256_busy`] module"]
149pub type SHA256_BUSY = crate::Reg<sha256_busy::SHA256_BUSY_SPEC>;
150#[doc = ""]
151pub mod sha256_busy;
152#[doc = "SHA384_START (w) register accessor: \n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sha384_start::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha384_start`] module"]
153pub type SHA384_START = crate::Reg<sha384_start::SHA384_START_SPEC>;
154#[doc = ""]
155pub mod sha384_start;
156#[doc = "SHA384_CONTINUE (w) register accessor: \n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sha384_continue::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha384_continue`] module"]
157pub type SHA384_CONTINUE = crate::Reg<sha384_continue::SHA384_CONTINUE_SPEC>;
158#[doc = ""]
159pub mod sha384_continue;
160#[doc = "SHA384_LOAD (w) register accessor: \n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sha384_load::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha384_load`] module"]
161pub type SHA384_LOAD = crate::Reg<sha384_load::SHA384_LOAD_SPEC>;
162#[doc = ""]
163pub mod sha384_load;
164#[doc = "SHA384_BUSY (r) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`sha384_busy::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha384_busy`] module"]
165pub type SHA384_BUSY = crate::Reg<sha384_busy::SHA384_BUSY_SPEC>;
166#[doc = ""]
167pub mod sha384_busy;
168#[doc = "SHA512_START (w) register accessor: \n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sha512_start::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha512_start`] module"]
169pub type SHA512_START = crate::Reg<sha512_start::SHA512_START_SPEC>;
170#[doc = ""]
171pub mod sha512_start;
172#[doc = "SHA512_CONTINUE (w) register accessor: \n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sha512_continue::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha512_continue`] module"]
173pub type SHA512_CONTINUE = crate::Reg<sha512_continue::SHA512_CONTINUE_SPEC>;
174#[doc = ""]
175pub mod sha512_continue;
176#[doc = "SHA512_LOAD (w) register accessor: \n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sha512_load::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha512_load`] module"]
177pub type SHA512_LOAD = crate::Reg<sha512_load::SHA512_LOAD_SPEC>;
178#[doc = ""]
179pub mod sha512_load;
180#[doc = "SHA512_BUSY (r) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`sha512_busy::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sha512_busy`] module"]
181pub type SHA512_BUSY = crate::Reg<sha512_busy::SHA512_BUSY_SPEC>;
182#[doc = ""]
183pub mod sha512_busy;