atsam4lc8c/usbc/uhint/
mod.rs1#[doc = r" Value read from the register"]
2pub struct R {
3 bits: u32,
4}
5impl super::UHINT {
6 #[doc = r" Reads the contents of the register"]
7 #[inline]
8 pub fn read(&self) -> R {
9 R {
10 bits: self.register.get(),
11 }
12 }
13}
14#[doc = r" Value of the field"]
15pub struct DCONNIR {
16 bits: bool,
17}
18impl DCONNIR {
19 #[doc = r" Value of the field as raw bits"]
20 #[inline]
21 pub fn bit(&self) -> bool {
22 self.bits
23 }
24 #[doc = r" Returns `true` if the bit is clear (0)"]
25 #[inline]
26 pub fn bit_is_clear(&self) -> bool {
27 !self.bit()
28 }
29 #[doc = r" Returns `true` if the bit is set (1)"]
30 #[inline]
31 pub fn bit_is_set(&self) -> bool {
32 self.bit()
33 }
34}
35#[doc = r" Value of the field"]
36pub struct DDISCIR {
37 bits: bool,
38}
39impl DDISCIR {
40 #[doc = r" Value of the field as raw bits"]
41 #[inline]
42 pub fn bit(&self) -> bool {
43 self.bits
44 }
45 #[doc = r" Returns `true` if the bit is clear (0)"]
46 #[inline]
47 pub fn bit_is_clear(&self) -> bool {
48 !self.bit()
49 }
50 #[doc = r" Returns `true` if the bit is set (1)"]
51 #[inline]
52 pub fn bit_is_set(&self) -> bool {
53 self.bit()
54 }
55}
56#[doc = r" Value of the field"]
57pub struct RSTIR {
58 bits: bool,
59}
60impl RSTIR {
61 #[doc = r" Value of the field as raw bits"]
62 #[inline]
63 pub fn bit(&self) -> bool {
64 self.bits
65 }
66 #[doc = r" Returns `true` if the bit is clear (0)"]
67 #[inline]
68 pub fn bit_is_clear(&self) -> bool {
69 !self.bit()
70 }
71 #[doc = r" Returns `true` if the bit is set (1)"]
72 #[inline]
73 pub fn bit_is_set(&self) -> bool {
74 self.bit()
75 }
76}
77#[doc = r" Value of the field"]
78pub struct RSMEDIR {
79 bits: bool,
80}
81impl RSMEDIR {
82 #[doc = r" Value of the field as raw bits"]
83 #[inline]
84 pub fn bit(&self) -> bool {
85 self.bits
86 }
87 #[doc = r" Returns `true` if the bit is clear (0)"]
88 #[inline]
89 pub fn bit_is_clear(&self) -> bool {
90 !self.bit()
91 }
92 #[doc = r" Returns `true` if the bit is set (1)"]
93 #[inline]
94 pub fn bit_is_set(&self) -> bool {
95 self.bit()
96 }
97}
98#[doc = r" Value of the field"]
99pub struct RXRSMIR {
100 bits: bool,
101}
102impl RXRSMIR {
103 #[doc = r" Value of the field as raw bits"]
104 #[inline]
105 pub fn bit(&self) -> bool {
106 self.bits
107 }
108 #[doc = r" Returns `true` if the bit is clear (0)"]
109 #[inline]
110 pub fn bit_is_clear(&self) -> bool {
111 !self.bit()
112 }
113 #[doc = r" Returns `true` if the bit is set (1)"]
114 #[inline]
115 pub fn bit_is_set(&self) -> bool {
116 self.bit()
117 }
118}
119#[doc = r" Value of the field"]
120pub struct HSOFIR {
121 bits: bool,
122}
123impl HSOFIR {
124 #[doc = r" Value of the field as raw bits"]
125 #[inline]
126 pub fn bit(&self) -> bool {
127 self.bits
128 }
129 #[doc = r" Returns `true` if the bit is clear (0)"]
130 #[inline]
131 pub fn bit_is_clear(&self) -> bool {
132 !self.bit()
133 }
134 #[doc = r" Returns `true` if the bit is set (1)"]
135 #[inline]
136 pub fn bit_is_set(&self) -> bool {
137 self.bit()
138 }
139}
140#[doc = r" Value of the field"]
141pub struct HWUPIR {
142 bits: bool,
143}
144impl HWUPIR {
145 #[doc = r" Value of the field as raw bits"]
146 #[inline]
147 pub fn bit(&self) -> bool {
148 self.bits
149 }
150 #[doc = r" Returns `true` if the bit is clear (0)"]
151 #[inline]
152 pub fn bit_is_clear(&self) -> bool {
153 !self.bit()
154 }
155 #[doc = r" Returns `true` if the bit is set (1)"]
156 #[inline]
157 pub fn bit_is_set(&self) -> bool {
158 self.bit()
159 }
160}
161#[doc = r" Value of the field"]
162pub struct P0INTR {
163 bits: bool,
164}
165impl P0INTR {
166 #[doc = r" Value of the field as raw bits"]
167 #[inline]
168 pub fn bit(&self) -> bool {
169 self.bits
170 }
171 #[doc = r" Returns `true` if the bit is clear (0)"]
172 #[inline]
173 pub fn bit_is_clear(&self) -> bool {
174 !self.bit()
175 }
176 #[doc = r" Returns `true` if the bit is set (1)"]
177 #[inline]
178 pub fn bit_is_set(&self) -> bool {
179 self.bit()
180 }
181}
182#[doc = r" Value of the field"]
183pub struct P1INTR {
184 bits: bool,
185}
186impl P1INTR {
187 #[doc = r" Value of the field as raw bits"]
188 #[inline]
189 pub fn bit(&self) -> bool {
190 self.bits
191 }
192 #[doc = r" Returns `true` if the bit is clear (0)"]
193 #[inline]
194 pub fn bit_is_clear(&self) -> bool {
195 !self.bit()
196 }
197 #[doc = r" Returns `true` if the bit is set (1)"]
198 #[inline]
199 pub fn bit_is_set(&self) -> bool {
200 self.bit()
201 }
202}
203#[doc = r" Value of the field"]
204pub struct P2INTR {
205 bits: bool,
206}
207impl P2INTR {
208 #[doc = r" Value of the field as raw bits"]
209 #[inline]
210 pub fn bit(&self) -> bool {
211 self.bits
212 }
213 #[doc = r" Returns `true` if the bit is clear (0)"]
214 #[inline]
215 pub fn bit_is_clear(&self) -> bool {
216 !self.bit()
217 }
218 #[doc = r" Returns `true` if the bit is set (1)"]
219 #[inline]
220 pub fn bit_is_set(&self) -> bool {
221 self.bit()
222 }
223}
224#[doc = r" Value of the field"]
225pub struct P3INTR {
226 bits: bool,
227}
228impl P3INTR {
229 #[doc = r" Value of the field as raw bits"]
230 #[inline]
231 pub fn bit(&self) -> bool {
232 self.bits
233 }
234 #[doc = r" Returns `true` if the bit is clear (0)"]
235 #[inline]
236 pub fn bit_is_clear(&self) -> bool {
237 !self.bit()
238 }
239 #[doc = r" Returns `true` if the bit is set (1)"]
240 #[inline]
241 pub fn bit_is_set(&self) -> bool {
242 self.bit()
243 }
244}
245#[doc = r" Value of the field"]
246pub struct P4INTR {
247 bits: bool,
248}
249impl P4INTR {
250 #[doc = r" Value of the field as raw bits"]
251 #[inline]
252 pub fn bit(&self) -> bool {
253 self.bits
254 }
255 #[doc = r" Returns `true` if the bit is clear (0)"]
256 #[inline]
257 pub fn bit_is_clear(&self) -> bool {
258 !self.bit()
259 }
260 #[doc = r" Returns `true` if the bit is set (1)"]
261 #[inline]
262 pub fn bit_is_set(&self) -> bool {
263 self.bit()
264 }
265}
266#[doc = r" Value of the field"]
267pub struct P5INTR {
268 bits: bool,
269}
270impl P5INTR {
271 #[doc = r" Value of the field as raw bits"]
272 #[inline]
273 pub fn bit(&self) -> bool {
274 self.bits
275 }
276 #[doc = r" Returns `true` if the bit is clear (0)"]
277 #[inline]
278 pub fn bit_is_clear(&self) -> bool {
279 !self.bit()
280 }
281 #[doc = r" Returns `true` if the bit is set (1)"]
282 #[inline]
283 pub fn bit_is_set(&self) -> bool {
284 self.bit()
285 }
286}
287#[doc = r" Value of the field"]
288pub struct P6INTR {
289 bits: bool,
290}
291impl P6INTR {
292 #[doc = r" Value of the field as raw bits"]
293 #[inline]
294 pub fn bit(&self) -> bool {
295 self.bits
296 }
297 #[doc = r" Returns `true` if the bit is clear (0)"]
298 #[inline]
299 pub fn bit_is_clear(&self) -> bool {
300 !self.bit()
301 }
302 #[doc = r" Returns `true` if the bit is set (1)"]
303 #[inline]
304 pub fn bit_is_set(&self) -> bool {
305 self.bit()
306 }
307}
308impl R {
309 #[doc = r" Value of the register as raw bits"]
310 #[inline]
311 pub fn bits(&self) -> u32 {
312 self.bits
313 }
314 #[doc = "Bit 0 - Device Connection Interrupt"]
315 #[inline]
316 pub fn dconni(&self) -> DCONNIR {
317 let bits = {
318 const MASK: bool = true;
319 const OFFSET: u8 = 0;
320 ((self.bits >> OFFSET) & MASK as u32) != 0
321 };
322 DCONNIR { bits }
323 }
324 #[doc = "Bit 1 - Device Disconnection Interrupt"]
325 #[inline]
326 pub fn ddisci(&self) -> DDISCIR {
327 let bits = {
328 const MASK: bool = true;
329 const OFFSET: u8 = 1;
330 ((self.bits >> OFFSET) & MASK as u32) != 0
331 };
332 DDISCIR { bits }
333 }
334 #[doc = "Bit 2 - USB Reset Sent Interrupt"]
335 #[inline]
336 pub fn rsti(&self) -> RSTIR {
337 let bits = {
338 const MASK: bool = true;
339 const OFFSET: u8 = 2;
340 ((self.bits >> OFFSET) & MASK as u32) != 0
341 };
342 RSTIR { bits }
343 }
344 #[doc = "Bit 3 - Downstream Resume Sent Interrupt"]
345 #[inline]
346 pub fn rsmedi(&self) -> RSMEDIR {
347 let bits = {
348 const MASK: bool = true;
349 const OFFSET: u8 = 3;
350 ((self.bits >> OFFSET) & MASK as u32) != 0
351 };
352 RSMEDIR { bits }
353 }
354 #[doc = "Bit 4 - Upstream Resume Received Interrupt"]
355 #[inline]
356 pub fn rxrsmi(&self) -> RXRSMIR {
357 let bits = {
358 const MASK: bool = true;
359 const OFFSET: u8 = 4;
360 ((self.bits >> OFFSET) & MASK as u32) != 0
361 };
362 RXRSMIR { bits }
363 }
364 #[doc = "Bit 5 - Host SOF Interrupt"]
365 #[inline]
366 pub fn hsofi(&self) -> HSOFIR {
367 let bits = {
368 const MASK: bool = true;
369 const OFFSET: u8 = 5;
370 ((self.bits >> OFFSET) & MASK as u32) != 0
371 };
372 HSOFIR { bits }
373 }
374 #[doc = "Bit 6 - Host Wake-Up Interrupt"]
375 #[inline]
376 pub fn hwupi(&self) -> HWUPIR {
377 let bits = {
378 const MASK: bool = true;
379 const OFFSET: u8 = 6;
380 ((self.bits >> OFFSET) & MASK as u32) != 0
381 };
382 HWUPIR { bits }
383 }
384 #[doc = "Bit 8 - Pipe 0 Interrupt"]
385 #[inline]
386 pub fn p0int(&self) -> P0INTR {
387 let bits = {
388 const MASK: bool = true;
389 const OFFSET: u8 = 8;
390 ((self.bits >> OFFSET) & MASK as u32) != 0
391 };
392 P0INTR { bits }
393 }
394 #[doc = "Bit 9 - Pipe 1 Interrupt"]
395 #[inline]
396 pub fn p1int(&self) -> P1INTR {
397 let bits = {
398 const MASK: bool = true;
399 const OFFSET: u8 = 9;
400 ((self.bits >> OFFSET) & MASK as u32) != 0
401 };
402 P1INTR { bits }
403 }
404 #[doc = "Bit 10 - Pipe 2 Interrupt"]
405 #[inline]
406 pub fn p2int(&self) -> P2INTR {
407 let bits = {
408 const MASK: bool = true;
409 const OFFSET: u8 = 10;
410 ((self.bits >> OFFSET) & MASK as u32) != 0
411 };
412 P2INTR { bits }
413 }
414 #[doc = "Bit 11 - Pipe 3 Interrupt"]
415 #[inline]
416 pub fn p3int(&self) -> P3INTR {
417 let bits = {
418 const MASK: bool = true;
419 const OFFSET: u8 = 11;
420 ((self.bits >> OFFSET) & MASK as u32) != 0
421 };
422 P3INTR { bits }
423 }
424 #[doc = "Bit 12 - Pipe 4 Interrupt"]
425 #[inline]
426 pub fn p4int(&self) -> P4INTR {
427 let bits = {
428 const MASK: bool = true;
429 const OFFSET: u8 = 12;
430 ((self.bits >> OFFSET) & MASK as u32) != 0
431 };
432 P4INTR { bits }
433 }
434 #[doc = "Bit 13 - Pipe 5 Interrupt"]
435 #[inline]
436 pub fn p5int(&self) -> P5INTR {
437 let bits = {
438 const MASK: bool = true;
439 const OFFSET: u8 = 13;
440 ((self.bits >> OFFSET) & MASK as u32) != 0
441 };
442 P5INTR { bits }
443 }
444 #[doc = "Bit 14 - Pipe 6 Interrupt"]
445 #[inline]
446 pub fn p6int(&self) -> P6INTR {
447 let bits = {
448 const MASK: bool = true;
449 const OFFSET: u8 = 14;
450 ((self.bits >> OFFSET) & MASK as u32) != 0
451 };
452 P6INTR { bits }
453 }
454}