atsamd51g/tc0/count8/
syncbusy.rs

1#[doc = "Register `SYNCBUSY` reader"]
2pub type R = crate::R<SyncbusySpec>;
3#[doc = "Field `SWRST` reader - swrst"]
4pub type SwrstR = crate::BitReader;
5#[doc = "Field `ENABLE` reader - enable"]
6pub type EnableR = crate::BitReader;
7#[doc = "Field `CTRLB` reader - CTRLB"]
8pub type CtrlbR = crate::BitReader;
9#[doc = "Field `STATUS` reader - STATUS"]
10pub type StatusR = crate::BitReader;
11#[doc = "Field `COUNT` reader - Counter"]
12pub type CountR = crate::BitReader;
13#[doc = "Field `PER` reader - Period"]
14pub type PerR = crate::BitReader;
15#[doc = "Field `CC0` reader - Compare Channel 0"]
16pub type Cc0R = crate::BitReader;
17#[doc = "Field `CC1` reader - Compare Channel 1"]
18pub type Cc1R = crate::BitReader;
19impl R {
20    #[doc = "Bit 0 - swrst"]
21    #[inline(always)]
22    pub fn swrst(&self) -> SwrstR {
23        SwrstR::new((self.bits & 1) != 0)
24    }
25    #[doc = "Bit 1 - enable"]
26    #[inline(always)]
27    pub fn enable(&self) -> EnableR {
28        EnableR::new(((self.bits >> 1) & 1) != 0)
29    }
30    #[doc = "Bit 2 - CTRLB"]
31    #[inline(always)]
32    pub fn ctrlb(&self) -> CtrlbR {
33        CtrlbR::new(((self.bits >> 2) & 1) != 0)
34    }
35    #[doc = "Bit 3 - STATUS"]
36    #[inline(always)]
37    pub fn status(&self) -> StatusR {
38        StatusR::new(((self.bits >> 3) & 1) != 0)
39    }
40    #[doc = "Bit 4 - Counter"]
41    #[inline(always)]
42    pub fn count(&self) -> CountR {
43        CountR::new(((self.bits >> 4) & 1) != 0)
44    }
45    #[doc = "Bit 5 - Period"]
46    #[inline(always)]
47    pub fn per(&self) -> PerR {
48        PerR::new(((self.bits >> 5) & 1) != 0)
49    }
50    #[doc = "Bit 6 - Compare Channel 0"]
51    #[inline(always)]
52    pub fn cc0(&self) -> Cc0R {
53        Cc0R::new(((self.bits >> 6) & 1) != 0)
54    }
55    #[doc = "Bit 7 - Compare Channel 1"]
56    #[inline(always)]
57    pub fn cc1(&self) -> Cc1R {
58        Cc1R::new(((self.bits >> 7) & 1) != 0)
59    }
60}
61#[doc = "Synchronization Status\n\nYou can [`read`](crate::Reg::read) this register and get [`syncbusy::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
62pub struct SyncbusySpec;
63impl crate::RegisterSpec for SyncbusySpec {
64    type Ux = u32;
65}
66#[doc = "`read()` method returns [`syncbusy::R`](R) reader structure"]
67impl crate::Readable for SyncbusySpec {}
68#[doc = "`reset()` method sets SYNCBUSY to value 0"]
69impl crate::Resettable for SyncbusySpec {
70    const RESET_VALUE: u32 = 0;
71}