1#[doc = "Register `SR` reader"]
2pub type R = crate::R<SrSpec>;
3#[doc = "Register `SR` writer"]
4pub type W = crate::W<SrSpec>;
5#[doc = "Field `UIF` reader - Update interrupt flag"]
6pub type UifR = crate::BitReader;
7#[doc = "Field `UIF` writer - Update interrupt flag"]
8pub type UifW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `CC1IF` reader - Capture/compare 1 interrupt flag"]
10pub type Cc1ifR = crate::BitReader;
11#[doc = "Field `CC1IF` writer - Capture/compare 1 interrupt flag"]
12pub type Cc1ifW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `CC2IF` reader - Capture/Compare 2 interrupt flag"]
14pub type Cc2ifR = crate::BitReader;
15#[doc = "Field `CC2IF` writer - Capture/Compare 2 interrupt flag"]
16pub type Cc2ifW<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `CC3IF` reader - Capture/Compare 3 interrupt flag"]
18pub type Cc3ifR = crate::BitReader;
19#[doc = "Field `CC3IF` writer - Capture/Compare 3 interrupt flag"]
20pub type Cc3ifW<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `CC4IF` reader - Capture/Compare 4 interrupt flag"]
22pub type Cc4ifR = crate::BitReader;
23#[doc = "Field `CC4IF` writer - Capture/Compare 4 interrupt flag"]
24pub type Cc4ifW<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `COMIF` reader - COM interrupt flag"]
26pub type ComifR = crate::BitReader;
27#[doc = "Field `COMIF` writer - COM interrupt flag"]
28pub type ComifW<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `TIF` reader - Trigger interrupt flag"]
30pub type TifR = crate::BitReader;
31#[doc = "Field `TIF` writer - Trigger interrupt flag"]
32pub type TifW<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `BIF` reader - Break interrupt flag"]
34pub type BifR = crate::BitReader;
35#[doc = "Field `BIF` writer - Break interrupt flag"]
36pub type BifW<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `CC1OF` reader - Capture/Compare 1 overcapture flag"]
38pub type Cc1ofR = crate::BitReader;
39#[doc = "Field `CC1OF` writer - Capture/Compare 1 overcapture flag"]
40pub type Cc1ofW<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `CC2OF` reader - Capture/compare 2 overcapture flag"]
42pub type Cc2ofR = crate::BitReader;
43#[doc = "Field `CC2OF` writer - Capture/compare 2 overcapture flag"]
44pub type Cc2ofW<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `CC3OF` reader - Capture/Compare 3 overcapture flag"]
46pub type Cc3ofR = crate::BitReader;
47#[doc = "Field `CC3OF` writer - Capture/Compare 3 overcapture flag"]
48pub type Cc3ofW<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `CC4OF` reader - Capture/Compare 4 overcapture flag"]
50pub type Cc4ofR = crate::BitReader;
51#[doc = "Field `CC4OF` writer - Capture/Compare 4 overcapture flag"]
52pub type Cc4ofW<'a, REG> = crate::BitWriter<'a, REG>;
53impl R {
54 #[doc = "Bit 0 - Update interrupt flag"]
55 #[inline(always)]
56 pub fn uif(&self) -> UifR {
57 UifR::new((self.bits & 1) != 0)
58 }
59 #[doc = "Bit 1 - Capture/compare 1 interrupt flag"]
60 #[inline(always)]
61 pub fn cc1if(&self) -> Cc1ifR {
62 Cc1ifR::new(((self.bits >> 1) & 1) != 0)
63 }
64 #[doc = "Bit 2 - Capture/Compare 2 interrupt flag"]
65 #[inline(always)]
66 pub fn cc2if(&self) -> Cc2ifR {
67 Cc2ifR::new(((self.bits >> 2) & 1) != 0)
68 }
69 #[doc = "Bit 3 - Capture/Compare 3 interrupt flag"]
70 #[inline(always)]
71 pub fn cc3if(&self) -> Cc3ifR {
72 Cc3ifR::new(((self.bits >> 3) & 1) != 0)
73 }
74 #[doc = "Bit 4 - Capture/Compare 4 interrupt flag"]
75 #[inline(always)]
76 pub fn cc4if(&self) -> Cc4ifR {
77 Cc4ifR::new(((self.bits >> 4) & 1) != 0)
78 }
79 #[doc = "Bit 5 - COM interrupt flag"]
80 #[inline(always)]
81 pub fn comif(&self) -> ComifR {
82 ComifR::new(((self.bits >> 5) & 1) != 0)
83 }
84 #[doc = "Bit 6 - Trigger interrupt flag"]
85 #[inline(always)]
86 pub fn tif(&self) -> TifR {
87 TifR::new(((self.bits >> 6) & 1) != 0)
88 }
89 #[doc = "Bit 7 - Break interrupt flag"]
90 #[inline(always)]
91 pub fn bif(&self) -> BifR {
92 BifR::new(((self.bits >> 7) & 1) != 0)
93 }
94 #[doc = "Bit 9 - Capture/Compare 1 overcapture flag"]
95 #[inline(always)]
96 pub fn cc1of(&self) -> Cc1ofR {
97 Cc1ofR::new(((self.bits >> 9) & 1) != 0)
98 }
99 #[doc = "Bit 10 - Capture/compare 2 overcapture flag"]
100 #[inline(always)]
101 pub fn cc2of(&self) -> Cc2ofR {
102 Cc2ofR::new(((self.bits >> 10) & 1) != 0)
103 }
104 #[doc = "Bit 11 - Capture/Compare 3 overcapture flag"]
105 #[inline(always)]
106 pub fn cc3of(&self) -> Cc3ofR {
107 Cc3ofR::new(((self.bits >> 11) & 1) != 0)
108 }
109 #[doc = "Bit 12 - Capture/Compare 4 overcapture flag"]
110 #[inline(always)]
111 pub fn cc4of(&self) -> Cc4ofR {
112 Cc4ofR::new(((self.bits >> 12) & 1) != 0)
113 }
114}
115impl W {
116 #[doc = "Bit 0 - Update interrupt flag"]
117 #[inline(always)]
118 pub fn uif(&mut self) -> UifW<SrSpec> {
119 UifW::new(self, 0)
120 }
121 #[doc = "Bit 1 - Capture/compare 1 interrupt flag"]
122 #[inline(always)]
123 pub fn cc1if(&mut self) -> Cc1ifW<SrSpec> {
124 Cc1ifW::new(self, 1)
125 }
126 #[doc = "Bit 2 - Capture/Compare 2 interrupt flag"]
127 #[inline(always)]
128 pub fn cc2if(&mut self) -> Cc2ifW<SrSpec> {
129 Cc2ifW::new(self, 2)
130 }
131 #[doc = "Bit 3 - Capture/Compare 3 interrupt flag"]
132 #[inline(always)]
133 pub fn cc3if(&mut self) -> Cc3ifW<SrSpec> {
134 Cc3ifW::new(self, 3)
135 }
136 #[doc = "Bit 4 - Capture/Compare 4 interrupt flag"]
137 #[inline(always)]
138 pub fn cc4if(&mut self) -> Cc4ifW<SrSpec> {
139 Cc4ifW::new(self, 4)
140 }
141 #[doc = "Bit 5 - COM interrupt flag"]
142 #[inline(always)]
143 pub fn comif(&mut self) -> ComifW<SrSpec> {
144 ComifW::new(self, 5)
145 }
146 #[doc = "Bit 6 - Trigger interrupt flag"]
147 #[inline(always)]
148 pub fn tif(&mut self) -> TifW<SrSpec> {
149 TifW::new(self, 6)
150 }
151 #[doc = "Bit 7 - Break interrupt flag"]
152 #[inline(always)]
153 pub fn bif(&mut self) -> BifW<SrSpec> {
154 BifW::new(self, 7)
155 }
156 #[doc = "Bit 9 - Capture/Compare 1 overcapture flag"]
157 #[inline(always)]
158 pub fn cc1of(&mut self) -> Cc1ofW<SrSpec> {
159 Cc1ofW::new(self, 9)
160 }
161 #[doc = "Bit 10 - Capture/compare 2 overcapture flag"]
162 #[inline(always)]
163 pub fn cc2of(&mut self) -> Cc2ofW<SrSpec> {
164 Cc2ofW::new(self, 10)
165 }
166 #[doc = "Bit 11 - Capture/Compare 3 overcapture flag"]
167 #[inline(always)]
168 pub fn cc3of(&mut self) -> Cc3ofW<SrSpec> {
169 Cc3ofW::new(self, 11)
170 }
171 #[doc = "Bit 12 - Capture/Compare 4 overcapture flag"]
172 #[inline(always)]
173 pub fn cc4of(&mut self) -> Cc4ofW<SrSpec> {
174 Cc4ofW::new(self, 12)
175 }
176}
177#[doc = "status register\n\nYou can [`read`](crate::Reg::read) this register and get [`sr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
178pub struct SrSpec;
179impl crate::RegisterSpec for SrSpec {
180 type Ux = u32;
181}
182#[doc = "`read()` method returns [`sr::R`](R) reader structure"]
183impl crate::Readable for SrSpec {}
184#[doc = "`write(|w| ..)` method takes [`sr::W`](W) writer structure"]
185impl crate::Writable for SrSpec {
186 type Safety = crate::Unsafe;
187}
188#[doc = "`reset()` method sets SR to value 0"]
189impl crate::Resettable for SrSpec {}