atsamd51p/tc0/count16/
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 Status Flag"]
6pub type StopR = crate::BitReader;
7#[doc = "Field `STOP` writer - Stop Status Flag"]
8pub type StopW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `SLAVE` reader - Slave Status Flag"]
10pub type SlaveR = crate::BitReader;
11#[doc = "Field `SLAVE` writer - Slave Status Flag"]
12pub type SlaveW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `PERBUFV` reader - Synchronization Busy Status"]
14pub type PerbufvR = crate::BitReader;
15#[doc = "Field `PERBUFV` writer - Synchronization Busy Status"]
16pub type PerbufvW<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `CCBUFV0` reader - Compare channel buffer 0 valid"]
18pub type Ccbufv0R = crate::BitReader;
19#[doc = "Field `CCBUFV0` writer - Compare channel buffer 0 valid"]
20pub type Ccbufv0W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `CCBUFV1` reader - Compare channel buffer 1 valid"]
22pub type Ccbufv1R = crate::BitReader;
23#[doc = "Field `CCBUFV1` writer - Compare channel buffer 1 valid"]
24pub type Ccbufv1W<'a, REG> = crate::BitWriter<'a, REG>;
25impl R {
26    #[doc = "Bit 0 - Stop Status Flag"]
27    #[inline(always)]
28    pub fn stop(&self) -> StopR {
29        StopR::new((self.bits & 1) != 0)
30    }
31    #[doc = "Bit 1 - Slave Status Flag"]
32    #[inline(always)]
33    pub fn slave(&self) -> SlaveR {
34        SlaveR::new(((self.bits >> 1) & 1) != 0)
35    }
36    #[doc = "Bit 3 - Synchronization Busy Status"]
37    #[inline(always)]
38    pub fn perbufv(&self) -> PerbufvR {
39        PerbufvR::new(((self.bits >> 3) & 1) != 0)
40    }
41    #[doc = "Bit 4 - Compare channel buffer 0 valid"]
42    #[inline(always)]
43    pub fn ccbufv0(&self) -> Ccbufv0R {
44        Ccbufv0R::new(((self.bits >> 4) & 1) != 0)
45    }
46    #[doc = "Bit 5 - Compare channel buffer 1 valid"]
47    #[inline(always)]
48    pub fn ccbufv1(&self) -> Ccbufv1R {
49        Ccbufv1R::new(((self.bits >> 5) & 1) != 0)
50    }
51}
52impl W {
53    #[doc = "Bit 0 - Stop Status Flag"]
54    #[inline(always)]
55    #[must_use]
56    pub fn stop(&mut self) -> StopW<StatusSpec> {
57        StopW::new(self, 0)
58    }
59    #[doc = "Bit 1 - Slave Status Flag"]
60    #[inline(always)]
61    #[must_use]
62    pub fn slave(&mut self) -> SlaveW<StatusSpec> {
63        SlaveW::new(self, 1)
64    }
65    #[doc = "Bit 3 - Synchronization Busy Status"]
66    #[inline(always)]
67    #[must_use]
68    pub fn perbufv(&mut self) -> PerbufvW<StatusSpec> {
69        PerbufvW::new(self, 3)
70    }
71    #[doc = "Bit 4 - Compare channel buffer 0 valid"]
72    #[inline(always)]
73    #[must_use]
74    pub fn ccbufv0(&mut self) -> Ccbufv0W<StatusSpec> {
75        Ccbufv0W::new(self, 4)
76    }
77    #[doc = "Bit 5 - Compare channel buffer 1 valid"]
78    #[inline(always)]
79    #[must_use]
80    pub fn ccbufv1(&mut self) -> Ccbufv1W<StatusSpec> {
81        Ccbufv1W::new(self, 5)
82    }
83}
84#[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)."]
85pub struct StatusSpec;
86impl crate::RegisterSpec for StatusSpec {
87    type Ux = u8;
88}
89#[doc = "`read()` method returns [`status::R`](R) reader structure"]
90impl crate::Readable for StatusSpec {}
91#[doc = "`write(|w| ..)` method takes [`status::W`](W) writer structure"]
92impl crate::Writable for StatusSpec {
93    type Safety = crate::Unsafe;
94    const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
95    const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
96}
97#[doc = "`reset()` method sets STATUS to value 0x01"]
98impl crate::Resettable for StatusSpec {
99    const RESET_VALUE: u8 = 0x01;
100}