bl602_pac/sec_eng/
se_trng_0_ctrl_0.rs

1#[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_trig_1t` reader - "]
40pub type SE_TRNG_0_TRIG_1T_R = crate::BitReader<bool>;
41#[doc = "Field `se_trng_0_trig_1t` writer - "]
42pub type SE_TRNG_0_TRIG_1T_W<'a, const O: u8> =
43    crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
44#[doc = "Field `se_trng_0_en` reader - "]
45pub type SE_TRNG_0_EN_R = crate::BitReader<bool>;
46#[doc = "Field `se_trng_0_en` writer - "]
47pub type SE_TRNG_0_EN_W<'a, const O: u8> =
48    crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
49#[doc = "Field `se_trng_0_dout_clr_1t` reader - "]
50pub type SE_TRNG_0_DOUT_CLR_1T_R = crate::BitReader<bool>;
51#[doc = "Field `se_trng_0_dout_clr_1t` writer - "]
52pub type SE_TRNG_0_DOUT_CLR_1T_W<'a, const O: u8> =
53    crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
54#[doc = "Field `se_trng_0_ht_error` reader - "]
55pub type SE_TRNG_0_HT_ERROR_R = crate::BitReader<bool>;
56#[doc = "Field `se_trng_0_int` reader - "]
57pub type SE_TRNG_0_INT_R = crate::BitReader<bool>;
58#[doc = "Field `se_trng_0_int_clr_1t` reader - "]
59pub type SE_TRNG_0_INT_CLR_1T_R = crate::BitReader<bool>;
60#[doc = "Field `se_trng_0_int_clr_1t` writer - "]
61pub type SE_TRNG_0_INT_CLR_1T_W<'a, const O: u8> =
62    crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
63#[doc = "Field `se_trng_0_int_set_1t` reader - "]
64pub type SE_TRNG_0_INT_SET_1T_R = crate::BitReader<bool>;
65#[doc = "Field `se_trng_0_int_set_1t` writer - "]
66pub type SE_TRNG_0_INT_SET_1T_W<'a, const O: u8> =
67    crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
68#[doc = "Field `se_trng_0_int_mask` reader - "]
69pub type SE_TRNG_0_INT_MASK_R = crate::BitReader<bool>;
70#[doc = "Field `se_trng_0_int_mask` writer - "]
71pub type SE_TRNG_0_INT_MASK_W<'a, const O: u8> =
72    crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
73#[doc = "Field `se_trng_0_manual_fun_sel` reader - "]
74pub type SE_TRNG_0_MANUAL_FUN_SEL_R = crate::BitReader<bool>;
75#[doc = "Field `se_trng_0_manual_fun_sel` writer - "]
76pub type SE_TRNG_0_MANUAL_FUN_SEL_W<'a, const O: u8> =
77    crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
78#[doc = "Field `se_trng_0_manual_reseed` reader - "]
79pub type SE_TRNG_0_MANUAL_RESEED_R = crate::BitReader<bool>;
80#[doc = "Field `se_trng_0_manual_reseed` writer - "]
81pub type SE_TRNG_0_MANUAL_RESEED_W<'a, const O: u8> =
82    crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
83#[doc = "Field `se_trng_0_manual_en` reader - "]
84pub type SE_TRNG_0_MANUAL_EN_R = crate::BitReader<bool>;
85#[doc = "Field `se_trng_0_manual_en` writer - "]
86pub type SE_TRNG_0_MANUAL_EN_W<'a, const O: u8> =
87    crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>;
88impl R {
89    #[doc = "Bit 0"]
90    #[inline(always)]
91    pub fn se_trng_0_busy(&self) -> SE_TRNG_0_BUSY_R {
92        SE_TRNG_0_BUSY_R::new((self.bits & 1) != 0)
93    }
94    #[doc = "Bit 1"]
95    #[inline(always)]
96    pub fn se_trng_0_trig_1t(&self) -> SE_TRNG_0_TRIG_1T_R {
97        SE_TRNG_0_TRIG_1T_R::new(((self.bits >> 1) & 1) != 0)
98    }
99    #[doc = "Bit 2"]
100    #[inline(always)]
101    pub fn se_trng_0_en(&self) -> SE_TRNG_0_EN_R {
102        SE_TRNG_0_EN_R::new(((self.bits >> 2) & 1) != 0)
103    }
104    #[doc = "Bit 3"]
105    #[inline(always)]
106    pub fn se_trng_0_dout_clr_1t(&self) -> SE_TRNG_0_DOUT_CLR_1T_R {
107        SE_TRNG_0_DOUT_CLR_1T_R::new(((self.bits >> 3) & 1) != 0)
108    }
109    #[doc = "Bit 4"]
110    #[inline(always)]
111    pub fn se_trng_0_ht_error(&self) -> SE_TRNG_0_HT_ERROR_R {
112        SE_TRNG_0_HT_ERROR_R::new(((self.bits >> 4) & 1) != 0)
113    }
114    #[doc = "Bit 8"]
115    #[inline(always)]
116    pub fn se_trng_0_int(&self) -> SE_TRNG_0_INT_R {
117        SE_TRNG_0_INT_R::new(((self.bits >> 8) & 1) != 0)
118    }
119    #[doc = "Bit 9"]
120    #[inline(always)]
121    pub fn se_trng_0_int_clr_1t(&self) -> SE_TRNG_0_INT_CLR_1T_R {
122        SE_TRNG_0_INT_CLR_1T_R::new(((self.bits >> 9) & 1) != 0)
123    }
124    #[doc = "Bit 10"]
125    #[inline(always)]
126    pub fn se_trng_0_int_set_1t(&self) -> SE_TRNG_0_INT_SET_1T_R {
127        SE_TRNG_0_INT_SET_1T_R::new(((self.bits >> 10) & 1) != 0)
128    }
129    #[doc = "Bit 11"]
130    #[inline(always)]
131    pub fn se_trng_0_int_mask(&self) -> SE_TRNG_0_INT_MASK_R {
132        SE_TRNG_0_INT_MASK_R::new(((self.bits >> 11) & 1) != 0)
133    }
134    #[doc = "Bit 13"]
135    #[inline(always)]
136    pub fn se_trng_0_manual_fun_sel(&self) -> SE_TRNG_0_MANUAL_FUN_SEL_R {
137        SE_TRNG_0_MANUAL_FUN_SEL_R::new(((self.bits >> 13) & 1) != 0)
138    }
139    #[doc = "Bit 14"]
140    #[inline(always)]
141    pub fn se_trng_0_manual_reseed(&self) -> SE_TRNG_0_MANUAL_RESEED_R {
142        SE_TRNG_0_MANUAL_RESEED_R::new(((self.bits >> 14) & 1) != 0)
143    }
144    #[doc = "Bit 15"]
145    #[inline(always)]
146    pub fn se_trng_0_manual_en(&self) -> SE_TRNG_0_MANUAL_EN_R {
147        SE_TRNG_0_MANUAL_EN_R::new(((self.bits >> 15) & 1) != 0)
148    }
149}
150impl W {
151    #[doc = "Bit 1"]
152    #[inline(always)]
153    #[must_use]
154    pub fn se_trng_0_trig_1t(&mut self) -> SE_TRNG_0_TRIG_1T_W<1> {
155        SE_TRNG_0_TRIG_1T_W::new(self)
156    }
157    #[doc = "Bit 2"]
158    #[inline(always)]
159    #[must_use]
160    pub fn se_trng_0_en(&mut self) -> SE_TRNG_0_EN_W<2> {
161        SE_TRNG_0_EN_W::new(self)
162    }
163    #[doc = "Bit 3"]
164    #[inline(always)]
165    #[must_use]
166    pub fn se_trng_0_dout_clr_1t(&mut self) -> SE_TRNG_0_DOUT_CLR_1T_W<3> {
167        SE_TRNG_0_DOUT_CLR_1T_W::new(self)
168    }
169    #[doc = "Bit 9"]
170    #[inline(always)]
171    #[must_use]
172    pub fn se_trng_0_int_clr_1t(&mut self) -> SE_TRNG_0_INT_CLR_1T_W<9> {
173        SE_TRNG_0_INT_CLR_1T_W::new(self)
174    }
175    #[doc = "Bit 10"]
176    #[inline(always)]
177    #[must_use]
178    pub fn se_trng_0_int_set_1t(&mut self) -> SE_TRNG_0_INT_SET_1T_W<10> {
179        SE_TRNG_0_INT_SET_1T_W::new(self)
180    }
181    #[doc = "Bit 11"]
182    #[inline(always)]
183    #[must_use]
184    pub fn se_trng_0_int_mask(&mut self) -> SE_TRNG_0_INT_MASK_W<11> {
185        SE_TRNG_0_INT_MASK_W::new(self)
186    }
187    #[doc = "Bit 13"]
188    #[inline(always)]
189    #[must_use]
190    pub fn se_trng_0_manual_fun_sel(&mut self) -> SE_TRNG_0_MANUAL_FUN_SEL_W<13> {
191        SE_TRNG_0_MANUAL_FUN_SEL_W::new(self)
192    }
193    #[doc = "Bit 14"]
194    #[inline(always)]
195    #[must_use]
196    pub fn se_trng_0_manual_reseed(&mut self) -> SE_TRNG_0_MANUAL_RESEED_W<14> {
197        SE_TRNG_0_MANUAL_RESEED_W::new(self)
198    }
199    #[doc = "Bit 15"]
200    #[inline(always)]
201    #[must_use]
202    pub fn se_trng_0_manual_en(&mut self) -> SE_TRNG_0_MANUAL_EN_W<15> {
203        SE_TRNG_0_MANUAL_EN_W::new(self)
204    }
205    #[doc = "Writes raw bits to the register."]
206    #[inline(always)]
207    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
208        self.0.bits(bits);
209        self
210    }
211}
212#[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"]
213pub struct SE_TRNG_0_CTRL_0_SPEC;
214impl crate::RegisterSpec for SE_TRNG_0_CTRL_0_SPEC {
215    type Ux = u32;
216}
217#[doc = "`read()` method returns [se_trng_0_ctrl_0::R](R) reader structure"]
218impl crate::Readable for SE_TRNG_0_CTRL_0_SPEC {
219    type Reader = R;
220}
221#[doc = "`write(|w| ..)` method takes [se_trng_0_ctrl_0::W](W) writer structure"]
222impl crate::Writable for SE_TRNG_0_CTRL_0_SPEC {
223    type Writer = W;
224    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
225    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
226}
227#[doc = "`reset()` method sets se_trng_0_ctrl_0 to value 0"]
228impl crate::Resettable for SE_TRNG_0_CTRL_0_SPEC {
229    const RESET_VALUE: Self::Ux = 0;
230}