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