d1_pac/spinlock/
spinlock_irq_en.rs

1#[doc = "Register `spinlock_irq_en` reader"]
2pub type R = crate::R<SPINLOCK_IRQ_EN_SPEC>;
3#[doc = "Register `spinlock_irq_en` writer"]
4pub type W = crate::W<SPINLOCK_IRQ_EN_SPEC>;
5#[doc = "Field `lock_irq_en[0-31]` reader - Lock\\[i\\] Interrupt Enable"]
6pub type LOCK_IRQ_EN_R = crate::BitReader<LOCK_IRQ_EN_A>;
7#[doc = "Lock\\[i\\] Interrupt Enable\n\nValue on reset: 0"]
8#[derive(Clone, Copy, Debug, PartialEq, Eq)]
9pub enum LOCK_IRQ_EN_A {
10    #[doc = "0: `0`"]
11    DISABLED = 0,
12    #[doc = "1: `1`"]
13    ENABLED = 1,
14}
15impl From<LOCK_IRQ_EN_A> for bool {
16    #[inline(always)]
17    fn from(variant: LOCK_IRQ_EN_A) -> Self {
18        variant as u8 != 0
19    }
20}
21impl LOCK_IRQ_EN_R {
22    #[doc = "Get enumerated values variant"]
23    #[inline(always)]
24    pub const fn variant(&self) -> LOCK_IRQ_EN_A {
25        match self.bits {
26            false => LOCK_IRQ_EN_A::DISABLED,
27            true => LOCK_IRQ_EN_A::ENABLED,
28        }
29    }
30    #[doc = "`0`"]
31    #[inline(always)]
32    pub fn is_disabled(&self) -> bool {
33        *self == LOCK_IRQ_EN_A::DISABLED
34    }
35    #[doc = "`1`"]
36    #[inline(always)]
37    pub fn is_enabled(&self) -> bool {
38        *self == LOCK_IRQ_EN_A::ENABLED
39    }
40}
41#[doc = "Field `lock_irq_en[0-31]` writer - Lock\\[i\\] Interrupt Enable"]
42pub type LOCK_IRQ_EN_W<'a, REG> = crate::BitWriter<'a, REG, LOCK_IRQ_EN_A>;
43impl<'a, REG> LOCK_IRQ_EN_W<'a, REG>
44where
45    REG: crate::Writable + crate::RegisterSpec,
46{
47    #[doc = "`0`"]
48    #[inline(always)]
49    pub fn disabled(self) -> &'a mut crate::W<REG> {
50        self.variant(LOCK_IRQ_EN_A::DISABLED)
51    }
52    #[doc = "`1`"]
53    #[inline(always)]
54    pub fn enabled(self) -> &'a mut crate::W<REG> {
55        self.variant(LOCK_IRQ_EN_A::ENABLED)
56    }
57}
58impl R {
59    #[doc = "Lock\\[i\\] Interrupt Enable\n\nNOTE: `n` is number of field in register. `n == 0` corresponds to `lock0_irq_en` field"]
60    #[inline(always)]
61    pub fn lock_irq_en(&self, n: u8) -> LOCK_IRQ_EN_R {
62        #[allow(clippy::no_effect)]
63        [(); 32][n as usize];
64        LOCK_IRQ_EN_R::new(((self.bits >> n) & 1) != 0)
65    }
66    #[doc = "Bit 0 - Lock\\[i\\] Interrupt Enable"]
67    #[inline(always)]
68    pub fn lock0_irq_en(&self) -> LOCK_IRQ_EN_R {
69        LOCK_IRQ_EN_R::new((self.bits & 1) != 0)
70    }
71    #[doc = "Bit 1 - Lock\\[i\\] Interrupt Enable"]
72    #[inline(always)]
73    pub fn lock1_irq_en(&self) -> LOCK_IRQ_EN_R {
74        LOCK_IRQ_EN_R::new(((self.bits >> 1) & 1) != 0)
75    }
76    #[doc = "Bit 2 - Lock\\[i\\] Interrupt Enable"]
77    #[inline(always)]
78    pub fn lock2_irq_en(&self) -> LOCK_IRQ_EN_R {
79        LOCK_IRQ_EN_R::new(((self.bits >> 2) & 1) != 0)
80    }
81    #[doc = "Bit 3 - Lock\\[i\\] Interrupt Enable"]
82    #[inline(always)]
83    pub fn lock3_irq_en(&self) -> LOCK_IRQ_EN_R {
84        LOCK_IRQ_EN_R::new(((self.bits >> 3) & 1) != 0)
85    }
86    #[doc = "Bit 4 - Lock\\[i\\] Interrupt Enable"]
87    #[inline(always)]
88    pub fn lock4_irq_en(&self) -> LOCK_IRQ_EN_R {
89        LOCK_IRQ_EN_R::new(((self.bits >> 4) & 1) != 0)
90    }
91    #[doc = "Bit 5 - Lock\\[i\\] Interrupt Enable"]
92    #[inline(always)]
93    pub fn lock5_irq_en(&self) -> LOCK_IRQ_EN_R {
94        LOCK_IRQ_EN_R::new(((self.bits >> 5) & 1) != 0)
95    }
96    #[doc = "Bit 6 - Lock\\[i\\] Interrupt Enable"]
97    #[inline(always)]
98    pub fn lock6_irq_en(&self) -> LOCK_IRQ_EN_R {
99        LOCK_IRQ_EN_R::new(((self.bits >> 6) & 1) != 0)
100    }
101    #[doc = "Bit 7 - Lock\\[i\\] Interrupt Enable"]
102    #[inline(always)]
103    pub fn lock7_irq_en(&self) -> LOCK_IRQ_EN_R {
104        LOCK_IRQ_EN_R::new(((self.bits >> 7) & 1) != 0)
105    }
106    #[doc = "Bit 8 - Lock\\[i\\] Interrupt Enable"]
107    #[inline(always)]
108    pub fn lock8_irq_en(&self) -> LOCK_IRQ_EN_R {
109        LOCK_IRQ_EN_R::new(((self.bits >> 8) & 1) != 0)
110    }
111    #[doc = "Bit 9 - Lock\\[i\\] Interrupt Enable"]
112    #[inline(always)]
113    pub fn lock9_irq_en(&self) -> LOCK_IRQ_EN_R {
114        LOCK_IRQ_EN_R::new(((self.bits >> 9) & 1) != 0)
115    }
116    #[doc = "Bit 10 - Lock\\[i\\] Interrupt Enable"]
117    #[inline(always)]
118    pub fn lock10_irq_en(&self) -> LOCK_IRQ_EN_R {
119        LOCK_IRQ_EN_R::new(((self.bits >> 10) & 1) != 0)
120    }
121    #[doc = "Bit 11 - Lock\\[i\\] Interrupt Enable"]
122    #[inline(always)]
123    pub fn lock11_irq_en(&self) -> LOCK_IRQ_EN_R {
124        LOCK_IRQ_EN_R::new(((self.bits >> 11) & 1) != 0)
125    }
126    #[doc = "Bit 12 - Lock\\[i\\] Interrupt Enable"]
127    #[inline(always)]
128    pub fn lock12_irq_en(&self) -> LOCK_IRQ_EN_R {
129        LOCK_IRQ_EN_R::new(((self.bits >> 12) & 1) != 0)
130    }
131    #[doc = "Bit 13 - Lock\\[i\\] Interrupt Enable"]
132    #[inline(always)]
133    pub fn lock13_irq_en(&self) -> LOCK_IRQ_EN_R {
134        LOCK_IRQ_EN_R::new(((self.bits >> 13) & 1) != 0)
135    }
136    #[doc = "Bit 14 - Lock\\[i\\] Interrupt Enable"]
137    #[inline(always)]
138    pub fn lock14_irq_en(&self) -> LOCK_IRQ_EN_R {
139        LOCK_IRQ_EN_R::new(((self.bits >> 14) & 1) != 0)
140    }
141    #[doc = "Bit 15 - Lock\\[i\\] Interrupt Enable"]
142    #[inline(always)]
143    pub fn lock15_irq_en(&self) -> LOCK_IRQ_EN_R {
144        LOCK_IRQ_EN_R::new(((self.bits >> 15) & 1) != 0)
145    }
146    #[doc = "Bit 16 - Lock\\[i\\] Interrupt Enable"]
147    #[inline(always)]
148    pub fn lock16_irq_en(&self) -> LOCK_IRQ_EN_R {
149        LOCK_IRQ_EN_R::new(((self.bits >> 16) & 1) != 0)
150    }
151    #[doc = "Bit 17 - Lock\\[i\\] Interrupt Enable"]
152    #[inline(always)]
153    pub fn lock17_irq_en(&self) -> LOCK_IRQ_EN_R {
154        LOCK_IRQ_EN_R::new(((self.bits >> 17) & 1) != 0)
155    }
156    #[doc = "Bit 18 - Lock\\[i\\] Interrupt Enable"]
157    #[inline(always)]
158    pub fn lock18_irq_en(&self) -> LOCK_IRQ_EN_R {
159        LOCK_IRQ_EN_R::new(((self.bits >> 18) & 1) != 0)
160    }
161    #[doc = "Bit 19 - Lock\\[i\\] Interrupt Enable"]
162    #[inline(always)]
163    pub fn lock19_irq_en(&self) -> LOCK_IRQ_EN_R {
164        LOCK_IRQ_EN_R::new(((self.bits >> 19) & 1) != 0)
165    }
166    #[doc = "Bit 20 - Lock\\[i\\] Interrupt Enable"]
167    #[inline(always)]
168    pub fn lock20_irq_en(&self) -> LOCK_IRQ_EN_R {
169        LOCK_IRQ_EN_R::new(((self.bits >> 20) & 1) != 0)
170    }
171    #[doc = "Bit 21 - Lock\\[i\\] Interrupt Enable"]
172    #[inline(always)]
173    pub fn lock21_irq_en(&self) -> LOCK_IRQ_EN_R {
174        LOCK_IRQ_EN_R::new(((self.bits >> 21) & 1) != 0)
175    }
176    #[doc = "Bit 22 - Lock\\[i\\] Interrupt Enable"]
177    #[inline(always)]
178    pub fn lock22_irq_en(&self) -> LOCK_IRQ_EN_R {
179        LOCK_IRQ_EN_R::new(((self.bits >> 22) & 1) != 0)
180    }
181    #[doc = "Bit 23 - Lock\\[i\\] Interrupt Enable"]
182    #[inline(always)]
183    pub fn lock23_irq_en(&self) -> LOCK_IRQ_EN_R {
184        LOCK_IRQ_EN_R::new(((self.bits >> 23) & 1) != 0)
185    }
186    #[doc = "Bit 24 - Lock\\[i\\] Interrupt Enable"]
187    #[inline(always)]
188    pub fn lock24_irq_en(&self) -> LOCK_IRQ_EN_R {
189        LOCK_IRQ_EN_R::new(((self.bits >> 24) & 1) != 0)
190    }
191    #[doc = "Bit 25 - Lock\\[i\\] Interrupt Enable"]
192    #[inline(always)]
193    pub fn lock25_irq_en(&self) -> LOCK_IRQ_EN_R {
194        LOCK_IRQ_EN_R::new(((self.bits >> 25) & 1) != 0)
195    }
196    #[doc = "Bit 26 - Lock\\[i\\] Interrupt Enable"]
197    #[inline(always)]
198    pub fn lock26_irq_en(&self) -> LOCK_IRQ_EN_R {
199        LOCK_IRQ_EN_R::new(((self.bits >> 26) & 1) != 0)
200    }
201    #[doc = "Bit 27 - Lock\\[i\\] Interrupt Enable"]
202    #[inline(always)]
203    pub fn lock27_irq_en(&self) -> LOCK_IRQ_EN_R {
204        LOCK_IRQ_EN_R::new(((self.bits >> 27) & 1) != 0)
205    }
206    #[doc = "Bit 28 - Lock\\[i\\] Interrupt Enable"]
207    #[inline(always)]
208    pub fn lock28_irq_en(&self) -> LOCK_IRQ_EN_R {
209        LOCK_IRQ_EN_R::new(((self.bits >> 28) & 1) != 0)
210    }
211    #[doc = "Bit 29 - Lock\\[i\\] Interrupt Enable"]
212    #[inline(always)]
213    pub fn lock29_irq_en(&self) -> LOCK_IRQ_EN_R {
214        LOCK_IRQ_EN_R::new(((self.bits >> 29) & 1) != 0)
215    }
216    #[doc = "Bit 30 - Lock\\[i\\] Interrupt Enable"]
217    #[inline(always)]
218    pub fn lock30_irq_en(&self) -> LOCK_IRQ_EN_R {
219        LOCK_IRQ_EN_R::new(((self.bits >> 30) & 1) != 0)
220    }
221    #[doc = "Bit 31 - Lock\\[i\\] Interrupt Enable"]
222    #[inline(always)]
223    pub fn lock31_irq_en(&self) -> LOCK_IRQ_EN_R {
224        LOCK_IRQ_EN_R::new(((self.bits >> 31) & 1) != 0)
225    }
226}
227impl W {
228    #[doc = "Lock\\[i\\] Interrupt Enable\n\nNOTE: `n` is number of field in register. `n == 0` corresponds to `lock0_irq_en` field"]
229    #[inline(always)]
230    #[must_use]
231    pub fn lock_irq_en(&mut self, n: u8) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
232        #[allow(clippy::no_effect)]
233        [(); 32][n as usize];
234        LOCK_IRQ_EN_W::new(self, n)
235    }
236    #[doc = "Bit 0 - Lock\\[i\\] Interrupt Enable"]
237    #[inline(always)]
238    #[must_use]
239    pub fn lock0_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
240        LOCK_IRQ_EN_W::new(self, 0)
241    }
242    #[doc = "Bit 1 - Lock\\[i\\] Interrupt Enable"]
243    #[inline(always)]
244    #[must_use]
245    pub fn lock1_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
246        LOCK_IRQ_EN_W::new(self, 1)
247    }
248    #[doc = "Bit 2 - Lock\\[i\\] Interrupt Enable"]
249    #[inline(always)]
250    #[must_use]
251    pub fn lock2_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
252        LOCK_IRQ_EN_W::new(self, 2)
253    }
254    #[doc = "Bit 3 - Lock\\[i\\] Interrupt Enable"]
255    #[inline(always)]
256    #[must_use]
257    pub fn lock3_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
258        LOCK_IRQ_EN_W::new(self, 3)
259    }
260    #[doc = "Bit 4 - Lock\\[i\\] Interrupt Enable"]
261    #[inline(always)]
262    #[must_use]
263    pub fn lock4_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
264        LOCK_IRQ_EN_W::new(self, 4)
265    }
266    #[doc = "Bit 5 - Lock\\[i\\] Interrupt Enable"]
267    #[inline(always)]
268    #[must_use]
269    pub fn lock5_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
270        LOCK_IRQ_EN_W::new(self, 5)
271    }
272    #[doc = "Bit 6 - Lock\\[i\\] Interrupt Enable"]
273    #[inline(always)]
274    #[must_use]
275    pub fn lock6_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
276        LOCK_IRQ_EN_W::new(self, 6)
277    }
278    #[doc = "Bit 7 - Lock\\[i\\] Interrupt Enable"]
279    #[inline(always)]
280    #[must_use]
281    pub fn lock7_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
282        LOCK_IRQ_EN_W::new(self, 7)
283    }
284    #[doc = "Bit 8 - Lock\\[i\\] Interrupt Enable"]
285    #[inline(always)]
286    #[must_use]
287    pub fn lock8_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
288        LOCK_IRQ_EN_W::new(self, 8)
289    }
290    #[doc = "Bit 9 - Lock\\[i\\] Interrupt Enable"]
291    #[inline(always)]
292    #[must_use]
293    pub fn lock9_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
294        LOCK_IRQ_EN_W::new(self, 9)
295    }
296    #[doc = "Bit 10 - Lock\\[i\\] Interrupt Enable"]
297    #[inline(always)]
298    #[must_use]
299    pub fn lock10_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
300        LOCK_IRQ_EN_W::new(self, 10)
301    }
302    #[doc = "Bit 11 - Lock\\[i\\] Interrupt Enable"]
303    #[inline(always)]
304    #[must_use]
305    pub fn lock11_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
306        LOCK_IRQ_EN_W::new(self, 11)
307    }
308    #[doc = "Bit 12 - Lock\\[i\\] Interrupt Enable"]
309    #[inline(always)]
310    #[must_use]
311    pub fn lock12_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
312        LOCK_IRQ_EN_W::new(self, 12)
313    }
314    #[doc = "Bit 13 - Lock\\[i\\] Interrupt Enable"]
315    #[inline(always)]
316    #[must_use]
317    pub fn lock13_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
318        LOCK_IRQ_EN_W::new(self, 13)
319    }
320    #[doc = "Bit 14 - Lock\\[i\\] Interrupt Enable"]
321    #[inline(always)]
322    #[must_use]
323    pub fn lock14_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
324        LOCK_IRQ_EN_W::new(self, 14)
325    }
326    #[doc = "Bit 15 - Lock\\[i\\] Interrupt Enable"]
327    #[inline(always)]
328    #[must_use]
329    pub fn lock15_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
330        LOCK_IRQ_EN_W::new(self, 15)
331    }
332    #[doc = "Bit 16 - Lock\\[i\\] Interrupt Enable"]
333    #[inline(always)]
334    #[must_use]
335    pub fn lock16_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
336        LOCK_IRQ_EN_W::new(self, 16)
337    }
338    #[doc = "Bit 17 - Lock\\[i\\] Interrupt Enable"]
339    #[inline(always)]
340    #[must_use]
341    pub fn lock17_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
342        LOCK_IRQ_EN_W::new(self, 17)
343    }
344    #[doc = "Bit 18 - Lock\\[i\\] Interrupt Enable"]
345    #[inline(always)]
346    #[must_use]
347    pub fn lock18_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
348        LOCK_IRQ_EN_W::new(self, 18)
349    }
350    #[doc = "Bit 19 - Lock\\[i\\] Interrupt Enable"]
351    #[inline(always)]
352    #[must_use]
353    pub fn lock19_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
354        LOCK_IRQ_EN_W::new(self, 19)
355    }
356    #[doc = "Bit 20 - Lock\\[i\\] Interrupt Enable"]
357    #[inline(always)]
358    #[must_use]
359    pub fn lock20_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
360        LOCK_IRQ_EN_W::new(self, 20)
361    }
362    #[doc = "Bit 21 - Lock\\[i\\] Interrupt Enable"]
363    #[inline(always)]
364    #[must_use]
365    pub fn lock21_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
366        LOCK_IRQ_EN_W::new(self, 21)
367    }
368    #[doc = "Bit 22 - Lock\\[i\\] Interrupt Enable"]
369    #[inline(always)]
370    #[must_use]
371    pub fn lock22_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
372        LOCK_IRQ_EN_W::new(self, 22)
373    }
374    #[doc = "Bit 23 - Lock\\[i\\] Interrupt Enable"]
375    #[inline(always)]
376    #[must_use]
377    pub fn lock23_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
378        LOCK_IRQ_EN_W::new(self, 23)
379    }
380    #[doc = "Bit 24 - Lock\\[i\\] Interrupt Enable"]
381    #[inline(always)]
382    #[must_use]
383    pub fn lock24_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
384        LOCK_IRQ_EN_W::new(self, 24)
385    }
386    #[doc = "Bit 25 - Lock\\[i\\] Interrupt Enable"]
387    #[inline(always)]
388    #[must_use]
389    pub fn lock25_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
390        LOCK_IRQ_EN_W::new(self, 25)
391    }
392    #[doc = "Bit 26 - Lock\\[i\\] Interrupt Enable"]
393    #[inline(always)]
394    #[must_use]
395    pub fn lock26_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
396        LOCK_IRQ_EN_W::new(self, 26)
397    }
398    #[doc = "Bit 27 - Lock\\[i\\] Interrupt Enable"]
399    #[inline(always)]
400    #[must_use]
401    pub fn lock27_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
402        LOCK_IRQ_EN_W::new(self, 27)
403    }
404    #[doc = "Bit 28 - Lock\\[i\\] Interrupt Enable"]
405    #[inline(always)]
406    #[must_use]
407    pub fn lock28_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
408        LOCK_IRQ_EN_W::new(self, 28)
409    }
410    #[doc = "Bit 29 - Lock\\[i\\] Interrupt Enable"]
411    #[inline(always)]
412    #[must_use]
413    pub fn lock29_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
414        LOCK_IRQ_EN_W::new(self, 29)
415    }
416    #[doc = "Bit 30 - Lock\\[i\\] Interrupt Enable"]
417    #[inline(always)]
418    #[must_use]
419    pub fn lock30_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
420        LOCK_IRQ_EN_W::new(self, 30)
421    }
422    #[doc = "Bit 31 - Lock\\[i\\] Interrupt Enable"]
423    #[inline(always)]
424    #[must_use]
425    pub fn lock31_irq_en(&mut self) -> LOCK_IRQ_EN_W<SPINLOCK_IRQ_EN_SPEC> {
426        LOCK_IRQ_EN_W::new(self, 31)
427    }
428    #[doc = r" Writes raw bits to the register."]
429    #[doc = r""]
430    #[doc = r" # Safety"]
431    #[doc = r""]
432    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
433    #[inline(always)]
434    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
435        self.bits = bits;
436        self
437    }
438}
439#[doc = "Spinlock Interrupt Enable Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`spinlock_irq_en::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`spinlock_irq_en::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
440pub struct SPINLOCK_IRQ_EN_SPEC;
441impl crate::RegisterSpec for SPINLOCK_IRQ_EN_SPEC {
442    type Ux = u32;
443}
444#[doc = "`read()` method returns [`spinlock_irq_en::R`](R) reader structure"]
445impl crate::Readable for SPINLOCK_IRQ_EN_SPEC {}
446#[doc = "`write(|w| ..)` method takes [`spinlock_irq_en::W`](W) writer structure"]
447impl crate::Writable for SPINLOCK_IRQ_EN_SPEC {
448    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
449    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
450}
451#[doc = "`reset()` method sets spinlock_irq_en to value 0"]
452impl crate::Resettable for SPINLOCK_IRQ_EN_SPEC {
453    const RESET_VALUE: Self::Ux = 0;
454}