esp32h2/
rsa.rs

1#[repr(C)]
2#[cfg_attr(feature = "impl-register-debug", derive(Debug))]
3#[doc = "Register block"]
4pub struct RegisterBlock {
5    m_mem: [M_MEM; 96],
6    _reserved1: [u8; 0x80],
7    z_mem: [Z_MEM; 96],
8    _reserved2: [u8; 0x80],
9    y_mem: [Y_MEM; 96],
10    _reserved3: [u8; 0x80],
11    x_mem: [X_MEM; 96],
12    _reserved4: [u8; 0x80],
13    m_prime: M_PRIME,
14    mode: MODE,
15    query_clean: QUERY_CLEAN,
16    set_start_modexp: SET_START_MODEXP,
17    set_start_modmult: SET_START_MODMULT,
18    set_start_mult: SET_START_MULT,
19    query_idle: QUERY_IDLE,
20    int_clr: INT_CLR,
21    constant_time: CONSTANT_TIME,
22    search_enable: SEARCH_ENABLE,
23    search_pos: SEARCH_POS,
24    int_ena: INT_ENA,
25    date: DATE,
26}
27impl RegisterBlock {
28    #[doc = "0x00..0x180 - Represents M"]
29    #[inline(always)]
30    pub const fn m_mem(&self, n: usize) -> &M_MEM {
31        &self.m_mem[n]
32    }
33    #[doc = "Iterator for array of:"]
34    #[doc = "0x00..0x180 - Represents M"]
35    #[inline(always)]
36    pub fn m_mem_iter(&self) -> impl Iterator<Item = &M_MEM> {
37        self.m_mem.iter()
38    }
39    #[doc = "0x200..0x380 - Represents Z"]
40    #[inline(always)]
41    pub const fn z_mem(&self, n: usize) -> &Z_MEM {
42        &self.z_mem[n]
43    }
44    #[doc = "Iterator for array of:"]
45    #[doc = "0x200..0x380 - Represents Z"]
46    #[inline(always)]
47    pub fn z_mem_iter(&self) -> impl Iterator<Item = &Z_MEM> {
48        self.z_mem.iter()
49    }
50    #[doc = "0x400..0x580 - Represents Y"]
51    #[inline(always)]
52    pub const fn y_mem(&self, n: usize) -> &Y_MEM {
53        &self.y_mem[n]
54    }
55    #[doc = "Iterator for array of:"]
56    #[doc = "0x400..0x580 - Represents Y"]
57    #[inline(always)]
58    pub fn y_mem_iter(&self) -> impl Iterator<Item = &Y_MEM> {
59        self.y_mem.iter()
60    }
61    #[doc = "0x600..0x780 - Represents X"]
62    #[inline(always)]
63    pub const fn x_mem(&self, n: usize) -> &X_MEM {
64        &self.x_mem[n]
65    }
66    #[doc = "Iterator for array of:"]
67    #[doc = "0x600..0x780 - Represents X"]
68    #[inline(always)]
69    pub fn x_mem_iter(&self) -> impl Iterator<Item = &X_MEM> {
70        self.x_mem.iter()
71    }
72    #[doc = "0x800 - Represents M’"]
73    #[inline(always)]
74    pub const fn m_prime(&self) -> &M_PRIME {
75        &self.m_prime
76    }
77    #[doc = "0x804 - Configures RSA length"]
78    #[inline(always)]
79    pub const fn mode(&self) -> &MODE {
80        &self.mode
81    }
82    #[doc = "0x808 - RSA clean register"]
83    #[inline(always)]
84    pub const fn query_clean(&self) -> &QUERY_CLEAN {
85        &self.query_clean
86    }
87    #[doc = "0x80c - Starts modular exponentiation"]
88    #[inline(always)]
89    pub const fn set_start_modexp(&self) -> &SET_START_MODEXP {
90        &self.set_start_modexp
91    }
92    #[doc = "0x810 - Starts modular multiplication"]
93    #[inline(always)]
94    pub const fn set_start_modmult(&self) -> &SET_START_MODMULT {
95        &self.set_start_modmult
96    }
97    #[doc = "0x814 - Starts multiplication"]
98    #[inline(always)]
99    pub const fn set_start_mult(&self) -> &SET_START_MULT {
100        &self.set_start_mult
101    }
102    #[doc = "0x818 - Represents the RSA status"]
103    #[inline(always)]
104    pub const fn query_idle(&self) -> &QUERY_IDLE {
105        &self.query_idle
106    }
107    #[doc = "0x81c - Clears RSA interrupt"]
108    #[inline(always)]
109    pub const fn int_clr(&self) -> &INT_CLR {
110        &self.int_clr
111    }
112    #[doc = "0x820 - Configures the constant_time option"]
113    #[inline(always)]
114    pub const fn constant_time(&self) -> &CONSTANT_TIME {
115        &self.constant_time
116    }
117    #[doc = "0x824 - Configures the search option"]
118    #[inline(always)]
119    pub const fn search_enable(&self) -> &SEARCH_ENABLE {
120        &self.search_enable
121    }
122    #[doc = "0x828 - Configures the search position"]
123    #[inline(always)]
124    pub const fn search_pos(&self) -> &SEARCH_POS {
125        &self.search_pos
126    }
127    #[doc = "0x82c - Enables the RSA interrupt"]
128    #[inline(always)]
129    pub const fn int_ena(&self) -> &INT_ENA {
130        &self.int_ena
131    }
132    #[doc = "0x830 - Version control register"]
133    #[inline(always)]
134    pub const fn date(&self) -> &DATE {
135        &self.date
136    }
137}
138#[doc = "M_MEM (rw) register accessor: Represents M\n\nYou can [`read`](crate::Reg::read) this register and get [`m_mem::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`m_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@m_mem`] module"]
139pub type M_MEM = crate::Reg<m_mem::M_MEM_SPEC>;
140#[doc = "Represents M"]
141pub mod m_mem;
142#[doc = "Z_MEM (rw) register accessor: Represents Z\n\nYou can [`read`](crate::Reg::read) this register and get [`z_mem::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`z_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@z_mem`] module"]
143pub type Z_MEM = crate::Reg<z_mem::Z_MEM_SPEC>;
144#[doc = "Represents Z"]
145pub mod z_mem;
146#[doc = "Y_MEM (rw) register accessor: Represents Y\n\nYou can [`read`](crate::Reg::read) this register and get [`y_mem::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`y_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@y_mem`] module"]
147pub type Y_MEM = crate::Reg<y_mem::Y_MEM_SPEC>;
148#[doc = "Represents Y"]
149pub mod y_mem;
150#[doc = "X_MEM (rw) register accessor: Represents X\n\nYou can [`read`](crate::Reg::read) this register and get [`x_mem::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`x_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@x_mem`] module"]
151pub type X_MEM = crate::Reg<x_mem::X_MEM_SPEC>;
152#[doc = "Represents X"]
153pub mod x_mem;
154#[doc = "M_PRIME (rw) register accessor: Represents M’\n\nYou can [`read`](crate::Reg::read) this register and get [`m_prime::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`m_prime::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@m_prime`] module"]
155pub type M_PRIME = crate::Reg<m_prime::M_PRIME_SPEC>;
156#[doc = "Represents M’"]
157pub mod m_prime;
158#[doc = "MODE (rw) register accessor: Configures RSA length\n\nYou can [`read`](crate::Reg::read) this register and get [`mode::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mode::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@mode`] module"]
159pub type MODE = crate::Reg<mode::MODE_SPEC>;
160#[doc = "Configures RSA length"]
161pub mod mode;
162#[doc = "QUERY_CLEAN (r) register accessor: RSA clean register\n\nYou can [`read`](crate::Reg::read) this register and get [`query_clean::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@query_clean`] module"]
163pub type QUERY_CLEAN = crate::Reg<query_clean::QUERY_CLEAN_SPEC>;
164#[doc = "RSA clean register"]
165pub mod query_clean;
166#[doc = "SET_START_MODEXP (w) register accessor: Starts modular exponentiation\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_start_modexp::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_start_modexp`] module"]
167pub type SET_START_MODEXP = crate::Reg<set_start_modexp::SET_START_MODEXP_SPEC>;
168#[doc = "Starts modular exponentiation"]
169pub mod set_start_modexp;
170#[doc = "SET_START_MODMULT (w) register accessor: Starts modular multiplication\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_start_modmult::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_start_modmult`] module"]
171pub type SET_START_MODMULT = crate::Reg<set_start_modmult::SET_START_MODMULT_SPEC>;
172#[doc = "Starts modular multiplication"]
173pub mod set_start_modmult;
174#[doc = "SET_START_MULT (w) register accessor: Starts multiplication\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`set_start_mult::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@set_start_mult`] module"]
175pub type SET_START_MULT = crate::Reg<set_start_mult::SET_START_MULT_SPEC>;
176#[doc = "Starts multiplication"]
177pub mod set_start_mult;
178#[doc = "QUERY_IDLE (r) register accessor: Represents the RSA status\n\nYou can [`read`](crate::Reg::read) this register and get [`query_idle::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@query_idle`] module"]
179pub type QUERY_IDLE = crate::Reg<query_idle::QUERY_IDLE_SPEC>;
180#[doc = "Represents the RSA status"]
181pub mod query_idle;
182#[doc = "INT_CLR (rw) register accessor: Clears RSA interrupt\n\nYou can [`read`](crate::Reg::read) this register and get [`int_clr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_clr::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@int_clr`] module"]
183pub type INT_CLR = crate::Reg<int_clr::INT_CLR_SPEC>;
184#[doc = "Clears RSA interrupt"]
185pub mod int_clr;
186#[doc = "CONSTANT_TIME (rw) register accessor: Configures the constant_time option\n\nYou can [`read`](crate::Reg::read) this register and get [`constant_time::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`constant_time::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@constant_time`] module"]
187pub type CONSTANT_TIME = crate::Reg<constant_time::CONSTANT_TIME_SPEC>;
188#[doc = "Configures the constant_time option"]
189pub mod constant_time;
190#[doc = "SEARCH_ENABLE (rw) register accessor: Configures the search option\n\nYou can [`read`](crate::Reg::read) this register and get [`search_enable::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`search_enable::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@search_enable`] module"]
191pub type SEARCH_ENABLE = crate::Reg<search_enable::SEARCH_ENABLE_SPEC>;
192#[doc = "Configures the search option"]
193pub mod search_enable;
194#[doc = "SEARCH_POS (rw) register accessor: Configures the search position\n\nYou can [`read`](crate::Reg::read) this register and get [`search_pos::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`search_pos::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@search_pos`] module"]
195pub type SEARCH_POS = crate::Reg<search_pos::SEARCH_POS_SPEC>;
196#[doc = "Configures the search position"]
197pub mod search_pos;
198#[doc = "INT_ENA (rw) register accessor: Enables the RSA interrupt\n\nYou can [`read`](crate::Reg::read) this register and get [`int_ena::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_ena::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@int_ena`] module"]
199pub type INT_ENA = crate::Reg<int_ena::INT_ENA_SPEC>;
200#[doc = "Enables the RSA interrupt"]
201pub mod int_ena;
202#[doc = "DATE (rw) register accessor: Version control 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"]
203pub type DATE = crate::Reg<date::DATE_SPEC>;
204#[doc = "Version control register"]
205pub mod date;