nrf5340_app_pac/clock_ns/
inten.rs1#[doc = "Register `INTEN` reader"]
2pub struct R(crate::R<INTEN_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<INTEN_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<INTEN_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<INTEN_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `INTEN` writer"]
17pub struct W(crate::W<INTEN_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<INTEN_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<INTEN_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<INTEN_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `HFCLKSTARTED` reader - Enable or disable interrupt for event HFCLKSTARTED"]
38pub type HFCLKSTARTED_R = crate::BitReader<HFCLKSTARTED_A>;
39#[doc = "Enable or disable interrupt for event HFCLKSTARTED\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq)]
41pub enum HFCLKSTARTED_A {
42 #[doc = "0: Disable"]
43 DISABLED = 0,
44 #[doc = "1: Enable"]
45 ENABLED = 1,
46}
47impl From<HFCLKSTARTED_A> for bool {
48 #[inline(always)]
49 fn from(variant: HFCLKSTARTED_A) -> Self {
50 variant as u8 != 0
51 }
52}
53impl HFCLKSTARTED_R {
54 #[doc = "Get enumerated values variant"]
55 #[inline(always)]
56 pub fn variant(&self) -> HFCLKSTARTED_A {
57 match self.bits {
58 false => HFCLKSTARTED_A::DISABLED,
59 true => HFCLKSTARTED_A::ENABLED,
60 }
61 }
62 #[doc = "Checks if the value of the field is `DISABLED`"]
63 #[inline(always)]
64 pub fn is_disabled(&self) -> bool {
65 *self == HFCLKSTARTED_A::DISABLED
66 }
67 #[doc = "Checks if the value of the field is `ENABLED`"]
68 #[inline(always)]
69 pub fn is_enabled(&self) -> bool {
70 *self == HFCLKSTARTED_A::ENABLED
71 }
72}
73#[doc = "Field `HFCLKSTARTED` writer - Enable or disable interrupt for event HFCLKSTARTED"]
74pub type HFCLKSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, HFCLKSTARTED_A, O>;
75impl<'a, const O: u8> HFCLKSTARTED_W<'a, O> {
76 #[doc = "Disable"]
77 #[inline(always)]
78 pub fn disabled(self) -> &'a mut W {
79 self.variant(HFCLKSTARTED_A::DISABLED)
80 }
81 #[doc = "Enable"]
82 #[inline(always)]
83 pub fn enabled(self) -> &'a mut W {
84 self.variant(HFCLKSTARTED_A::ENABLED)
85 }
86}
87#[doc = "Field `LFCLKSTARTED` reader - Enable or disable interrupt for event LFCLKSTARTED"]
88pub type LFCLKSTARTED_R = crate::BitReader<LFCLKSTARTED_A>;
89#[doc = "Enable or disable interrupt for event LFCLKSTARTED\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq)]
91pub enum LFCLKSTARTED_A {
92 #[doc = "0: Disable"]
93 DISABLED = 0,
94 #[doc = "1: Enable"]
95 ENABLED = 1,
96}
97impl From<LFCLKSTARTED_A> for bool {
98 #[inline(always)]
99 fn from(variant: LFCLKSTARTED_A) -> Self {
100 variant as u8 != 0
101 }
102}
103impl LFCLKSTARTED_R {
104 #[doc = "Get enumerated values variant"]
105 #[inline(always)]
106 pub fn variant(&self) -> LFCLKSTARTED_A {
107 match self.bits {
108 false => LFCLKSTARTED_A::DISABLED,
109 true => LFCLKSTARTED_A::ENABLED,
110 }
111 }
112 #[doc = "Checks if the value of the field is `DISABLED`"]
113 #[inline(always)]
114 pub fn is_disabled(&self) -> bool {
115 *self == LFCLKSTARTED_A::DISABLED
116 }
117 #[doc = "Checks if the value of the field is `ENABLED`"]
118 #[inline(always)]
119 pub fn is_enabled(&self) -> bool {
120 *self == LFCLKSTARTED_A::ENABLED
121 }
122}
123#[doc = "Field `LFCLKSTARTED` writer - Enable or disable interrupt for event LFCLKSTARTED"]
124pub type LFCLKSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, LFCLKSTARTED_A, O>;
125impl<'a, const O: u8> LFCLKSTARTED_W<'a, O> {
126 #[doc = "Disable"]
127 #[inline(always)]
128 pub fn disabled(self) -> &'a mut W {
129 self.variant(LFCLKSTARTED_A::DISABLED)
130 }
131 #[doc = "Enable"]
132 #[inline(always)]
133 pub fn enabled(self) -> &'a mut W {
134 self.variant(LFCLKSTARTED_A::ENABLED)
135 }
136}
137#[doc = "Field `DONE` reader - Enable or disable interrupt for event DONE"]
138pub type DONE_R = crate::BitReader<DONE_A>;
139#[doc = "Enable or disable interrupt for event DONE\n\nValue on reset: 0"]
140#[derive(Clone, Copy, Debug, PartialEq)]
141pub enum DONE_A {
142 #[doc = "0: Disable"]
143 DISABLED = 0,
144 #[doc = "1: Enable"]
145 ENABLED = 1,
146}
147impl From<DONE_A> for bool {
148 #[inline(always)]
149 fn from(variant: DONE_A) -> Self {
150 variant as u8 != 0
151 }
152}
153impl DONE_R {
154 #[doc = "Get enumerated values variant"]
155 #[inline(always)]
156 pub fn variant(&self) -> DONE_A {
157 match self.bits {
158 false => DONE_A::DISABLED,
159 true => DONE_A::ENABLED,
160 }
161 }
162 #[doc = "Checks if the value of the field is `DISABLED`"]
163 #[inline(always)]
164 pub fn is_disabled(&self) -> bool {
165 *self == DONE_A::DISABLED
166 }
167 #[doc = "Checks if the value of the field is `ENABLED`"]
168 #[inline(always)]
169 pub fn is_enabled(&self) -> bool {
170 *self == DONE_A::ENABLED
171 }
172}
173#[doc = "Field `DONE` writer - Enable or disable interrupt for event DONE"]
174pub type DONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, DONE_A, O>;
175impl<'a, const O: u8> DONE_W<'a, O> {
176 #[doc = "Disable"]
177 #[inline(always)]
178 pub fn disabled(self) -> &'a mut W {
179 self.variant(DONE_A::DISABLED)
180 }
181 #[doc = "Enable"]
182 #[inline(always)]
183 pub fn enabled(self) -> &'a mut W {
184 self.variant(DONE_A::ENABLED)
185 }
186}
187#[doc = "Field `HFCLKAUDIOSTARTED` reader - Enable or disable interrupt for event HFCLKAUDIOSTARTED"]
188pub type HFCLKAUDIOSTARTED_R = crate::BitReader<HFCLKAUDIOSTARTED_A>;
189#[doc = "Enable or disable interrupt for event HFCLKAUDIOSTARTED\n\nValue on reset: 0"]
190#[derive(Clone, Copy, Debug, PartialEq)]
191pub enum HFCLKAUDIOSTARTED_A {
192 #[doc = "0: Disable"]
193 DISABLED = 0,
194 #[doc = "1: Enable"]
195 ENABLED = 1,
196}
197impl From<HFCLKAUDIOSTARTED_A> for bool {
198 #[inline(always)]
199 fn from(variant: HFCLKAUDIOSTARTED_A) -> Self {
200 variant as u8 != 0
201 }
202}
203impl HFCLKAUDIOSTARTED_R {
204 #[doc = "Get enumerated values variant"]
205 #[inline(always)]
206 pub fn variant(&self) -> HFCLKAUDIOSTARTED_A {
207 match self.bits {
208 false => HFCLKAUDIOSTARTED_A::DISABLED,
209 true => HFCLKAUDIOSTARTED_A::ENABLED,
210 }
211 }
212 #[doc = "Checks if the value of the field is `DISABLED`"]
213 #[inline(always)]
214 pub fn is_disabled(&self) -> bool {
215 *self == HFCLKAUDIOSTARTED_A::DISABLED
216 }
217 #[doc = "Checks if the value of the field is `ENABLED`"]
218 #[inline(always)]
219 pub fn is_enabled(&self) -> bool {
220 *self == HFCLKAUDIOSTARTED_A::ENABLED
221 }
222}
223#[doc = "Field `HFCLKAUDIOSTARTED` writer - Enable or disable interrupt for event HFCLKAUDIOSTARTED"]
224pub type HFCLKAUDIOSTARTED_W<'a, const O: u8> =
225 crate::BitWriter<'a, u32, INTEN_SPEC, HFCLKAUDIOSTARTED_A, O>;
226impl<'a, const O: u8> HFCLKAUDIOSTARTED_W<'a, O> {
227 #[doc = "Disable"]
228 #[inline(always)]
229 pub fn disabled(self) -> &'a mut W {
230 self.variant(HFCLKAUDIOSTARTED_A::DISABLED)
231 }
232 #[doc = "Enable"]
233 #[inline(always)]
234 pub fn enabled(self) -> &'a mut W {
235 self.variant(HFCLKAUDIOSTARTED_A::ENABLED)
236 }
237}
238#[doc = "Field `HFCLK192MSTARTED` reader - Enable or disable interrupt for event HFCLK192MSTARTED"]
239pub type HFCLK192MSTARTED_R = crate::BitReader<HFCLK192MSTARTED_A>;
240#[doc = "Enable or disable interrupt for event HFCLK192MSTARTED\n\nValue on reset: 0"]
241#[derive(Clone, Copy, Debug, PartialEq)]
242pub enum HFCLK192MSTARTED_A {
243 #[doc = "0: Disable"]
244 DISABLED = 0,
245 #[doc = "1: Enable"]
246 ENABLED = 1,
247}
248impl From<HFCLK192MSTARTED_A> for bool {
249 #[inline(always)]
250 fn from(variant: HFCLK192MSTARTED_A) -> Self {
251 variant as u8 != 0
252 }
253}
254impl HFCLK192MSTARTED_R {
255 #[doc = "Get enumerated values variant"]
256 #[inline(always)]
257 pub fn variant(&self) -> HFCLK192MSTARTED_A {
258 match self.bits {
259 false => HFCLK192MSTARTED_A::DISABLED,
260 true => HFCLK192MSTARTED_A::ENABLED,
261 }
262 }
263 #[doc = "Checks if the value of the field is `DISABLED`"]
264 #[inline(always)]
265 pub fn is_disabled(&self) -> bool {
266 *self == HFCLK192MSTARTED_A::DISABLED
267 }
268 #[doc = "Checks if the value of the field is `ENABLED`"]
269 #[inline(always)]
270 pub fn is_enabled(&self) -> bool {
271 *self == HFCLK192MSTARTED_A::ENABLED
272 }
273}
274#[doc = "Field `HFCLK192MSTARTED` writer - Enable or disable interrupt for event HFCLK192MSTARTED"]
275pub type HFCLK192MSTARTED_W<'a, const O: u8> =
276 crate::BitWriter<'a, u32, INTEN_SPEC, HFCLK192MSTARTED_A, O>;
277impl<'a, const O: u8> HFCLK192MSTARTED_W<'a, O> {
278 #[doc = "Disable"]
279 #[inline(always)]
280 pub fn disabled(self) -> &'a mut W {
281 self.variant(HFCLK192MSTARTED_A::DISABLED)
282 }
283 #[doc = "Enable"]
284 #[inline(always)]
285 pub fn enabled(self) -> &'a mut W {
286 self.variant(HFCLK192MSTARTED_A::ENABLED)
287 }
288}
289impl R {
290 #[doc = "Bit 0 - Enable or disable interrupt for event HFCLKSTARTED"]
291 #[inline(always)]
292 pub fn hfclkstarted(&self) -> HFCLKSTARTED_R {
293 HFCLKSTARTED_R::new((self.bits & 1) != 0)
294 }
295 #[doc = "Bit 1 - Enable or disable interrupt for event LFCLKSTARTED"]
296 #[inline(always)]
297 pub fn lfclkstarted(&self) -> LFCLKSTARTED_R {
298 LFCLKSTARTED_R::new(((self.bits >> 1) & 1) != 0)
299 }
300 #[doc = "Bit 7 - Enable or disable interrupt for event DONE"]
301 #[inline(always)]
302 pub fn done(&self) -> DONE_R {
303 DONE_R::new(((self.bits >> 7) & 1) != 0)
304 }
305 #[doc = "Bit 8 - Enable or disable interrupt for event HFCLKAUDIOSTARTED"]
306 #[inline(always)]
307 pub fn hfclkaudiostarted(&self) -> HFCLKAUDIOSTARTED_R {
308 HFCLKAUDIOSTARTED_R::new(((self.bits >> 8) & 1) != 0)
309 }
310 #[doc = "Bit 9 - Enable or disable interrupt for event HFCLK192MSTARTED"]
311 #[inline(always)]
312 pub fn hfclk192mstarted(&self) -> HFCLK192MSTARTED_R {
313 HFCLK192MSTARTED_R::new(((self.bits >> 9) & 1) != 0)
314 }
315}
316impl W {
317 #[doc = "Bit 0 - Enable or disable interrupt for event HFCLKSTARTED"]
318 #[inline(always)]
319 pub fn hfclkstarted(&mut self) -> HFCLKSTARTED_W<0> {
320 HFCLKSTARTED_W::new(self)
321 }
322 #[doc = "Bit 1 - Enable or disable interrupt for event LFCLKSTARTED"]
323 #[inline(always)]
324 pub fn lfclkstarted(&mut self) -> LFCLKSTARTED_W<1> {
325 LFCLKSTARTED_W::new(self)
326 }
327 #[doc = "Bit 7 - Enable or disable interrupt for event DONE"]
328 #[inline(always)]
329 pub fn done(&mut self) -> DONE_W<7> {
330 DONE_W::new(self)
331 }
332 #[doc = "Bit 8 - Enable or disable interrupt for event HFCLKAUDIOSTARTED"]
333 #[inline(always)]
334 pub fn hfclkaudiostarted(&mut self) -> HFCLKAUDIOSTARTED_W<8> {
335 HFCLKAUDIOSTARTED_W::new(self)
336 }
337 #[doc = "Bit 9 - Enable or disable interrupt for event HFCLK192MSTARTED"]
338 #[inline(always)]
339 pub fn hfclk192mstarted(&mut self) -> HFCLK192MSTARTED_W<9> {
340 HFCLK192MSTARTED_W::new(self)
341 }
342 #[doc = "Writes raw bits to the register."]
343 #[inline(always)]
344 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
345 self.0.bits(bits);
346 self
347 }
348}
349#[doc = "Enable or disable interrupt\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 [inten](index.html) module"]
350pub struct INTEN_SPEC;
351impl crate::RegisterSpec for INTEN_SPEC {
352 type Ux = u32;
353}
354#[doc = "`read()` method returns [inten::R](R) reader structure"]
355impl crate::Readable for INTEN_SPEC {
356 type Reader = R;
357}
358#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"]
359impl crate::Writable for INTEN_SPEC {
360 type Writer = W;
361}
362#[doc = "`reset()` method sets INTEN to value 0"]
363impl crate::Resettable for INTEN_SPEC {
364 #[inline(always)]
365 fn reset_value() -> Self::Ux {
366 0
367 }
368}