cc2538_pac/gptimer3/
icr.rs

1#[doc = "Register `ICR` reader"]
2pub type R = crate::R<IcrSpec>;
3#[doc = "Register `ICR` writer"]
4pub type W = crate::W<IcrSpec>;
5#[doc = "Field `TATOCINT` reader - GPTM Timer A time-out interrupt clear"]
6pub type TatocintR = crate::BitReader;
7#[doc = "Field `TATOCINT` writer - GPTM Timer A time-out interrupt clear"]
8pub type TatocintW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `CAMCINT` reader - GPTM Timer A capture match interrupt clear"]
10pub type CamcintR = crate::BitReader;
11#[doc = "Field `CAMCINT` writer - GPTM Timer A capture match interrupt clear"]
12pub type CamcintW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `CAECINT` reader - GPTM Timer A capture event Interrupt clear"]
14pub type CaecintR = crate::BitReader;
15#[doc = "Field `CAECINT` writer - GPTM Timer A capture event Interrupt clear"]
16pub type CaecintW<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `TAMCINT` reader - GPTM Timer A match interrupt clear"]
18pub type TamcintR = crate::BitReader;
19#[doc = "Field `TAMCINT` writer - GPTM Timer A match interrupt clear"]
20pub type TamcintW<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `TBTOCINT` reader - GPTM Timer B time-out interrupt clear"]
22pub type TbtocintR = crate::BitReader;
23#[doc = "Field `TBTOCINT` writer - GPTM Timer B time-out interrupt clear"]
24pub type TbtocintW<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `CBMCINT` reader - GPTM Timer B capture match interrupt clear"]
26pub type CbmcintR = crate::BitReader;
27#[doc = "Field `CBMCINT` writer - GPTM Timer B capture match interrupt clear"]
28pub type CbmcintW<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `CBECINT` reader - GPTM Timer B capture event Interrupt clear"]
30pub type CbecintR = crate::BitReader;
31#[doc = "Field `CBECINT` writer - GPTM Timer B capture event Interrupt clear"]
32pub type CbecintW<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `TBMCINT` reader - GPTM Timer B match interrupt clear"]
34pub type TbmcintR = crate::BitReader;
35#[doc = "Field `TBMCINT` writer - GPTM Timer B match interrupt clear"]
36pub type TbmcintW<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `WUECINT` reader - GPTM write update error interrupt clear"]
38pub type WuecintR = crate::BitReader;
39#[doc = "Field `WUECINT` writer - GPTM write update error interrupt clear"]
40pub type WuecintW<'a, REG> = crate::BitWriter<'a, REG>;
41impl R {
42    #[doc = "Bit 0 - GPTM Timer A time-out interrupt clear"]
43    #[inline(always)]
44    pub fn tatocint(&self) -> TatocintR {
45        TatocintR::new((self.bits & 1) != 0)
46    }
47    #[doc = "Bit 1 - GPTM Timer A capture match interrupt clear"]
48    #[inline(always)]
49    pub fn camcint(&self) -> CamcintR {
50        CamcintR::new(((self.bits >> 1) & 1) != 0)
51    }
52    #[doc = "Bit 2 - GPTM Timer A capture event Interrupt clear"]
53    #[inline(always)]
54    pub fn caecint(&self) -> CaecintR {
55        CaecintR::new(((self.bits >> 2) & 1) != 0)
56    }
57    #[doc = "Bit 4 - GPTM Timer A match interrupt clear"]
58    #[inline(always)]
59    pub fn tamcint(&self) -> TamcintR {
60        TamcintR::new(((self.bits >> 4) & 1) != 0)
61    }
62    #[doc = "Bit 8 - GPTM Timer B time-out interrupt clear"]
63    #[inline(always)]
64    pub fn tbtocint(&self) -> TbtocintR {
65        TbtocintR::new(((self.bits >> 8) & 1) != 0)
66    }
67    #[doc = "Bit 9 - GPTM Timer B capture match interrupt clear"]
68    #[inline(always)]
69    pub fn cbmcint(&self) -> CbmcintR {
70        CbmcintR::new(((self.bits >> 9) & 1) != 0)
71    }
72    #[doc = "Bit 10 - GPTM Timer B capture event Interrupt clear"]
73    #[inline(always)]
74    pub fn cbecint(&self) -> CbecintR {
75        CbecintR::new(((self.bits >> 10) & 1) != 0)
76    }
77    #[doc = "Bit 11 - GPTM Timer B match interrupt clear"]
78    #[inline(always)]
79    pub fn tbmcint(&self) -> TbmcintR {
80        TbmcintR::new(((self.bits >> 11) & 1) != 0)
81    }
82    #[doc = "Bit 16 - GPTM write update error interrupt clear"]
83    #[inline(always)]
84    pub fn wuecint(&self) -> WuecintR {
85        WuecintR::new(((self.bits >> 16) & 1) != 0)
86    }
87}
88impl W {
89    #[doc = "Bit 0 - GPTM Timer A time-out interrupt clear"]
90    #[inline(always)]
91    pub fn tatocint(&mut self) -> TatocintW<IcrSpec> {
92        TatocintW::new(self, 0)
93    }
94    #[doc = "Bit 1 - GPTM Timer A capture match interrupt clear"]
95    #[inline(always)]
96    pub fn camcint(&mut self) -> CamcintW<IcrSpec> {
97        CamcintW::new(self, 1)
98    }
99    #[doc = "Bit 2 - GPTM Timer A capture event Interrupt clear"]
100    #[inline(always)]
101    pub fn caecint(&mut self) -> CaecintW<IcrSpec> {
102        CaecintW::new(self, 2)
103    }
104    #[doc = "Bit 4 - GPTM Timer A match interrupt clear"]
105    #[inline(always)]
106    pub fn tamcint(&mut self) -> TamcintW<IcrSpec> {
107        TamcintW::new(self, 4)
108    }
109    #[doc = "Bit 8 - GPTM Timer B time-out interrupt clear"]
110    #[inline(always)]
111    pub fn tbtocint(&mut self) -> TbtocintW<IcrSpec> {
112        TbtocintW::new(self, 8)
113    }
114    #[doc = "Bit 9 - GPTM Timer B capture match interrupt clear"]
115    #[inline(always)]
116    pub fn cbmcint(&mut self) -> CbmcintW<IcrSpec> {
117        CbmcintW::new(self, 9)
118    }
119    #[doc = "Bit 10 - GPTM Timer B capture event Interrupt clear"]
120    #[inline(always)]
121    pub fn cbecint(&mut self) -> CbecintW<IcrSpec> {
122        CbecintW::new(self, 10)
123    }
124    #[doc = "Bit 11 - GPTM Timer B match interrupt clear"]
125    #[inline(always)]
126    pub fn tbmcint(&mut self) -> TbmcintW<IcrSpec> {
127        TbmcintW::new(self, 11)
128    }
129    #[doc = "Bit 16 - GPTM write update error interrupt clear"]
130    #[inline(always)]
131    pub fn wuecint(&mut self) -> WuecintW<IcrSpec> {
132        WuecintW::new(self, 16)
133    }
134}
135#[doc = "GPTM interrupt clear This register is used to clear the status bits in the RIS and MIS registers. Writing 1 to a bit clears the corresponding bit in the RIS and MIS registers.\n\nYou can [`read`](crate::Reg::read) this register and get [`icr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`icr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
136pub struct IcrSpec;
137impl crate::RegisterSpec for IcrSpec {
138    type Ux = u32;
139}
140#[doc = "`read()` method returns [`icr::R`](R) reader structure"]
141impl crate::Readable for IcrSpec {}
142#[doc = "`write(|w| ..)` method takes [`icr::W`](W) writer structure"]
143impl crate::Writable for IcrSpec {
144    type Safety = crate::Unsafe;
145    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
146    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
147}
148#[doc = "`reset()` method sets ICR to value 0"]
149impl crate::Resettable for IcrSpec {
150    const RESET_VALUE: u32 = 0;
151}