rp2040_pac/timer/
inte.rs

1#[doc = "Register `INTE` reader"]
2pub type R = crate::R<INTE_SPEC>;
3#[doc = "Register `INTE` writer"]
4pub type W = crate::W<INTE_SPEC>;
5#[doc = "Field `ALARM_0` reader - "]
6pub type ALARM_0_R = crate::BitReader;
7#[doc = "Field `ALARM_0` writer - "]
8pub type ALARM_0_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `ALARM_1` reader - "]
10pub type ALARM_1_R = crate::BitReader;
11#[doc = "Field `ALARM_1` writer - "]
12pub type ALARM_1_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `ALARM_2` reader - "]
14pub type ALARM_2_R = crate::BitReader;
15#[doc = "Field `ALARM_2` writer - "]
16pub type ALARM_2_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `ALARM_3` reader - "]
18pub type ALARM_3_R = crate::BitReader;
19#[doc = "Field `ALARM_3` writer - "]
20pub type ALARM_3_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22    #[doc = "Bit 0"]
23    #[inline(always)]
24    pub fn alarm_0(&self) -> ALARM_0_R {
25        ALARM_0_R::new((self.bits & 1) != 0)
26    }
27    #[doc = "Bit 1"]
28    #[inline(always)]
29    pub fn alarm_1(&self) -> ALARM_1_R {
30        ALARM_1_R::new(((self.bits >> 1) & 1) != 0)
31    }
32    #[doc = "Bit 2"]
33    #[inline(always)]
34    pub fn alarm_2(&self) -> ALARM_2_R {
35        ALARM_2_R::new(((self.bits >> 2) & 1) != 0)
36    }
37    #[doc = "Bit 3"]
38    #[inline(always)]
39    pub fn alarm_3(&self) -> ALARM_3_R {
40        ALARM_3_R::new(((self.bits >> 3) & 1) != 0)
41    }
42}
43impl W {
44    #[doc = "Bit 0"]
45    #[inline(always)]
46    #[must_use]
47    pub fn alarm_0(&mut self) -> ALARM_0_W<INTE_SPEC> {
48        ALARM_0_W::new(self, 0)
49    }
50    #[doc = "Bit 1"]
51    #[inline(always)]
52    #[must_use]
53    pub fn alarm_1(&mut self) -> ALARM_1_W<INTE_SPEC> {
54        ALARM_1_W::new(self, 1)
55    }
56    #[doc = "Bit 2"]
57    #[inline(always)]
58    #[must_use]
59    pub fn alarm_2(&mut self) -> ALARM_2_W<INTE_SPEC> {
60        ALARM_2_W::new(self, 2)
61    }
62    #[doc = "Bit 3"]
63    #[inline(always)]
64    #[must_use]
65    pub fn alarm_3(&mut self) -> ALARM_3_W<INTE_SPEC> {
66        ALARM_3_W::new(self, 3)
67    }
68    #[doc = r" Writes raw bits to the register."]
69    #[doc = r""]
70    #[doc = r" # Safety"]
71    #[doc = r""]
72    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
73    #[inline(always)]
74    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
75        self.bits = bits;
76        self
77    }
78}
79#[doc = "Interrupt Enable  
80
81You can [`read`](crate::generic::Reg::read) this register and get [`inte::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 [`inte::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
82pub struct INTE_SPEC;
83impl crate::RegisterSpec for INTE_SPEC {
84    type Ux = u32;
85}
86#[doc = "`read()` method returns [`inte::R`](R) reader structure"]
87impl crate::Readable for INTE_SPEC {}
88#[doc = "`write(|w| ..)` method takes [`inte::W`](W) writer structure"]
89impl crate::Writable for INTE_SPEC {
90    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
91    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
92}
93#[doc = "`reset()` method sets INTE to value 0"]
94impl crate::Resettable for INTE_SPEC {
95    const RESET_VALUE: u32 = 0;
96}