rp2040_pac/ppb/
nvic_icer.rs

1#[doc = "Register `NVIC_ICER` reader"]
2pub type R = crate::R<NVIC_ICER_SPEC>;
3#[doc = "Register `NVIC_ICER` writer"]
4pub type W = crate::W<NVIC_ICER_SPEC>;
5#[doc = "Field `CLRENA` reader - Interrupt clear-enable bits.  
6 Write:  
7 0 = No effect.  
8 1 = Disable interrupt.  
9 Read:  
10 0 = Interrupt disabled.  
11 1 = Interrupt enabled."]
12pub type CLRENA_R = crate::FieldReader<u32>;
13#[doc = "Field `CLRENA` writer - Interrupt clear-enable bits.  
14 Write:  
15 0 = No effect.  
16 1 = Disable interrupt.  
17 Read:  
18 0 = Interrupt disabled.  
19 1 = Interrupt enabled."]
20pub type CLRENA_W<'a, REG> = crate::FieldWriter<'a, REG, 32, u32>;
21impl R {
22    #[doc = "Bits 0:31 - Interrupt clear-enable bits.  
23 Write:  
24 0 = No effect.  
25 1 = Disable interrupt.  
26 Read:  
27 0 = Interrupt disabled.  
28 1 = Interrupt enabled."]
29    #[inline(always)]
30    pub fn clrena(&self) -> CLRENA_R {
31        CLRENA_R::new(self.bits)
32    }
33}
34impl W {
35    #[doc = "Bits 0:31 - Interrupt clear-enable bits.  
36 Write:  
37 0 = No effect.  
38 1 = Disable interrupt.  
39 Read:  
40 0 = Interrupt disabled.  
41 1 = Interrupt enabled."]
42    #[inline(always)]
43    #[must_use]
44    pub fn clrena(&mut self) -> CLRENA_W<NVIC_ICER_SPEC> {
45        CLRENA_W::new(self, 0)
46    }
47    #[doc = r" Writes raw bits to the register."]
48    #[doc = r""]
49    #[doc = r" # Safety"]
50    #[doc = r""]
51    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
52    #[inline(always)]
53    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
54        self.bits = bits;
55        self
56    }
57}
58#[doc = "Use the Interrupt Clear-Enable Registers to disable interrupts and determine which interrupts are currently enabled.  
59
60You can [`read`](crate::generic::Reg::read) this register and get [`nvic_icer::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 [`nvic_icer::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
61pub struct NVIC_ICER_SPEC;
62impl crate::RegisterSpec for NVIC_ICER_SPEC {
63    type Ux = u32;
64}
65#[doc = "`read()` method returns [`nvic_icer::R`](R) reader structure"]
66impl crate::Readable for NVIC_ICER_SPEC {}
67#[doc = "`write(|w| ..)` method takes [`nvic_icer::W`](W) writer structure"]
68impl crate::Writable for NVIC_ICER_SPEC {
69    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
70    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
71}
72#[doc = "`reset()` method sets NVIC_ICER to value 0"]
73impl crate::Resettable for NVIC_ICER_SPEC {
74    const RESET_VALUE: u32 = 0;
75}