bl702_pac/sec_eng/
se_trng_0_ctrl_0.rs1#[doc = "Register `se_trng_0_ctrl_0` reader"]
2pub struct R(crate::R<SE_TRNG_0_CTRL_0_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<SE_TRNG_0_CTRL_0_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<SE_TRNG_0_CTRL_0_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<SE_TRNG_0_CTRL_0_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `se_trng_0_ctrl_0` writer"]
17pub struct W(crate::W<SE_TRNG_0_CTRL_0_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<SE_TRNG_0_CTRL_0_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<SE_TRNG_0_CTRL_0_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<SE_TRNG_0_CTRL_0_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `se_trng_0_busy` reader - "]
38pub type SE_TRNG_0_BUSY_R = crate::BitReader<bool>;
39#[doc = "Field `se_trng_0_busy` writer - "]
40pub type SE_TRNG_0_BUSY_W<'a, const O: u8> =
41 crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
42#[doc = "Field `se_trng_0_trig_1t` reader - "]
43pub type SE_TRNG_0_TRIG_1T_R = crate::BitReader<bool>;
44#[doc = "Field `se_trng_0_trig_1t` writer - "]
45pub type SE_TRNG_0_TRIG_1T_W<'a, const O: u8> =
46 crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
47#[doc = "Field `se_trng_0_en` reader - "]
48pub type SE_TRNG_0_EN_R = crate::BitReader<bool>;
49#[doc = "Field `se_trng_0_en` writer - "]
50pub type SE_TRNG_0_EN_W<'a, const O: u8> =
51 crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
52#[doc = "Field `se_trng_0_dout_clr_1t` reader - "]
53pub type SE_TRNG_0_DOUT_CLR_1T_R = crate::BitReader<bool>;
54#[doc = "Field `se_trng_0_dout_clr_1t` writer - "]
55pub type SE_TRNG_0_DOUT_CLR_1T_W<'a, const O: u8> =
56 crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
57#[doc = "Field `se_trng_0_ht_error` reader - "]
58pub type SE_TRNG_0_HT_ERROR_R = crate::BitReader<bool>;
59#[doc = "Field `se_trng_0_ht_error` writer - "]
60pub type SE_TRNG_0_HT_ERROR_W<'a, const O: u8> =
61 crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
62#[doc = "Field `se_trng_0_int` reader - "]
63pub type SE_TRNG_0_INT_R = crate::BitReader<bool>;
64#[doc = "Field `se_trng_0_int` writer - "]
65pub type SE_TRNG_0_INT_W<'a, const O: u8> =
66 crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
67#[doc = "Field `se_trng_0_int_clr_1t` reader - "]
68pub type SE_TRNG_0_INT_CLR_1T_R = crate::BitReader<bool>;
69#[doc = "Field `se_trng_0_int_clr_1t` writer - "]
70pub type SE_TRNG_0_INT_CLR_1T_W<'a, const O: u8> =
71 crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
72#[doc = "Field `se_trng_0_int_set_1t` reader - "]
73pub type SE_TRNG_0_INT_SET_1T_R = crate::BitReader<bool>;
74#[doc = "Field `se_trng_0_int_set_1t` writer - "]
75pub type SE_TRNG_0_INT_SET_1T_W<'a, const O: u8> =
76 crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
77#[doc = "Field `se_trng_0_int_mask` reader - "]
78pub type SE_TRNG_0_INT_MASK_R = crate::BitReader<bool>;
79#[doc = "Field `se_trng_0_int_mask` writer - "]
80pub type SE_TRNG_0_INT_MASK_W<'a, const O: u8> =
81 crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
82#[doc = "Field `se_trng_0_manual_fun_sel` reader - "]
83pub type SE_TRNG_0_MANUAL_FUN_SEL_R = crate::BitReader<bool>;
84#[doc = "Field `se_trng_0_manual_fun_sel` writer - "]
85pub type SE_TRNG_0_MANUAL_FUN_SEL_W<'a, const O: u8> =
86 crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
87#[doc = "Field `se_trng_0_manual_reseed` reader - "]
88pub type SE_TRNG_0_MANUAL_RESEED_R = crate::BitReader<bool>;
89#[doc = "Field `se_trng_0_manual_reseed` writer - "]
90pub type SE_TRNG_0_MANUAL_RESEED_W<'a, const O: u8> =
91 crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
92#[doc = "Field `se_trng_0_manual_en` reader - "]
93pub type SE_TRNG_0_MANUAL_EN_R = crate::BitReader<bool>;
94#[doc = "Field `se_trng_0_manual_en` writer - "]
95pub type SE_TRNG_0_MANUAL_EN_W<'a, const O: u8> =
96 crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
97impl R {
98 #[doc = "Bit 0"]
99 #[inline(always)]
100 pub fn se_trng_0_busy(&self) -> SE_TRNG_0_BUSY_R {
101 SE_TRNG_0_BUSY_R::new((self.bits & 1) != 0)
102 }
103 #[doc = "Bit 1"]
104 #[inline(always)]
105 pub fn se_trng_0_trig_1t(&self) -> SE_TRNG_0_TRIG_1T_R {
106 SE_TRNG_0_TRIG_1T_R::new(((self.bits >> 1) & 1) != 0)
107 }
108 #[doc = "Bit 2"]
109 #[inline(always)]
110 pub fn se_trng_0_en(&self) -> SE_TRNG_0_EN_R {
111 SE_TRNG_0_EN_R::new(((self.bits >> 2) & 1) != 0)
112 }
113 #[doc = "Bit 3"]
114 #[inline(always)]
115 pub fn se_trng_0_dout_clr_1t(&self) -> SE_TRNG_0_DOUT_CLR_1T_R {
116 SE_TRNG_0_DOUT_CLR_1T_R::new(((self.bits >> 3) & 1) != 0)
117 }
118 #[doc = "Bit 4"]
119 #[inline(always)]
120 pub fn se_trng_0_ht_error(&self) -> SE_TRNG_0_HT_ERROR_R {
121 SE_TRNG_0_HT_ERROR_R::new(((self.bits >> 4) & 1) != 0)
122 }
123 #[doc = "Bit 8"]
124 #[inline(always)]
125 pub fn se_trng_0_int(&self) -> SE_TRNG_0_INT_R {
126 SE_TRNG_0_INT_R::new(((self.bits >> 8) & 1) != 0)
127 }
128 #[doc = "Bit 9"]
129 #[inline(always)]
130 pub fn se_trng_0_int_clr_1t(&self) -> SE_TRNG_0_INT_CLR_1T_R {
131 SE_TRNG_0_INT_CLR_1T_R::new(((self.bits >> 9) & 1) != 0)
132 }
133 #[doc = "Bit 10"]
134 #[inline(always)]
135 pub fn se_trng_0_int_set_1t(&self) -> SE_TRNG_0_INT_SET_1T_R {
136 SE_TRNG_0_INT_SET_1T_R::new(((self.bits >> 10) & 1) != 0)
137 }
138 #[doc = "Bit 11"]
139 #[inline(always)]
140 pub fn se_trng_0_int_mask(&self) -> SE_TRNG_0_INT_MASK_R {
141 SE_TRNG_0_INT_MASK_R::new(((self.bits >> 11) & 1) != 0)
142 }
143 #[doc = "Bit 13"]
144 #[inline(always)]
145 pub fn se_trng_0_manual_fun_sel(&self) -> SE_TRNG_0_MANUAL_FUN_SEL_R {
146 SE_TRNG_0_MANUAL_FUN_SEL_R::new(((self.bits >> 13) & 1) != 0)
147 }
148 #[doc = "Bit 14"]
149 #[inline(always)]
150 pub fn se_trng_0_manual_reseed(&self) -> SE_TRNG_0_MANUAL_RESEED_R {
151 SE_TRNG_0_MANUAL_RESEED_R::new(((self.bits >> 14) & 1) != 0)
152 }
153 #[doc = "Bit 15"]
154 #[inline(always)]
155 pub fn se_trng_0_manual_en(&self) -> SE_TRNG_0_MANUAL_EN_R {
156 SE_TRNG_0_MANUAL_EN_R::new(((self.bits >> 15) & 1) != 0)
157 }
158}
159impl W {
160 #[doc = "Bit 0"]
161 #[inline(always)]
162 #[must_use]
163 pub fn se_trng_0_busy(&mut self) -> SE_TRNG_0_BUSY_W<0> {
164 SE_TRNG_0_BUSY_W::new(self)
165 }
166 #[doc = "Bit 1"]
167 #[inline(always)]
168 #[must_use]
169 pub fn se_trng_0_trig_1t(&mut self) -> SE_TRNG_0_TRIG_1T_W<1> {
170 SE_TRNG_0_TRIG_1T_W::new(self)
171 }
172 #[doc = "Bit 2"]
173 #[inline(always)]
174 #[must_use]
175 pub fn se_trng_0_en(&mut self) -> SE_TRNG_0_EN_W<2> {
176 SE_TRNG_0_EN_W::new(self)
177 }
178 #[doc = "Bit 3"]
179 #[inline(always)]
180 #[must_use]
181 pub fn se_trng_0_dout_clr_1t(&mut self) -> SE_TRNG_0_DOUT_CLR_1T_W<3> {
182 SE_TRNG_0_DOUT_CLR_1T_W::new(self)
183 }
184 #[doc = "Bit 4"]
185 #[inline(always)]
186 #[must_use]
187 pub fn se_trng_0_ht_error(&mut self) -> SE_TRNG_0_HT_ERROR_W<4> {
188 SE_TRNG_0_HT_ERROR_W::new(self)
189 }
190 #[doc = "Bit 8"]
191 #[inline(always)]
192 #[must_use]
193 pub fn se_trng_0_int(&mut self) -> SE_TRNG_0_INT_W<8> {
194 SE_TRNG_0_INT_W::new(self)
195 }
196 #[doc = "Bit 9"]
197 #[inline(always)]
198 #[must_use]
199 pub fn se_trng_0_int_clr_1t(&mut self) -> SE_TRNG_0_INT_CLR_1T_W<9> {
200 SE_TRNG_0_INT_CLR_1T_W::new(self)
201 }
202 #[doc = "Bit 10"]
203 #[inline(always)]
204 #[must_use]
205 pub fn se_trng_0_int_set_1t(&mut self) -> SE_TRNG_0_INT_SET_1T_W<10> {
206 SE_TRNG_0_INT_SET_1T_W::new(self)
207 }
208 #[doc = "Bit 11"]
209 #[inline(always)]
210 #[must_use]
211 pub fn se_trng_0_int_mask(&mut self) -> SE_TRNG_0_INT_MASK_W<11> {
212 SE_TRNG_0_INT_MASK_W::new(self)
213 }
214 #[doc = "Bit 13"]
215 #[inline(always)]
216 #[must_use]
217 pub fn se_trng_0_manual_fun_sel(&mut self) -> SE_TRNG_0_MANUAL_FUN_SEL_W<13> {
218 SE_TRNG_0_MANUAL_FUN_SEL_W::new(self)
219 }
220 #[doc = "Bit 14"]
221 #[inline(always)]
222 #[must_use]
223 pub fn se_trng_0_manual_reseed(&mut self) -> SE_TRNG_0_MANUAL_RESEED_W<14> {
224 SE_TRNG_0_MANUAL_RESEED_W::new(self)
225 }
226 #[doc = "Bit 15"]
227 #[inline(always)]
228 #[must_use]
229 pub fn se_trng_0_manual_en(&mut self) -> SE_TRNG_0_MANUAL_EN_W<15> {
230 SE_TRNG_0_MANUAL_EN_W::new(self)
231 }
232 #[doc = "Writes raw bits to the register."]
233 #[inline(always)]
234 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
235 self.0.bits(bits);
236 self
237 }
238}
239#[doc = "se_trng_0_ctrl_0.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [se_trng_0_ctrl_0](index.html) module"]
240pub struct SE_TRNG_0_CTRL_0_SPEC;
241impl crate::RegisterSpec for SE_TRNG_0_CTRL_0_SPEC {
242 type Ux = u32;
243}
244#[doc = "`read()` method returns [se_trng_0_ctrl_0::R](R) reader structure"]
245impl crate::Readable for SE_TRNG_0_CTRL_0_SPEC {
246 type Reader = R;
247}
248#[doc = "`write(|w| ..)` method takes [se_trng_0_ctrl_0::W](W) writer structure"]
249impl crate::Writable for SE_TRNG_0_CTRL_0_SPEC {
250 type Writer = W;
251 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
252 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
253}
254#[doc = "`reset()` method sets se_trng_0_ctrl_0 to value 0"]
255impl crate::Resettable for SE_TRNG_0_CTRL_0_SPEC {
256 const RESET_VALUE: Self::Ux = 0;
257}