esp32c3/
hmac.rs

1#[repr(C)]
2#[cfg_attr(feature = "impl-register-debug", derive(Debug))]
3#[doc = "Register block"]
4pub struct RegisterBlock {
5    _reserved0: [u8; 0x40],
6    set_start: SET_START,
7    set_para_purpose: SET_PARA_PURPOSE,
8    set_para_key: SET_PARA_KEY,
9    set_para_finish: SET_PARA_FINISH,
10    set_message_one: SET_MESSAGE_ONE,
11    set_message_ing: SET_MESSAGE_ING,
12    set_message_end: SET_MESSAGE_END,
13    set_result_finish: SET_RESULT_FINISH,
14    set_invalidate_jtag: SET_INVALIDATE_JTAG,
15    set_invalidate_ds: SET_INVALIDATE_DS,
16    query_error: QUERY_ERROR,
17    query_busy: QUERY_BUSY,
18    _reserved12: [u8; 0x10],
19    wr_message_mem: [WR_MESSAGE_MEM; 16],
20    rd_result_mem: [RD_RESULT_MEM; 8],
21    _reserved14: [u8; 0x10],
22    set_message_pad: SET_MESSAGE_PAD,
23    one_block: ONE_BLOCK,
24    soft_jtag_ctrl: SOFT_JTAG_CTRL,
25    wr_jtag: WR_JTAG,
26}
27impl RegisterBlock {
28    #[doc = "0x40 - Process control register 0."]
29    #[inline(always)]
30    pub const fn set_start(&self) -> &SET_START {
31        &self.set_start
32    }
33    #[doc = "0x44 - Configure purpose."]
34    #[inline(always)]
35    pub const fn set_para_purpose(&self) -> &SET_PARA_PURPOSE {
36        &self.set_para_purpose
37    }
38    #[doc = "0x48 - Configure key."]
39    #[inline(always)]
40    pub const fn set_para_key(&self) -> &SET_PARA_KEY {
41        &self.set_para_key
42    }
43    #[doc = "0x4c - Finish initial configuration."]
44    #[inline(always)]
45    pub const fn set_para_finish(&self) -> &SET_PARA_FINISH {
46        &self.set_para_finish
47    }
48    #[doc = "0x50 - Process control register 1."]
49    #[inline(always)]
50    pub const fn set_message_one(&self) -> &SET_MESSAGE_ONE {
51        &self.set_message_one
52    }
53    #[doc = "0x54 - Process control register 2."]
54    #[inline(always)]
55    pub const fn set_message_ing(&self) -> &SET_MESSAGE_ING {
56        &self.set_message_ing
57    }
58    #[doc = "0x58 - Process control register 3."]
59    #[inline(always)]
60    pub const fn set_message_end(&self) -> &SET_MESSAGE_END {
61        &self.set_message_end
62    }
63    #[doc = "0x5c - Process control register 4."]
64    #[inline(always)]
65    pub const fn set_result_finish(&self) -> &SET_RESULT_FINISH {
66        &self.set_result_finish
67    }
68    #[doc = "0x60 - Invalidate register 0."]
69    #[inline(always)]
70    pub const fn set_invalidate_jtag(&self) -> &SET_INVALIDATE_JTAG {
71        &self.set_invalidate_jtag
72    }
73    #[doc = "0x64 - Invalidate register 1."]
74    #[inline(always)]
75    pub const fn set_invalidate_ds(&self) -> &SET_INVALIDATE_DS {
76        &self.set_invalidate_ds
77    }
78    #[doc = "0x68 - Error register."]
79    #[inline(always)]
80    pub const fn query_error(&self) -> &QUERY_ERROR {
81        &self.query_error
82    }
83    #[doc = "0x6c - Busy register."]
84    #[inline(always)]
85    pub const fn query_busy(&self) -> &QUERY_BUSY {
86        &self.query_busy
87    }
88    #[doc = "0x80..0xc0 - Message block memory."]
89    #[inline(always)]
90    pub const fn wr_message_mem(&self, n: usize) -> &WR_MESSAGE_MEM {
91        &self.wr_message_mem[n]
92    }
93    #[doc = "Iterator for array of:"]
94    #[doc = "0x80..0xc0 - Message block memory."]
95    #[inline(always)]
96    pub fn wr_message_mem_iter(&self) -> impl Iterator<Item = &WR_MESSAGE_MEM> {
97        self.wr_message_mem.iter()
98    }
99    #[doc = "0xc0..0xe0 - Result from upstream."]
100    #[inline(always)]
101    pub const fn rd_result_mem(&self, n: usize) -> &RD_RESULT_MEM {
102        &self.rd_result_mem[n]
103    }
104    #[doc = "Iterator for array of:"]
105    #[doc = "0xc0..0xe0 - Result from upstream."]
106    #[inline(always)]
107    pub fn rd_result_mem_iter(&self) -> impl Iterator<Item = &RD_RESULT_MEM> {
108        self.rd_result_mem.iter()
109    }
110    #[doc = "0xf0 - Process control register 5."]
111    #[inline(always)]
112    pub const fn set_message_pad(&self) -> &SET_MESSAGE_PAD {
113        &self.set_message_pad
114    }
115    #[doc = "0xf4 - Process control register 6."]
116    #[inline(always)]
117    pub const fn one_block(&self) -> &ONE_BLOCK {
118        &self.one_block
119    }
120    #[doc = "0xf8 - Jtag register 0."]
121    #[inline(always)]
122    pub const fn soft_jtag_ctrl(&self) -> &SOFT_JTAG_CTRL {
123        &self.soft_jtag_ctrl
124    }
125    #[doc = "0xfc - Jtag register 1."]
126    #[inline(always)]
127    pub const fn wr_jtag(&self) -> &WR_JTAG {
128        &self.wr_jtag
129    }
130}
131#[doc = "SET_START (w) register accessor: Process control register 0.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_start::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_start`] module"]
132pub type SET_START = crate::Reg<set_start::SET_START_SPEC>;
133#[doc = "Process control register 0."]
134pub mod set_start;
135#[doc = "SET_PARA_PURPOSE (w) register accessor: Configure purpose.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_para_purpose::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_para_purpose`] module"]
136pub type SET_PARA_PURPOSE = crate::Reg<set_para_purpose::SET_PARA_PURPOSE_SPEC>;
137#[doc = "Configure purpose."]
138pub mod set_para_purpose;
139#[doc = "SET_PARA_KEY (w) register accessor: Configure key.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_para_key::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_para_key`] module"]
140pub type SET_PARA_KEY = crate::Reg<set_para_key::SET_PARA_KEY_SPEC>;
141#[doc = "Configure key."]
142pub mod set_para_key;
143#[doc = "SET_PARA_FINISH (w) register accessor: Finish initial configuration.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_para_finish::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_para_finish`] module"]
144pub type SET_PARA_FINISH = crate::Reg<set_para_finish::SET_PARA_FINISH_SPEC>;
145#[doc = "Finish initial configuration."]
146pub mod set_para_finish;
147#[doc = "SET_MESSAGE_ONE (w) register accessor: Process control register 1.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_message_one::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_message_one`] module"]
148pub type SET_MESSAGE_ONE = crate::Reg<set_message_one::SET_MESSAGE_ONE_SPEC>;
149#[doc = "Process control register 1."]
150pub mod set_message_one;
151#[doc = "SET_MESSAGE_ING (w) register accessor: Process control register 2.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_message_ing::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_message_ing`] module"]
152pub type SET_MESSAGE_ING = crate::Reg<set_message_ing::SET_MESSAGE_ING_SPEC>;
153#[doc = "Process control register 2."]
154pub mod set_message_ing;
155#[doc = "SET_MESSAGE_END (w) register accessor: Process control register 3.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_message_end::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_message_end`] module"]
156pub type SET_MESSAGE_END = crate::Reg<set_message_end::SET_MESSAGE_END_SPEC>;
157#[doc = "Process control register 3."]
158pub mod set_message_end;
159#[doc = "SET_RESULT_FINISH (w) register accessor: Process control register 4.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_result_finish::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_result_finish`] module"]
160pub type SET_RESULT_FINISH = crate::Reg<set_result_finish::SET_RESULT_FINISH_SPEC>;
161#[doc = "Process control register 4."]
162pub mod set_result_finish;
163#[doc = "SET_INVALIDATE_JTAG (w) register accessor: Invalidate register 0.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_invalidate_jtag::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_invalidate_jtag`] module"]
164pub type SET_INVALIDATE_JTAG = crate::Reg<set_invalidate_jtag::SET_INVALIDATE_JTAG_SPEC>;
165#[doc = "Invalidate register 0."]
166pub mod set_invalidate_jtag;
167#[doc = "SET_INVALIDATE_DS (w) register accessor: Invalidate register 1.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_invalidate_ds::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_invalidate_ds`] module"]
168pub type SET_INVALIDATE_DS = crate::Reg<set_invalidate_ds::SET_INVALIDATE_DS_SPEC>;
169#[doc = "Invalidate register 1."]
170pub mod set_invalidate_ds;
171#[doc = "QUERY_ERROR (r) register accessor: Error register.\n\nYou can [`read`](crate::Reg::read) this register and get [`query_error::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@query_error`] module"]
172pub type QUERY_ERROR = crate::Reg<query_error::QUERY_ERROR_SPEC>;
173#[doc = "Error register."]
174pub mod query_error;
175#[doc = "QUERY_BUSY (r) register accessor: Busy register.\n\nYou can [`read`](crate::Reg::read) this register and get [`query_busy::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@query_busy`] module"]
176pub type QUERY_BUSY = crate::Reg<query_busy::QUERY_BUSY_SPEC>;
177#[doc = "Busy register."]
178pub mod query_busy;
179#[doc = "WR_MESSAGE_MEM (rw) register accessor: Message block memory.\n\nYou can [`read`](crate::Reg::read) this register and get [`wr_message_mem::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`wr_message_mem::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@wr_message_mem`] module"]
180pub type WR_MESSAGE_MEM = crate::Reg<wr_message_mem::WR_MESSAGE_MEM_SPEC>;
181#[doc = "Message block memory."]
182pub mod wr_message_mem;
183#[doc = "RD_RESULT_MEM (rw) register accessor: Result from upstream.\n\nYou can [`read`](crate::Reg::read) this register and get [`rd_result_mem::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`rd_result_mem::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@rd_result_mem`] module"]
184pub type RD_RESULT_MEM = crate::Reg<rd_result_mem::RD_RESULT_MEM_SPEC>;
185#[doc = "Result from upstream."]
186pub mod rd_result_mem;
187#[doc = "SET_MESSAGE_PAD (w) register accessor: Process control register 5.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_message_pad::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_message_pad`] module"]
188pub type SET_MESSAGE_PAD = crate::Reg<set_message_pad::SET_MESSAGE_PAD_SPEC>;
189#[doc = "Process control register 5."]
190pub mod set_message_pad;
191#[doc = "ONE_BLOCK (w) register accessor: Process control register 6.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`one_block::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@one_block`] module"]
192pub type ONE_BLOCK = crate::Reg<one_block::ONE_BLOCK_SPEC>;
193#[doc = "Process control register 6."]
194pub mod one_block;
195#[doc = "SOFT_JTAG_CTRL (w) register accessor: Jtag register 0.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`soft_jtag_ctrl::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@soft_jtag_ctrl`] module"]
196pub type SOFT_JTAG_CTRL = crate::Reg<soft_jtag_ctrl::SOFT_JTAG_CTRL_SPEC>;
197#[doc = "Jtag register 0."]
198pub mod soft_jtag_ctrl;
199#[doc = "WR_JTAG (w) register accessor: Jtag register 1.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`wr_jtag::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@wr_jtag`] module"]
200pub type WR_JTAG = crate::Reg<wr_jtag::WR_JTAG_SPEC>;
201#[doc = "Jtag register 1."]
202pub mod wr_jtag;