atsaml21e18a/adc/
syncbusy.rs1#[doc = "Register `SYNCBUSY` reader"]
2pub struct R(crate::R<SYNCBUSY_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<SYNCBUSY_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<SYNCBUSY_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<SYNCBUSY_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `SWRST` reader - SWRST Synchronization Busy"]
17pub type SWRST_R = crate::BitReader<bool>;
18#[doc = "Field `ENABLE` reader - ENABLE Synchronization Busy"]
19pub type ENABLE_R = crate::BitReader<bool>;
20#[doc = "Field `AVGCTRL` reader - AVGCTRL Synchronization Busy"]
21pub type AVGCTRL_R = crate::BitReader<bool>;
22#[doc = "Field `SAMPCTRL` reader - SAMPCTRL Synchronization Busy"]
23pub type SAMPCTRL_R = crate::BitReader<bool>;
24#[doc = "Field `CTRLC` reader - CTRLC Synchronization Busy"]
25pub type CTRLC_R = crate::BitReader<bool>;
26#[doc = "Field `INPUTCTRL` reader - INPUTCTRL Synchronization Busy"]
27pub type INPUTCTRL_R = crate::BitReader<bool>;
28#[doc = "Field `OFFSETCORR` reader - OFFSETCTRL Synchronization Busy"]
29pub type OFFSETCORR_R = crate::BitReader<bool>;
30#[doc = "Field `GAINCORR` reader - GAINCORR Synchronization Busy"]
31pub type GAINCORR_R = crate::BitReader<bool>;
32#[doc = "Field `WINLT` reader - WINLT Synchronization Busy"]
33pub type WINLT_R = crate::BitReader<bool>;
34#[doc = "Field `WINUT` reader - WINUT Synchronization Busy"]
35pub type WINUT_R = crate::BitReader<bool>;
36#[doc = "Field `SWTRIG` reader - SWTRG Synchronization Busy"]
37pub type SWTRIG_R = crate::BitReader<bool>;
38impl R {
39 #[doc = "Bit 0 - SWRST Synchronization Busy"]
40 #[inline(always)]
41 pub fn swrst(&self) -> SWRST_R {
42 SWRST_R::new((self.bits & 1) != 0)
43 }
44 #[doc = "Bit 1 - ENABLE Synchronization Busy"]
45 #[inline(always)]
46 pub fn enable(&self) -> ENABLE_R {
47 ENABLE_R::new(((self.bits >> 1) & 1) != 0)
48 }
49 #[doc = "Bit 2 - AVGCTRL Synchronization Busy"]
50 #[inline(always)]
51 pub fn avgctrl(&self) -> AVGCTRL_R {
52 AVGCTRL_R::new(((self.bits >> 2) & 1) != 0)
53 }
54 #[doc = "Bit 3 - SAMPCTRL Synchronization Busy"]
55 #[inline(always)]
56 pub fn sampctrl(&self) -> SAMPCTRL_R {
57 SAMPCTRL_R::new(((self.bits >> 3) & 1) != 0)
58 }
59 #[doc = "Bit 4 - CTRLC Synchronization Busy"]
60 #[inline(always)]
61 pub fn ctrlc(&self) -> CTRLC_R {
62 CTRLC_R::new(((self.bits >> 4) & 1) != 0)
63 }
64 #[doc = "Bit 5 - INPUTCTRL Synchronization Busy"]
65 #[inline(always)]
66 pub fn inputctrl(&self) -> INPUTCTRL_R {
67 INPUTCTRL_R::new(((self.bits >> 5) & 1) != 0)
68 }
69 #[doc = "Bit 6 - OFFSETCTRL Synchronization Busy"]
70 #[inline(always)]
71 pub fn offsetcorr(&self) -> OFFSETCORR_R {
72 OFFSETCORR_R::new(((self.bits >> 6) & 1) != 0)
73 }
74 #[doc = "Bit 7 - GAINCORR Synchronization Busy"]
75 #[inline(always)]
76 pub fn gaincorr(&self) -> GAINCORR_R {
77 GAINCORR_R::new(((self.bits >> 7) & 1) != 0)
78 }
79 #[doc = "Bit 8 - WINLT Synchronization Busy"]
80 #[inline(always)]
81 pub fn winlt(&self) -> WINLT_R {
82 WINLT_R::new(((self.bits >> 8) & 1) != 0)
83 }
84 #[doc = "Bit 9 - WINUT Synchronization Busy"]
85 #[inline(always)]
86 pub fn winut(&self) -> WINUT_R {
87 WINUT_R::new(((self.bits >> 9) & 1) != 0)
88 }
89 #[doc = "Bit 10 - SWTRG Synchronization Busy"]
90 #[inline(always)]
91 pub fn swtrig(&self) -> SWTRIG_R {
92 SWTRIG_R::new(((self.bits >> 10) & 1) != 0)
93 }
94}
95#[doc = "Synchronization Busy\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [syncbusy](index.html) module"]
96pub struct SYNCBUSY_SPEC;
97impl crate::RegisterSpec for SYNCBUSY_SPEC {
98 type Ux = u16;
99}
100#[doc = "`read()` method returns [syncbusy::R](R) reader structure"]
101impl crate::Readable for SYNCBUSY_SPEC {
102 type Reader = R;
103}
104#[doc = "`reset()` method sets SYNCBUSY to value 0"]
105impl crate::Resettable for SYNCBUSY_SPEC {
106 const RESET_VALUE: Self::Ux = 0;
107}