rp2040_pac/ppb/
nvic_iser.rs
1#[doc = "Register `NVIC_ISER` reader"]
2pub type R = crate::R<NVIC_ISER_SPEC>;
3#[doc = "Register `NVIC_ISER` writer"]
4pub type W = crate::W<NVIC_ISER_SPEC>;
5#[doc = "Field `SETENA` reader - Interrupt set-enable bits.
6 Write:
7 0 = No effect.
8 1 = Enable interrupt.
9 Read:
10 0 = Interrupt disabled.
11 1 = Interrupt enabled."]
12pub type SETENA_R = crate::FieldReader<u32>;
13#[doc = "Field `SETENA` writer - Interrupt set-enable bits.
14 Write:
15 0 = No effect.
16 1 = Enable interrupt.
17 Read:
18 0 = Interrupt disabled.
19 1 = Interrupt enabled."]
20pub type SETENA_W<'a, REG> = crate::FieldWriter<'a, REG, 32, u32>;
21impl R {
22 #[doc = "Bits 0:31 - Interrupt set-enable bits.
23 Write:
24 0 = No effect.
25 1 = Enable interrupt.
26 Read:
27 0 = Interrupt disabled.
28 1 = Interrupt enabled."]
29 #[inline(always)]
30 pub fn setena(&self) -> SETENA_R {
31 SETENA_R::new(self.bits)
32 }
33}
34impl W {
35 #[doc = "Bits 0:31 - Interrupt set-enable bits.
36 Write:
37 0 = No effect.
38 1 = Enable interrupt.
39 Read:
40 0 = Interrupt disabled.
41 1 = Interrupt enabled."]
42 #[inline(always)]
43 #[must_use]
44 pub fn setena(&mut self) -> SETENA_W<NVIC_ISER_SPEC> {
45 SETENA_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 Set-Enable Register to enable interrupts and determine which interrupts are currently enabled.
59 If a pending interrupt is enabled, the NVIC activates the interrupt based on its priority. If an interrupt is not enabled, asserting its interrupt signal changes the interrupt state to pending, but the NVIC never activates the interrupt, regardless of its priority.
60
61You can [`read`](crate::generic::Reg::read) this register and get [`nvic_iser::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_iser::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
62pub struct NVIC_ISER_SPEC;
63impl crate::RegisterSpec for NVIC_ISER_SPEC {
64 type Ux = u32;
65}
66#[doc = "`read()` method returns [`nvic_iser::R`](R) reader structure"]
67impl crate::Readable for NVIC_ISER_SPEC {}
68#[doc = "`write(|w| ..)` method takes [`nvic_iser::W`](W) writer structure"]
69impl crate::Writable for NVIC_ISER_SPEC {
70 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
71 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
72}
73#[doc = "`reset()` method sets NVIC_ISER to value 0"]
74impl crate::Resettable for NVIC_ISER_SPEC {
75 const RESET_VALUE: u32 = 0;
76}