1#[doc = "Register `GOTGCTL` reader"]
2pub type R = crate::R<GOTGCTL_SPEC>;
3#[doc = "Register `GOTGCTL` writer"]
4pub type W = crate::W<GOTGCTL_SPEC>;
5#[doc = "Field `SESREQSCS` reader - "]
6pub type SESREQSCS_R = crate::BitReader;
7#[doc = "Field `SESREQ` reader - "]
8pub type SESREQ_R = crate::BitReader;
9#[doc = "Field `SESREQ` writer - "]
10pub type SESREQ_W<'a, REG> = crate::BitWriter<'a, REG>;
11#[doc = "Field `VBVALIDOVEN` reader - "]
12pub type VBVALIDOVEN_R = crate::BitReader;
13#[doc = "Field `VBVALIDOVEN` writer - "]
14pub type VBVALIDOVEN_W<'a, REG> = crate::BitWriter<'a, REG>;
15#[doc = "Field `VBVALIDOVVAL` reader - "]
16pub type VBVALIDOVVAL_R = crate::BitReader;
17#[doc = "Field `VBVALIDOVVAL` writer - "]
18pub type VBVALIDOVVAL_W<'a, REG> = crate::BitWriter<'a, REG>;
19#[doc = "Field `AVALIDOVEN` reader - "]
20pub type AVALIDOVEN_R = crate::BitReader;
21#[doc = "Field `AVALIDOVEN` writer - "]
22pub type AVALIDOVEN_W<'a, REG> = crate::BitWriter<'a, REG>;
23#[doc = "Field `AVALIDOVVAL` reader - "]
24pub type AVALIDOVVAL_R = crate::BitReader;
25#[doc = "Field `AVALIDOVVAL` writer - "]
26pub type AVALIDOVVAL_W<'a, REG> = crate::BitWriter<'a, REG>;
27#[doc = "Field `BVALIDOVEN` reader - "]
28pub type BVALIDOVEN_R = crate::BitReader;
29#[doc = "Field `BVALIDOVEN` writer - "]
30pub type BVALIDOVEN_W<'a, REG> = crate::BitWriter<'a, REG>;
31#[doc = "Field `BVALIDOVVAL` reader - "]
32pub type BVALIDOVVAL_R = crate::BitReader;
33#[doc = "Field `BVALIDOVVAL` writer - "]
34pub type BVALIDOVVAL_W<'a, REG> = crate::BitWriter<'a, REG>;
35#[doc = "Field `HSTNEGSCS` reader - "]
36pub type HSTNEGSCS_R = crate::BitReader;
37#[doc = "Field `HNPREQ` reader - "]
38pub type HNPREQ_R = crate::BitReader;
39#[doc = "Field `HNPREQ` writer - "]
40pub type HNPREQ_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `HSTSETHNPEN` reader - "]
42pub type HSTSETHNPEN_R = crate::BitReader;
43#[doc = "Field `HSTSETHNPEN` writer - "]
44pub type HSTSETHNPEN_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `DEVHNPEN` reader - "]
46pub type DEVHNPEN_R = crate::BitReader;
47#[doc = "Field `DEVHNPEN` writer - "]
48pub type DEVHNPEN_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `EHEN` reader - "]
50pub type EHEN_R = crate::BitReader;
51#[doc = "Field `EHEN` writer - "]
52pub type EHEN_W<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `DBNCEFLTRBYPASS` reader - "]
54pub type DBNCEFLTRBYPASS_R = crate::BitReader;
55#[doc = "Field `DBNCEFLTRBYPASS` writer - "]
56pub type DBNCEFLTRBYPASS_W<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `CONIDSTS` reader - "]
58pub type CONIDSTS_R = crate::BitReader;
59#[doc = "Field `DBNCTIME` reader - "]
60pub type DBNCTIME_R = crate::BitReader;
61#[doc = "Field `ASESVLD` reader - "]
62pub type ASESVLD_R = crate::BitReader;
63#[doc = "Field `BSESVLD` reader - "]
64pub type BSESVLD_R = crate::BitReader;
65#[doc = "Field `OTGVER` reader - "]
66pub type OTGVER_R = crate::BitReader;
67#[doc = "Field `OTGVER` writer - "]
68pub type OTGVER_W<'a, REG> = crate::BitWriter<'a, REG>;
69#[doc = "Field `CURMOD` reader - "]
70pub type CURMOD_R = crate::BitReader;
71impl R {
72 #[doc = "Bit 0"]
73 #[inline(always)]
74 pub fn sesreqscs(&self) -> SESREQSCS_R {
75 SESREQSCS_R::new((self.bits & 1) != 0)
76 }
77 #[doc = "Bit 1"]
78 #[inline(always)]
79 pub fn sesreq(&self) -> SESREQ_R {
80 SESREQ_R::new(((self.bits >> 1) & 1) != 0)
81 }
82 #[doc = "Bit 2"]
83 #[inline(always)]
84 pub fn vbvalidoven(&self) -> VBVALIDOVEN_R {
85 VBVALIDOVEN_R::new(((self.bits >> 2) & 1) != 0)
86 }
87 #[doc = "Bit 3"]
88 #[inline(always)]
89 pub fn vbvalidovval(&self) -> VBVALIDOVVAL_R {
90 VBVALIDOVVAL_R::new(((self.bits >> 3) & 1) != 0)
91 }
92 #[doc = "Bit 4"]
93 #[inline(always)]
94 pub fn avalidoven(&self) -> AVALIDOVEN_R {
95 AVALIDOVEN_R::new(((self.bits >> 4) & 1) != 0)
96 }
97 #[doc = "Bit 5"]
98 #[inline(always)]
99 pub fn avalidovval(&self) -> AVALIDOVVAL_R {
100 AVALIDOVVAL_R::new(((self.bits >> 5) & 1) != 0)
101 }
102 #[doc = "Bit 6"]
103 #[inline(always)]
104 pub fn bvalidoven(&self) -> BVALIDOVEN_R {
105 BVALIDOVEN_R::new(((self.bits >> 6) & 1) != 0)
106 }
107 #[doc = "Bit 7"]
108 #[inline(always)]
109 pub fn bvalidovval(&self) -> BVALIDOVVAL_R {
110 BVALIDOVVAL_R::new(((self.bits >> 7) & 1) != 0)
111 }
112 #[doc = "Bit 8"]
113 #[inline(always)]
114 pub fn hstnegscs(&self) -> HSTNEGSCS_R {
115 HSTNEGSCS_R::new(((self.bits >> 8) & 1) != 0)
116 }
117 #[doc = "Bit 9"]
118 #[inline(always)]
119 pub fn hnpreq(&self) -> HNPREQ_R {
120 HNPREQ_R::new(((self.bits >> 9) & 1) != 0)
121 }
122 #[doc = "Bit 10"]
123 #[inline(always)]
124 pub fn hstsethnpen(&self) -> HSTSETHNPEN_R {
125 HSTSETHNPEN_R::new(((self.bits >> 10) & 1) != 0)
126 }
127 #[doc = "Bit 11"]
128 #[inline(always)]
129 pub fn devhnpen(&self) -> DEVHNPEN_R {
130 DEVHNPEN_R::new(((self.bits >> 11) & 1) != 0)
131 }
132 #[doc = "Bit 12"]
133 #[inline(always)]
134 pub fn ehen(&self) -> EHEN_R {
135 EHEN_R::new(((self.bits >> 12) & 1) != 0)
136 }
137 #[doc = "Bit 15"]
138 #[inline(always)]
139 pub fn dbncefltrbypass(&self) -> DBNCEFLTRBYPASS_R {
140 DBNCEFLTRBYPASS_R::new(((self.bits >> 15) & 1) != 0)
141 }
142 #[doc = "Bit 16"]
143 #[inline(always)]
144 pub fn conidsts(&self) -> CONIDSTS_R {
145 CONIDSTS_R::new(((self.bits >> 16) & 1) != 0)
146 }
147 #[doc = "Bit 17"]
148 #[inline(always)]
149 pub fn dbnctime(&self) -> DBNCTIME_R {
150 DBNCTIME_R::new(((self.bits >> 17) & 1) != 0)
151 }
152 #[doc = "Bit 18"]
153 #[inline(always)]
154 pub fn asesvld(&self) -> ASESVLD_R {
155 ASESVLD_R::new(((self.bits >> 18) & 1) != 0)
156 }
157 #[doc = "Bit 19"]
158 #[inline(always)]
159 pub fn bsesvld(&self) -> BSESVLD_R {
160 BSESVLD_R::new(((self.bits >> 19) & 1) != 0)
161 }
162 #[doc = "Bit 20"]
163 #[inline(always)]
164 pub fn otgver(&self) -> OTGVER_R {
165 OTGVER_R::new(((self.bits >> 20) & 1) != 0)
166 }
167 #[doc = "Bit 21"]
168 #[inline(always)]
169 pub fn curmod(&self) -> CURMOD_R {
170 CURMOD_R::new(((self.bits >> 21) & 1) != 0)
171 }
172}
173#[cfg(feature = "impl-register-debug")]
174impl core::fmt::Debug for R {
175 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
176 f.debug_struct("GOTGCTL")
177 .field("sesreqscs", &self.sesreqscs())
178 .field("sesreq", &self.sesreq())
179 .field("vbvalidoven", &self.vbvalidoven())
180 .field("vbvalidovval", &self.vbvalidovval())
181 .field("avalidoven", &self.avalidoven())
182 .field("avalidovval", &self.avalidovval())
183 .field("bvalidoven", &self.bvalidoven())
184 .field("bvalidovval", &self.bvalidovval())
185 .field("hstnegscs", &self.hstnegscs())
186 .field("hnpreq", &self.hnpreq())
187 .field("hstsethnpen", &self.hstsethnpen())
188 .field("devhnpen", &self.devhnpen())
189 .field("ehen", &self.ehen())
190 .field("dbncefltrbypass", &self.dbncefltrbypass())
191 .field("conidsts", &self.conidsts())
192 .field("dbnctime", &self.dbnctime())
193 .field("asesvld", &self.asesvld())
194 .field("bsesvld", &self.bsesvld())
195 .field("otgver", &self.otgver())
196 .field("curmod", &self.curmod())
197 .finish()
198 }
199}
200impl W {
201 #[doc = "Bit 1"]
202 #[inline(always)]
203 pub fn sesreq(&mut self) -> SESREQ_W<GOTGCTL_SPEC> {
204 SESREQ_W::new(self, 1)
205 }
206 #[doc = "Bit 2"]
207 #[inline(always)]
208 pub fn vbvalidoven(&mut self) -> VBVALIDOVEN_W<GOTGCTL_SPEC> {
209 VBVALIDOVEN_W::new(self, 2)
210 }
211 #[doc = "Bit 3"]
212 #[inline(always)]
213 pub fn vbvalidovval(&mut self) -> VBVALIDOVVAL_W<GOTGCTL_SPEC> {
214 VBVALIDOVVAL_W::new(self, 3)
215 }
216 #[doc = "Bit 4"]
217 #[inline(always)]
218 pub fn avalidoven(&mut self) -> AVALIDOVEN_W<GOTGCTL_SPEC> {
219 AVALIDOVEN_W::new(self, 4)
220 }
221 #[doc = "Bit 5"]
222 #[inline(always)]
223 pub fn avalidovval(&mut self) -> AVALIDOVVAL_W<GOTGCTL_SPEC> {
224 AVALIDOVVAL_W::new(self, 5)
225 }
226 #[doc = "Bit 6"]
227 #[inline(always)]
228 pub fn bvalidoven(&mut self) -> BVALIDOVEN_W<GOTGCTL_SPEC> {
229 BVALIDOVEN_W::new(self, 6)
230 }
231 #[doc = "Bit 7"]
232 #[inline(always)]
233 pub fn bvalidovval(&mut self) -> BVALIDOVVAL_W<GOTGCTL_SPEC> {
234 BVALIDOVVAL_W::new(self, 7)
235 }
236 #[doc = "Bit 9"]
237 #[inline(always)]
238 pub fn hnpreq(&mut self) -> HNPREQ_W<GOTGCTL_SPEC> {
239 HNPREQ_W::new(self, 9)
240 }
241 #[doc = "Bit 10"]
242 #[inline(always)]
243 pub fn hstsethnpen(&mut self) -> HSTSETHNPEN_W<GOTGCTL_SPEC> {
244 HSTSETHNPEN_W::new(self, 10)
245 }
246 #[doc = "Bit 11"]
247 #[inline(always)]
248 pub fn devhnpen(&mut self) -> DEVHNPEN_W<GOTGCTL_SPEC> {
249 DEVHNPEN_W::new(self, 11)
250 }
251 #[doc = "Bit 12"]
252 #[inline(always)]
253 pub fn ehen(&mut self) -> EHEN_W<GOTGCTL_SPEC> {
254 EHEN_W::new(self, 12)
255 }
256 #[doc = "Bit 15"]
257 #[inline(always)]
258 pub fn dbncefltrbypass(&mut self) -> DBNCEFLTRBYPASS_W<GOTGCTL_SPEC> {
259 DBNCEFLTRBYPASS_W::new(self, 15)
260 }
261 #[doc = "Bit 20"]
262 #[inline(always)]
263 pub fn otgver(&mut self) -> OTGVER_W<GOTGCTL_SPEC> {
264 OTGVER_W::new(self, 20)
265 }
266}
267#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`gotgctl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gotgctl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
268pub struct GOTGCTL_SPEC;
269impl crate::RegisterSpec for GOTGCTL_SPEC {
270 type Ux = u32;
271}
272#[doc = "`read()` method returns [`gotgctl::R`](R) reader structure"]
273impl crate::Readable for GOTGCTL_SPEC {}
274#[doc = "`write(|w| ..)` method takes [`gotgctl::W`](W) writer structure"]
275impl crate::Writable for GOTGCTL_SPEC {
276 type Safety = crate::Unsafe;
277 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
278 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
279}
280#[doc = "`reset()` method sets GOTGCTL to value 0"]
281impl crate::Resettable for GOTGCTL_SPEC {
282 const RESET_VALUE: u32 = 0;
283}