atsamd51n/pdec/
syncbusy.rs
1#[doc = "Register `SYNCBUSY` reader"]
2pub type R = crate::R<SyncbusySpec>;
3#[doc = "Field `SWRST` reader - Software Reset Synchronization Busy"]
4pub type SwrstR = crate::BitReader;
5#[doc = "Field `ENABLE` reader - Enable Synchronization Busy"]
6pub type EnableR = crate::BitReader;
7#[doc = "Field `CTRLB` reader - Control B Synchronization Busy"]
8pub type CtrlbR = crate::BitReader;
9#[doc = "Field `STATUS` reader - Status Synchronization Busy"]
10pub type StatusR = crate::BitReader;
11#[doc = "Field `PRESC` reader - Prescaler Synchronization Busy"]
12pub type PrescR = crate::BitReader;
13#[doc = "Field `FILTER` reader - Filter Synchronization Busy"]
14pub type FilterR = crate::BitReader;
15#[doc = "Field `COUNT` reader - Count Synchronization Busy"]
16pub type CountR = crate::BitReader;
17#[doc = "Field `CC0` reader - Compare Channel 0 Synchronization Busy"]
18pub type Cc0R = crate::BitReader;
19#[doc = "Field `CC1` reader - Compare Channel 1 Synchronization Busy"]
20pub type Cc1R = crate::BitReader;
21impl R {
22 #[doc = "Bit 0 - Software Reset Synchronization Busy"]
23 #[inline(always)]
24 pub fn swrst(&self) -> SwrstR {
25 SwrstR::new((self.bits & 1) != 0)
26 }
27 #[doc = "Bit 1 - Enable Synchronization Busy"]
28 #[inline(always)]
29 pub fn enable(&self) -> EnableR {
30 EnableR::new(((self.bits >> 1) & 1) != 0)
31 }
32 #[doc = "Bit 2 - Control B Synchronization Busy"]
33 #[inline(always)]
34 pub fn ctrlb(&self) -> CtrlbR {
35 CtrlbR::new(((self.bits >> 2) & 1) != 0)
36 }
37 #[doc = "Bit 3 - Status Synchronization Busy"]
38 #[inline(always)]
39 pub fn status(&self) -> StatusR {
40 StatusR::new(((self.bits >> 3) & 1) != 0)
41 }
42 #[doc = "Bit 4 - Prescaler Synchronization Busy"]
43 #[inline(always)]
44 pub fn presc(&self) -> PrescR {
45 PrescR::new(((self.bits >> 4) & 1) != 0)
46 }
47 #[doc = "Bit 5 - Filter Synchronization Busy"]
48 #[inline(always)]
49 pub fn filter(&self) -> FilterR {
50 FilterR::new(((self.bits >> 5) & 1) != 0)
51 }
52 #[doc = "Bit 6 - Count Synchronization Busy"]
53 #[inline(always)]
54 pub fn count(&self) -> CountR {
55 CountR::new(((self.bits >> 6) & 1) != 0)
56 }
57 #[doc = "Bit 7 - Compare Channel 0 Synchronization Busy"]
58 #[inline(always)]
59 pub fn cc0(&self) -> Cc0R {
60 Cc0R::new(((self.bits >> 7) & 1) != 0)
61 }
62 #[doc = "Bit 8 - Compare Channel 1 Synchronization Busy"]
63 #[inline(always)]
64 pub fn cc1(&self) -> Cc1R {
65 Cc1R::new(((self.bits >> 8) & 1) != 0)
66 }
67}
68#[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)."]
69pub struct SyncbusySpec;
70impl crate::RegisterSpec for SyncbusySpec {
71 type Ux = u32;
72}
73#[doc = "`read()` method returns [`syncbusy::R`](R) reader structure"]
74impl crate::Readable for SyncbusySpec {}
75#[doc = "`reset()` method sets SYNCBUSY to value 0"]
76impl crate::Resettable for SyncbusySpec {
77 const RESET_VALUE: u32 = 0;
78}