1#[doc = "Register `DCTL` reader"]
2pub type R = crate::R<DCTL_SPEC>;
3#[doc = "Register `DCTL` writer"]
4pub type W = crate::W<DCTL_SPEC>;
5#[doc = "Field `RMTWKUPSIG` reader - "]
6pub type RMTWKUPSIG_R = crate::BitReader;
7#[doc = "Field `RMTWKUPSIG` writer - "]
8pub type RMTWKUPSIG_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `SFTDISCON` reader - "]
10pub type SFTDISCON_R = crate::BitReader;
11#[doc = "Field `SFTDISCON` writer - "]
12pub type SFTDISCON_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `GNPINNAKSTS` reader - "]
14pub type GNPINNAKSTS_R = crate::BitReader;
15#[doc = "Field `GOUTNAKSTS` reader - "]
16pub type GOUTNAKSTS_R = crate::BitReader;
17#[doc = "Field `TSTCTL` reader - "]
18pub type TSTCTL_R = crate::FieldReader;
19#[doc = "Field `TSTCTL` writer - "]
20pub type TSTCTL_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
21#[doc = "Field `SGNPINNAK` writer - "]
22pub type SGNPINNAK_W<'a, REG> = crate::BitWriter<'a, REG>;
23#[doc = "Field `CGNPINNAK` writer - "]
24pub type CGNPINNAK_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `SGOUTNAK` writer - "]
26pub type SGOUTNAK_W<'a, REG> = crate::BitWriter<'a, REG>;
27#[doc = "Field `CGOUTNAK` writer - "]
28pub type CGOUTNAK_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `PWRONPRGDONE` reader - "]
30pub type PWRONPRGDONE_R = crate::BitReader;
31#[doc = "Field `PWRONPRGDONE` writer - "]
32pub type PWRONPRGDONE_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `GMC` reader - "]
34pub type GMC_R = crate::FieldReader;
35#[doc = "Field `GMC` writer - "]
36pub type GMC_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
37#[doc = "Field `IGNRFRMNUM` reader - "]
38pub type IGNRFRMNUM_R = crate::BitReader;
39#[doc = "Field `IGNRFRMNUM` writer - "]
40pub type IGNRFRMNUM_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `NAKONBBLE` reader - "]
42pub type NAKONBBLE_R = crate::BitReader;
43#[doc = "Field `NAKONBBLE` writer - "]
44pub type NAKONBBLE_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `ENCOUNTONBNA` reader - "]
46pub type ENCOUNTONBNA_R = crate::BitReader;
47#[doc = "Field `ENCOUNTONBNA` writer - "]
48pub type ENCOUNTONBNA_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `DEEPSLEEPBESLREJECT` reader - "]
50pub type DEEPSLEEPBESLREJECT_R = crate::BitReader;
51#[doc = "Field `DEEPSLEEPBESLREJECT` writer - "]
52pub type DEEPSLEEPBESLREJECT_W<'a, REG> = crate::BitWriter<'a, REG>;
53impl R {
54 #[doc = "Bit 0"]
55 #[inline(always)]
56 pub fn rmtwkupsig(&self) -> RMTWKUPSIG_R {
57 RMTWKUPSIG_R::new((self.bits & 1) != 0)
58 }
59 #[doc = "Bit 1"]
60 #[inline(always)]
61 pub fn sftdiscon(&self) -> SFTDISCON_R {
62 SFTDISCON_R::new(((self.bits >> 1) & 1) != 0)
63 }
64 #[doc = "Bit 2"]
65 #[inline(always)]
66 pub fn gnpinnaksts(&self) -> GNPINNAKSTS_R {
67 GNPINNAKSTS_R::new(((self.bits >> 2) & 1) != 0)
68 }
69 #[doc = "Bit 3"]
70 #[inline(always)]
71 pub fn goutnaksts(&self) -> GOUTNAKSTS_R {
72 GOUTNAKSTS_R::new(((self.bits >> 3) & 1) != 0)
73 }
74 #[doc = "Bits 4:6"]
75 #[inline(always)]
76 pub fn tstctl(&self) -> TSTCTL_R {
77 TSTCTL_R::new(((self.bits >> 4) & 7) as u8)
78 }
79 #[doc = "Bit 11"]
80 #[inline(always)]
81 pub fn pwronprgdone(&self) -> PWRONPRGDONE_R {
82 PWRONPRGDONE_R::new(((self.bits >> 11) & 1) != 0)
83 }
84 #[doc = "Bits 13:14"]
85 #[inline(always)]
86 pub fn gmc(&self) -> GMC_R {
87 GMC_R::new(((self.bits >> 13) & 3) as u8)
88 }
89 #[doc = "Bit 15"]
90 #[inline(always)]
91 pub fn ignrfrmnum(&self) -> IGNRFRMNUM_R {
92 IGNRFRMNUM_R::new(((self.bits >> 15) & 1) != 0)
93 }
94 #[doc = "Bit 16"]
95 #[inline(always)]
96 pub fn nakonbble(&self) -> NAKONBBLE_R {
97 NAKONBBLE_R::new(((self.bits >> 16) & 1) != 0)
98 }
99 #[doc = "Bit 17"]
100 #[inline(always)]
101 pub fn encountonbna(&self) -> ENCOUNTONBNA_R {
102 ENCOUNTONBNA_R::new(((self.bits >> 17) & 1) != 0)
103 }
104 #[doc = "Bit 18"]
105 #[inline(always)]
106 pub fn deepsleepbeslreject(&self) -> DEEPSLEEPBESLREJECT_R {
107 DEEPSLEEPBESLREJECT_R::new(((self.bits >> 18) & 1) != 0)
108 }
109}
110#[cfg(feature = "impl-register-debug")]
111impl core::fmt::Debug for R {
112 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
113 f.debug_struct("DCTL")
114 .field("rmtwkupsig", &self.rmtwkupsig())
115 .field("sftdiscon", &self.sftdiscon())
116 .field("gnpinnaksts", &self.gnpinnaksts())
117 .field("goutnaksts", &self.goutnaksts())
118 .field("tstctl", &self.tstctl())
119 .field("pwronprgdone", &self.pwronprgdone())
120 .field("gmc", &self.gmc())
121 .field("ignrfrmnum", &self.ignrfrmnum())
122 .field("nakonbble", &self.nakonbble())
123 .field("encountonbna", &self.encountonbna())
124 .field("deepsleepbeslreject", &self.deepsleepbeslreject())
125 .finish()
126 }
127}
128impl W {
129 #[doc = "Bit 0"]
130 #[inline(always)]
131 pub fn rmtwkupsig(&mut self) -> RMTWKUPSIG_W<DCTL_SPEC> {
132 RMTWKUPSIG_W::new(self, 0)
133 }
134 #[doc = "Bit 1"]
135 #[inline(always)]
136 pub fn sftdiscon(&mut self) -> SFTDISCON_W<DCTL_SPEC> {
137 SFTDISCON_W::new(self, 1)
138 }
139 #[doc = "Bits 4:6"]
140 #[inline(always)]
141 pub fn tstctl(&mut self) -> TSTCTL_W<DCTL_SPEC> {
142 TSTCTL_W::new(self, 4)
143 }
144 #[doc = "Bit 7"]
145 #[inline(always)]
146 pub fn sgnpinnak(&mut self) -> SGNPINNAK_W<DCTL_SPEC> {
147 SGNPINNAK_W::new(self, 7)
148 }
149 #[doc = "Bit 8"]
150 #[inline(always)]
151 pub fn cgnpinnak(&mut self) -> CGNPINNAK_W<DCTL_SPEC> {
152 CGNPINNAK_W::new(self, 8)
153 }
154 #[doc = "Bit 9"]
155 #[inline(always)]
156 pub fn sgoutnak(&mut self) -> SGOUTNAK_W<DCTL_SPEC> {
157 SGOUTNAK_W::new(self, 9)
158 }
159 #[doc = "Bit 10"]
160 #[inline(always)]
161 pub fn cgoutnak(&mut self) -> CGOUTNAK_W<DCTL_SPEC> {
162 CGOUTNAK_W::new(self, 10)
163 }
164 #[doc = "Bit 11"]
165 #[inline(always)]
166 pub fn pwronprgdone(&mut self) -> PWRONPRGDONE_W<DCTL_SPEC> {
167 PWRONPRGDONE_W::new(self, 11)
168 }
169 #[doc = "Bits 13:14"]
170 #[inline(always)]
171 pub fn gmc(&mut self) -> GMC_W<DCTL_SPEC> {
172 GMC_W::new(self, 13)
173 }
174 #[doc = "Bit 15"]
175 #[inline(always)]
176 pub fn ignrfrmnum(&mut self) -> IGNRFRMNUM_W<DCTL_SPEC> {
177 IGNRFRMNUM_W::new(self, 15)
178 }
179 #[doc = "Bit 16"]
180 #[inline(always)]
181 pub fn nakonbble(&mut self) -> NAKONBBLE_W<DCTL_SPEC> {
182 NAKONBBLE_W::new(self, 16)
183 }
184 #[doc = "Bit 17"]
185 #[inline(always)]
186 pub fn encountonbna(&mut self) -> ENCOUNTONBNA_W<DCTL_SPEC> {
187 ENCOUNTONBNA_W::new(self, 17)
188 }
189 #[doc = "Bit 18"]
190 #[inline(always)]
191 pub fn deepsleepbeslreject(&mut self) -> DEEPSLEEPBESLREJECT_W<DCTL_SPEC> {
192 DEEPSLEEPBESLREJECT_W::new(self, 18)
193 }
194}
195#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`dctl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dctl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
196pub struct DCTL_SPEC;
197impl crate::RegisterSpec for DCTL_SPEC {
198 type Ux = u32;
199}
200#[doc = "`read()` method returns [`dctl::R`](R) reader structure"]
201impl crate::Readable for DCTL_SPEC {}
202#[doc = "`write(|w| ..)` method takes [`dctl::W`](W) writer structure"]
203impl crate::Writable for DCTL_SPEC {
204 type Safety = crate::Unsafe;
205}
206#[doc = "`reset()` method sets DCTL to value 0x2000"]
207impl crate::Resettable for DCTL_SPEC {
208 const RESET_VALUE: u32 = 0x2000;
209}