atsamd11c/tcc0/
status.rs

1#[doc = "Register `STATUS` reader"]
2pub type R = crate::R<StatusSpec>;
3#[doc = "Register `STATUS` writer"]
4pub type W = crate::W<StatusSpec>;
5#[doc = "Field `STOP` reader - Stop"]
6pub type StopR = crate::BitReader;
7#[doc = "Field `IDX` reader - Ramp"]
8pub type IdxR = crate::BitReader;
9#[doc = "Field `DFS` reader - Non-Recoverable Debug Fault State"]
10pub type DfsR = crate::BitReader;
11#[doc = "Field `DFS` writer - Non-Recoverable Debug Fault State"]
12pub type DfsW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SLAVE` reader - Slave"]
14pub type SlaveR = crate::BitReader;
15#[doc = "Field `PATTBV` reader - Pattern Buffer Valid"]
16pub type PattbvR = crate::BitReader;
17#[doc = "Field `PATTBV` writer - Pattern Buffer Valid"]
18pub type PattbvW<'a, REG> = crate::BitWriter<'a, REG>;
19#[doc = "Field `WAVEBV` reader - Wave Buffer Valid"]
20pub type WavebvR = crate::BitReader;
21#[doc = "Field `WAVEBV` writer - Wave Buffer Valid"]
22pub type WavebvW<'a, REG> = crate::BitWriter<'a, REG>;
23#[doc = "Field `PERBV` reader - Period Buffer Valid"]
24pub type PerbvR = crate::BitReader;
25#[doc = "Field `PERBV` writer - Period Buffer Valid"]
26pub type PerbvW<'a, REG> = crate::BitWriter<'a, REG>;
27#[doc = "Field `FAULTAIN` reader - Recoverable Fault A Input"]
28pub type FaultainR = crate::BitReader;
29#[doc = "Field `FAULTBIN` reader - Recoverable Fault B Input"]
30pub type FaultbinR = crate::BitReader;
31#[doc = "Field `FAULT0IN` reader - Non-Recoverable Fault0 Input"]
32pub type Fault0inR = crate::BitReader;
33#[doc = "Field `FAULT1IN` reader - Non-Recoverable Fault1 Input"]
34pub type Fault1inR = crate::BitReader;
35#[doc = "Field `FAULTA` reader - Recoverable Fault A State"]
36pub type FaultaR = crate::BitReader;
37#[doc = "Field `FAULTA` writer - Recoverable Fault A State"]
38pub type FaultaW<'a, REG> = crate::BitWriter<'a, REG>;
39#[doc = "Field `FAULTB` reader - Recoverable Fault B State"]
40pub type FaultbR = crate::BitReader;
41#[doc = "Field `FAULTB` writer - Recoverable Fault B State"]
42pub type FaultbW<'a, REG> = crate::BitWriter<'a, REG>;
43#[doc = "Field `FAULT0` reader - Non-Recoverable Fault 0 State"]
44pub type Fault0R = crate::BitReader;
45#[doc = "Field `FAULT0` writer - Non-Recoverable Fault 0 State"]
46pub type Fault0W<'a, REG> = crate::BitWriter<'a, REG>;
47#[doc = "Field `FAULT1` reader - Non-Recoverable Fault 1 State"]
48pub type Fault1R = crate::BitReader;
49#[doc = "Field `FAULT1` writer - Non-Recoverable Fault 1 State"]
50pub type Fault1W<'a, REG> = crate::BitWriter<'a, REG>;
51#[doc = "Field `CCBV0` reader - Compare Channel 0 Buffer Valid"]
52pub type Ccbv0R = crate::BitReader;
53#[doc = "Field `CCBV0` writer - Compare Channel 0 Buffer Valid"]
54pub type Ccbv0W<'a, REG> = crate::BitWriter<'a, REG>;
55#[doc = "Field `CCBV1` reader - Compare Channel 1 Buffer Valid"]
56pub type Ccbv1R = crate::BitReader;
57#[doc = "Field `CCBV1` writer - Compare Channel 1 Buffer Valid"]
58pub type Ccbv1W<'a, REG> = crate::BitWriter<'a, REG>;
59#[doc = "Field `CCBV2` reader - Compare Channel 2 Buffer Valid"]
60pub type Ccbv2R = crate::BitReader;
61#[doc = "Field `CCBV2` writer - Compare Channel 2 Buffer Valid"]
62pub type Ccbv2W<'a, REG> = crate::BitWriter<'a, REG>;
63#[doc = "Field `CCBV3` reader - Compare Channel 3 Buffer Valid"]
64pub type Ccbv3R = crate::BitReader;
65#[doc = "Field `CCBV3` writer - Compare Channel 3 Buffer Valid"]
66pub type Ccbv3W<'a, REG> = crate::BitWriter<'a, REG>;
67#[doc = "Field `CMP0` reader - Compare Channel 0 Value"]
68pub type Cmp0R = crate::BitReader;
69#[doc = "Field `CMP1` reader - Compare Channel 1 Value"]
70pub type Cmp1R = crate::BitReader;
71#[doc = "Field `CMP2` reader - Compare Channel 2 Value"]
72pub type Cmp2R = crate::BitReader;
73#[doc = "Field `CMP3` reader - Compare Channel 3 Value"]
74pub type Cmp3R = crate::BitReader;
75impl R {
76    #[doc = "Bit 0 - Stop"]
77    #[inline(always)]
78    pub fn stop(&self) -> StopR {
79        StopR::new((self.bits & 1) != 0)
80    }
81    #[doc = "Bit 1 - Ramp"]
82    #[inline(always)]
83    pub fn idx(&self) -> IdxR {
84        IdxR::new(((self.bits >> 1) & 1) != 0)
85    }
86    #[doc = "Bit 3 - Non-Recoverable Debug Fault State"]
87    #[inline(always)]
88    pub fn dfs(&self) -> DfsR {
89        DfsR::new(((self.bits >> 3) & 1) != 0)
90    }
91    #[doc = "Bit 4 - Slave"]
92    #[inline(always)]
93    pub fn slave(&self) -> SlaveR {
94        SlaveR::new(((self.bits >> 4) & 1) != 0)
95    }
96    #[doc = "Bit 5 - Pattern Buffer Valid"]
97    #[inline(always)]
98    pub fn pattbv(&self) -> PattbvR {
99        PattbvR::new(((self.bits >> 5) & 1) != 0)
100    }
101    #[doc = "Bit 6 - Wave Buffer Valid"]
102    #[inline(always)]
103    pub fn wavebv(&self) -> WavebvR {
104        WavebvR::new(((self.bits >> 6) & 1) != 0)
105    }
106    #[doc = "Bit 7 - Period Buffer Valid"]
107    #[inline(always)]
108    pub fn perbv(&self) -> PerbvR {
109        PerbvR::new(((self.bits >> 7) & 1) != 0)
110    }
111    #[doc = "Bit 8 - Recoverable Fault A Input"]
112    #[inline(always)]
113    pub fn faultain(&self) -> FaultainR {
114        FaultainR::new(((self.bits >> 8) & 1) != 0)
115    }
116    #[doc = "Bit 9 - Recoverable Fault B Input"]
117    #[inline(always)]
118    pub fn faultbin(&self) -> FaultbinR {
119        FaultbinR::new(((self.bits >> 9) & 1) != 0)
120    }
121    #[doc = "Bit 10 - Non-Recoverable Fault0 Input"]
122    #[inline(always)]
123    pub fn fault0in(&self) -> Fault0inR {
124        Fault0inR::new(((self.bits >> 10) & 1) != 0)
125    }
126    #[doc = "Bit 11 - Non-Recoverable Fault1 Input"]
127    #[inline(always)]
128    pub fn fault1in(&self) -> Fault1inR {
129        Fault1inR::new(((self.bits >> 11) & 1) != 0)
130    }
131    #[doc = "Bit 12 - Recoverable Fault A State"]
132    #[inline(always)]
133    pub fn faulta(&self) -> FaultaR {
134        FaultaR::new(((self.bits >> 12) & 1) != 0)
135    }
136    #[doc = "Bit 13 - Recoverable Fault B State"]
137    #[inline(always)]
138    pub fn faultb(&self) -> FaultbR {
139        FaultbR::new(((self.bits >> 13) & 1) != 0)
140    }
141    #[doc = "Bit 14 - Non-Recoverable Fault 0 State"]
142    #[inline(always)]
143    pub fn fault0(&self) -> Fault0R {
144        Fault0R::new(((self.bits >> 14) & 1) != 0)
145    }
146    #[doc = "Bit 15 - Non-Recoverable Fault 1 State"]
147    #[inline(always)]
148    pub fn fault1(&self) -> Fault1R {
149        Fault1R::new(((self.bits >> 15) & 1) != 0)
150    }
151    #[doc = "Bit 16 - Compare Channel 0 Buffer Valid"]
152    #[inline(always)]
153    pub fn ccbv0(&self) -> Ccbv0R {
154        Ccbv0R::new(((self.bits >> 16) & 1) != 0)
155    }
156    #[doc = "Bit 17 - Compare Channel 1 Buffer Valid"]
157    #[inline(always)]
158    pub fn ccbv1(&self) -> Ccbv1R {
159        Ccbv1R::new(((self.bits >> 17) & 1) != 0)
160    }
161    #[doc = "Bit 18 - Compare Channel 2 Buffer Valid"]
162    #[inline(always)]
163    pub fn ccbv2(&self) -> Ccbv2R {
164        Ccbv2R::new(((self.bits >> 18) & 1) != 0)
165    }
166    #[doc = "Bit 19 - Compare Channel 3 Buffer Valid"]
167    #[inline(always)]
168    pub fn ccbv3(&self) -> Ccbv3R {
169        Ccbv3R::new(((self.bits >> 19) & 1) != 0)
170    }
171    #[doc = "Bit 24 - Compare Channel 0 Value"]
172    #[inline(always)]
173    pub fn cmp0(&self) -> Cmp0R {
174        Cmp0R::new(((self.bits >> 24) & 1) != 0)
175    }
176    #[doc = "Bit 25 - Compare Channel 1 Value"]
177    #[inline(always)]
178    pub fn cmp1(&self) -> Cmp1R {
179        Cmp1R::new(((self.bits >> 25) & 1) != 0)
180    }
181    #[doc = "Bit 26 - Compare Channel 2 Value"]
182    #[inline(always)]
183    pub fn cmp2(&self) -> Cmp2R {
184        Cmp2R::new(((self.bits >> 26) & 1) != 0)
185    }
186    #[doc = "Bit 27 - Compare Channel 3 Value"]
187    #[inline(always)]
188    pub fn cmp3(&self) -> Cmp3R {
189        Cmp3R::new(((self.bits >> 27) & 1) != 0)
190    }
191}
192impl W {
193    #[doc = "Bit 3 - Non-Recoverable Debug Fault State"]
194    #[inline(always)]
195    #[must_use]
196    pub fn dfs(&mut self) -> DfsW<StatusSpec> {
197        DfsW::new(self, 3)
198    }
199    #[doc = "Bit 5 - Pattern Buffer Valid"]
200    #[inline(always)]
201    #[must_use]
202    pub fn pattbv(&mut self) -> PattbvW<StatusSpec> {
203        PattbvW::new(self, 5)
204    }
205    #[doc = "Bit 6 - Wave Buffer Valid"]
206    #[inline(always)]
207    #[must_use]
208    pub fn wavebv(&mut self) -> WavebvW<StatusSpec> {
209        WavebvW::new(self, 6)
210    }
211    #[doc = "Bit 7 - Period Buffer Valid"]
212    #[inline(always)]
213    #[must_use]
214    pub fn perbv(&mut self) -> PerbvW<StatusSpec> {
215        PerbvW::new(self, 7)
216    }
217    #[doc = "Bit 12 - Recoverable Fault A State"]
218    #[inline(always)]
219    #[must_use]
220    pub fn faulta(&mut self) -> FaultaW<StatusSpec> {
221        FaultaW::new(self, 12)
222    }
223    #[doc = "Bit 13 - Recoverable Fault B State"]
224    #[inline(always)]
225    #[must_use]
226    pub fn faultb(&mut self) -> FaultbW<StatusSpec> {
227        FaultbW::new(self, 13)
228    }
229    #[doc = "Bit 14 - Non-Recoverable Fault 0 State"]
230    #[inline(always)]
231    #[must_use]
232    pub fn fault0(&mut self) -> Fault0W<StatusSpec> {
233        Fault0W::new(self, 14)
234    }
235    #[doc = "Bit 15 - Non-Recoverable Fault 1 State"]
236    #[inline(always)]
237    #[must_use]
238    pub fn fault1(&mut self) -> Fault1W<StatusSpec> {
239        Fault1W::new(self, 15)
240    }
241    #[doc = "Bit 16 - Compare Channel 0 Buffer Valid"]
242    #[inline(always)]
243    #[must_use]
244    pub fn ccbv0(&mut self) -> Ccbv0W<StatusSpec> {
245        Ccbv0W::new(self, 16)
246    }
247    #[doc = "Bit 17 - Compare Channel 1 Buffer Valid"]
248    #[inline(always)]
249    #[must_use]
250    pub fn ccbv1(&mut self) -> Ccbv1W<StatusSpec> {
251        Ccbv1W::new(self, 17)
252    }
253    #[doc = "Bit 18 - Compare Channel 2 Buffer Valid"]
254    #[inline(always)]
255    #[must_use]
256    pub fn ccbv2(&mut self) -> Ccbv2W<StatusSpec> {
257        Ccbv2W::new(self, 18)
258    }
259    #[doc = "Bit 19 - Compare Channel 3 Buffer Valid"]
260    #[inline(always)]
261    #[must_use]
262    pub fn ccbv3(&mut self) -> Ccbv3W<StatusSpec> {
263        Ccbv3W::new(self, 19)
264    }
265}
266#[doc = "Status\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`status::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
267pub struct StatusSpec;
268impl crate::RegisterSpec for StatusSpec {
269    type Ux = u32;
270}
271#[doc = "`read()` method returns [`status::R`](R) reader structure"]
272impl crate::Readable for StatusSpec {}
273#[doc = "`write(|w| ..)` method takes [`status::W`](W) writer structure"]
274impl crate::Writable for StatusSpec {
275    type Safety = crate::Unsafe;
276    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
277    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
278}
279#[doc = "`reset()` method sets STATUS to value 0x01"]
280impl crate::Resettable for StatusSpec {
281    const RESET_VALUE: u32 = 0x01;
282}