stm32l4x2_pac/dma1/
isr.rs1#[doc = r" Value read from the register"]
2pub struct R {
3 bits: u32,
4}
5impl super::ISR {
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 = "Possible values of the field `TEIF7`"]
15#[derive(Clone, Copy, Debug, PartialEq)]
16pub enum TEIF7R {
17 #[doc = "No transfer error"]
18 NOERROR,
19 #[doc = "A transfer error has occured"]
20 ERROR,
21}
22impl TEIF7R {
23 #[doc = r" Returns `true` if the bit is clear (0)"]
24 #[inline]
25 pub fn bit_is_clear(&self) -> bool {
26 !self.bit()
27 }
28 #[doc = r" Returns `true` if the bit is set (1)"]
29 #[inline]
30 pub fn bit_is_set(&self) -> bool {
31 self.bit()
32 }
33 #[doc = r" Value of the field as raw bits"]
34 #[inline]
35 pub fn bit(&self) -> bool {
36 match *self {
37 TEIF7R::NOERROR => false,
38 TEIF7R::ERROR => true,
39 }
40 }
41 #[allow(missing_docs)]
42 #[doc(hidden)]
43 #[inline]
44 pub fn _from(value: bool) -> TEIF7R {
45 match value {
46 false => TEIF7R::NOERROR,
47 true => TEIF7R::ERROR,
48 }
49 }
50 #[doc = "Checks if the value of the field is `NOERROR`"]
51 #[inline]
52 pub fn is_no_error(&self) -> bool {
53 *self == TEIF7R::NOERROR
54 }
55 #[doc = "Checks if the value of the field is `ERROR`"]
56 #[inline]
57 pub fn is_error(&self) -> bool {
58 *self == TEIF7R::ERROR
59 }
60}
61#[doc = "Possible values of the field `HTIF7`"]
62#[derive(Clone, Copy, Debug, PartialEq)]
63pub enum HTIF7R {
64 #[doc = "No half transfer event"]
65 NOTHALT,
66 #[doc = "A half transfer event has occured"]
67 HALF,
68}
69impl HTIF7R {
70 #[doc = r" Returns `true` if the bit is clear (0)"]
71 #[inline]
72 pub fn bit_is_clear(&self) -> bool {
73 !self.bit()
74 }
75 #[doc = r" Returns `true` if the bit is set (1)"]
76 #[inline]
77 pub fn bit_is_set(&self) -> bool {
78 self.bit()
79 }
80 #[doc = r" Value of the field as raw bits"]
81 #[inline]
82 pub fn bit(&self) -> bool {
83 match *self {
84 HTIF7R::NOTHALT => false,
85 HTIF7R::HALF => true,
86 }
87 }
88 #[allow(missing_docs)]
89 #[doc(hidden)]
90 #[inline]
91 pub fn _from(value: bool) -> HTIF7R {
92 match value {
93 false => HTIF7R::NOTHALT,
94 true => HTIF7R::HALF,
95 }
96 }
97 #[doc = "Checks if the value of the field is `NOTHALT`"]
98 #[inline]
99 pub fn is_not_halt(&self) -> bool {
100 *self == HTIF7R::NOTHALT
101 }
102 #[doc = "Checks if the value of the field is `HALF`"]
103 #[inline]
104 pub fn is_half(&self) -> bool {
105 *self == HTIF7R::HALF
106 }
107}
108#[doc = "Possible values of the field `TCIF7`"]
109#[derive(Clone, Copy, Debug, PartialEq)]
110pub enum TCIF7R {
111 #[doc = "No transfer complete event"]
112 NOTCOMPLETE,
113 #[doc = "A transfer complete event has occured"]
114 COMPLETE,
115}
116impl TCIF7R {
117 #[doc = r" Returns `true` if the bit is clear (0)"]
118 #[inline]
119 pub fn bit_is_clear(&self) -> bool {
120 !self.bit()
121 }
122 #[doc = r" Returns `true` if the bit is set (1)"]
123 #[inline]
124 pub fn bit_is_set(&self) -> bool {
125 self.bit()
126 }
127 #[doc = r" Value of the field as raw bits"]
128 #[inline]
129 pub fn bit(&self) -> bool {
130 match *self {
131 TCIF7R::NOTCOMPLETE => false,
132 TCIF7R::COMPLETE => true,
133 }
134 }
135 #[allow(missing_docs)]
136 #[doc(hidden)]
137 #[inline]
138 pub fn _from(value: bool) -> TCIF7R {
139 match value {
140 false => TCIF7R::NOTCOMPLETE,
141 true => TCIF7R::COMPLETE,
142 }
143 }
144 #[doc = "Checks if the value of the field is `NOTCOMPLETE`"]
145 #[inline]
146 pub fn is_not_complete(&self) -> bool {
147 *self == TCIF7R::NOTCOMPLETE
148 }
149 #[doc = "Checks if the value of the field is `COMPLETE`"]
150 #[inline]
151 pub fn is_complete(&self) -> bool {
152 *self == TCIF7R::COMPLETE
153 }
154}
155#[doc = "Possible values of the field `GIF7`"]
156#[derive(Clone, Copy, Debug, PartialEq)]
157pub enum GIF7R {
158 #[doc = "No transfer error, half event, complete event"]
159 NOEVENT,
160 #[doc = "A transfer error, half event or complete event has occured"]
161 EVENT,
162}
163impl GIF7R {
164 #[doc = r" Returns `true` if the bit is clear (0)"]
165 #[inline]
166 pub fn bit_is_clear(&self) -> bool {
167 !self.bit()
168 }
169 #[doc = r" Returns `true` if the bit is set (1)"]
170 #[inline]
171 pub fn bit_is_set(&self) -> bool {
172 self.bit()
173 }
174 #[doc = r" Value of the field as raw bits"]
175 #[inline]
176 pub fn bit(&self) -> bool {
177 match *self {
178 GIF7R::NOEVENT => false,
179 GIF7R::EVENT => true,
180 }
181 }
182 #[allow(missing_docs)]
183 #[doc(hidden)]
184 #[inline]
185 pub fn _from(value: bool) -> GIF7R {
186 match value {
187 false => GIF7R::NOEVENT,
188 true => GIF7R::EVENT,
189 }
190 }
191 #[doc = "Checks if the value of the field is `NOEVENT`"]
192 #[inline]
193 pub fn is_no_event(&self) -> bool {
194 *self == GIF7R::NOEVENT
195 }
196 #[doc = "Checks if the value of the field is `EVENT`"]
197 #[inline]
198 pub fn is_event(&self) -> bool {
199 *self == GIF7R::EVENT
200 }
201}
202#[doc = "Possible values of the field `TEIF6`"]
203pub type TEIF6R = TEIF7R;
204#[doc = "Possible values of the field `HTIF6`"]
205pub type HTIF6R = HTIF7R;
206#[doc = "Possible values of the field `TCIF6`"]
207pub type TCIF6R = TCIF7R;
208#[doc = "Possible values of the field `GIF6`"]
209pub type GIF6R = GIF7R;
210#[doc = "Possible values of the field `TEIF5`"]
211pub type TEIF5R = TEIF7R;
212#[doc = "Possible values of the field `HTIF5`"]
213pub type HTIF5R = HTIF7R;
214#[doc = "Possible values of the field `TCIF5`"]
215pub type TCIF5R = TCIF7R;
216#[doc = "Possible values of the field `GIF5`"]
217pub type GIF5R = GIF7R;
218#[doc = "Possible values of the field `TEIF4`"]
219pub type TEIF4R = TEIF7R;
220#[doc = "Possible values of the field `HTIF4`"]
221pub type HTIF4R = HTIF7R;
222#[doc = "Possible values of the field `TCIF4`"]
223pub type TCIF4R = TCIF7R;
224#[doc = "Possible values of the field `GIF4`"]
225pub type GIF4R = GIF7R;
226#[doc = "Possible values of the field `TEIF3`"]
227pub type TEIF3R = TEIF7R;
228#[doc = "Possible values of the field `HTIF3`"]
229pub type HTIF3R = HTIF7R;
230#[doc = "Possible values of the field `TCIF3`"]
231pub type TCIF3R = TCIF7R;
232#[doc = "Possible values of the field `GIF3`"]
233pub type GIF3R = GIF7R;
234#[doc = "Possible values of the field `TEIF2`"]
235pub type TEIF2R = TEIF7R;
236#[doc = "Possible values of the field `HTIF2`"]
237pub type HTIF2R = HTIF7R;
238#[doc = "Possible values of the field `TCIF2`"]
239pub type TCIF2R = TCIF7R;
240#[doc = "Possible values of the field `GIF2`"]
241pub type GIF2R = GIF7R;
242#[doc = "Possible values of the field `TEIF1`"]
243pub type TEIF1R = TEIF7R;
244#[doc = "Possible values of the field `HTIF1`"]
245pub type HTIF1R = HTIF7R;
246#[doc = "Possible values of the field `TCIF1`"]
247pub type TCIF1R = TCIF7R;
248#[doc = "Possible values of the field `GIF1`"]
249pub type GIF1R = GIF7R;
250impl R {
251 #[doc = r" Value of the register as raw bits"]
252 #[inline]
253 pub fn bits(&self) -> u32 {
254 self.bits
255 }
256 #[doc = "Bit 27 - Channel x transfer error flag (x = 1 ..7)"]
257 #[inline]
258 pub fn teif7(&self) -> TEIF7R {
259 TEIF7R::_from({
260 const MASK: bool = true;
261 const OFFSET: u8 = 27;
262 ((self.bits >> OFFSET) & MASK as u32) != 0
263 })
264 }
265 #[doc = "Bit 26 - Channel x half transfer flag (x = 1 ..7)"]
266 #[inline]
267 pub fn htif7(&self) -> HTIF7R {
268 HTIF7R::_from({
269 const MASK: bool = true;
270 const OFFSET: u8 = 26;
271 ((self.bits >> OFFSET) & MASK as u32) != 0
272 })
273 }
274 #[doc = "Bit 25 - Channel x transfer complete flag (x = 1 ..7)"]
275 #[inline]
276 pub fn tcif7(&self) -> TCIF7R {
277 TCIF7R::_from({
278 const MASK: bool = true;
279 const OFFSET: u8 = 25;
280 ((self.bits >> OFFSET) & MASK as u32) != 0
281 })
282 }
283 #[doc = "Bit 24 - Channel x global interrupt flag (x = 1 ..7)"]
284 #[inline]
285 pub fn gif7(&self) -> GIF7R {
286 GIF7R::_from({
287 const MASK: bool = true;
288 const OFFSET: u8 = 24;
289 ((self.bits >> OFFSET) & MASK as u32) != 0
290 })
291 }
292 #[doc = "Bit 23 - Channel x transfer error flag (x = 1 ..7)"]
293 #[inline]
294 pub fn teif6(&self) -> TEIF6R {
295 TEIF6R::_from({
296 const MASK: bool = true;
297 const OFFSET: u8 = 23;
298 ((self.bits >> OFFSET) & MASK as u32) != 0
299 })
300 }
301 #[doc = "Bit 22 - Channel x half transfer flag (x = 1 ..7)"]
302 #[inline]
303 pub fn htif6(&self) -> HTIF6R {
304 HTIF6R::_from({
305 const MASK: bool = true;
306 const OFFSET: u8 = 22;
307 ((self.bits >> OFFSET) & MASK as u32) != 0
308 })
309 }
310 #[doc = "Bit 21 - Channel x transfer complete flag (x = 1 ..7)"]
311 #[inline]
312 pub fn tcif6(&self) -> TCIF6R {
313 TCIF6R::_from({
314 const MASK: bool = true;
315 const OFFSET: u8 = 21;
316 ((self.bits >> OFFSET) & MASK as u32) != 0
317 })
318 }
319 #[doc = "Bit 20 - Channel x global interrupt flag (x = 1 ..7)"]
320 #[inline]
321 pub fn gif6(&self) -> GIF6R {
322 GIF6R::_from({
323 const MASK: bool = true;
324 const OFFSET: u8 = 20;
325 ((self.bits >> OFFSET) & MASK as u32) != 0
326 })
327 }
328 #[doc = "Bit 19 - Channel x transfer error flag (x = 1 ..7)"]
329 #[inline]
330 pub fn teif5(&self) -> TEIF5R {
331 TEIF5R::_from({
332 const MASK: bool = true;
333 const OFFSET: u8 = 19;
334 ((self.bits >> OFFSET) & MASK as u32) != 0
335 })
336 }
337 #[doc = "Bit 18 - Channel x half transfer flag (x = 1 ..7)"]
338 #[inline]
339 pub fn htif5(&self) -> HTIF5R {
340 HTIF5R::_from({
341 const MASK: bool = true;
342 const OFFSET: u8 = 18;
343 ((self.bits >> OFFSET) & MASK as u32) != 0
344 })
345 }
346 #[doc = "Bit 17 - Channel x transfer complete flag (x = 1 ..7)"]
347 #[inline]
348 pub fn tcif5(&self) -> TCIF5R {
349 TCIF5R::_from({
350 const MASK: bool = true;
351 const OFFSET: u8 = 17;
352 ((self.bits >> OFFSET) & MASK as u32) != 0
353 })
354 }
355 #[doc = "Bit 16 - Channel x global interrupt flag (x = 1 ..7)"]
356 #[inline]
357 pub fn gif5(&self) -> GIF5R {
358 GIF5R::_from({
359 const MASK: bool = true;
360 const OFFSET: u8 = 16;
361 ((self.bits >> OFFSET) & MASK as u32) != 0
362 })
363 }
364 #[doc = "Bit 15 - Channel x transfer error flag (x = 1 ..7)"]
365 #[inline]
366 pub fn teif4(&self) -> TEIF4R {
367 TEIF4R::_from({
368 const MASK: bool = true;
369 const OFFSET: u8 = 15;
370 ((self.bits >> OFFSET) & MASK as u32) != 0
371 })
372 }
373 #[doc = "Bit 14 - Channel x half transfer flag (x = 1 ..7)"]
374 #[inline]
375 pub fn htif4(&self) -> HTIF4R {
376 HTIF4R::_from({
377 const MASK: bool = true;
378 const OFFSET: u8 = 14;
379 ((self.bits >> OFFSET) & MASK as u32) != 0
380 })
381 }
382 #[doc = "Bit 13 - Channel x transfer complete flag (x = 1 ..7)"]
383 #[inline]
384 pub fn tcif4(&self) -> TCIF4R {
385 TCIF4R::_from({
386 const MASK: bool = true;
387 const OFFSET: u8 = 13;
388 ((self.bits >> OFFSET) & MASK as u32) != 0
389 })
390 }
391 #[doc = "Bit 12 - Channel x global interrupt flag (x = 1 ..7)"]
392 #[inline]
393 pub fn gif4(&self) -> GIF4R {
394 GIF4R::_from({
395 const MASK: bool = true;
396 const OFFSET: u8 = 12;
397 ((self.bits >> OFFSET) & MASK as u32) != 0
398 })
399 }
400 #[doc = "Bit 11 - Channel x transfer error flag (x = 1 ..7)"]
401 #[inline]
402 pub fn teif3(&self) -> TEIF3R {
403 TEIF3R::_from({
404 const MASK: bool = true;
405 const OFFSET: u8 = 11;
406 ((self.bits >> OFFSET) & MASK as u32) != 0
407 })
408 }
409 #[doc = "Bit 10 - Channel x half transfer flag (x = 1 ..7)"]
410 #[inline]
411 pub fn htif3(&self) -> HTIF3R {
412 HTIF3R::_from({
413 const MASK: bool = true;
414 const OFFSET: u8 = 10;
415 ((self.bits >> OFFSET) & MASK as u32) != 0
416 })
417 }
418 #[doc = "Bit 9 - Channel x transfer complete flag (x = 1 ..7)"]
419 #[inline]
420 pub fn tcif3(&self) -> TCIF3R {
421 TCIF3R::_from({
422 const MASK: bool = true;
423 const OFFSET: u8 = 9;
424 ((self.bits >> OFFSET) & MASK as u32) != 0
425 })
426 }
427 #[doc = "Bit 8 - Channel x global interrupt flag (x = 1 ..7)"]
428 #[inline]
429 pub fn gif3(&self) -> GIF3R {
430 GIF3R::_from({
431 const MASK: bool = true;
432 const OFFSET: u8 = 8;
433 ((self.bits >> OFFSET) & MASK as u32) != 0
434 })
435 }
436 #[doc = "Bit 7 - Channel x transfer error flag (x = 1 ..7)"]
437 #[inline]
438 pub fn teif2(&self) -> TEIF2R {
439 TEIF2R::_from({
440 const MASK: bool = true;
441 const OFFSET: u8 = 7;
442 ((self.bits >> OFFSET) & MASK as u32) != 0
443 })
444 }
445 #[doc = "Bit 6 - Channel x half transfer flag (x = 1 ..7)"]
446 #[inline]
447 pub fn htif2(&self) -> HTIF2R {
448 HTIF2R::_from({
449 const MASK: bool = true;
450 const OFFSET: u8 = 6;
451 ((self.bits >> OFFSET) & MASK as u32) != 0
452 })
453 }
454 #[doc = "Bit 5 - Channel x transfer complete flag (x = 1 ..7)"]
455 #[inline]
456 pub fn tcif2(&self) -> TCIF2R {
457 TCIF2R::_from({
458 const MASK: bool = true;
459 const OFFSET: u8 = 5;
460 ((self.bits >> OFFSET) & MASK as u32) != 0
461 })
462 }
463 #[doc = "Bit 4 - Channel x global interrupt flag (x = 1 ..7)"]
464 #[inline]
465 pub fn gif2(&self) -> GIF2R {
466 GIF2R::_from({
467 const MASK: bool = true;
468 const OFFSET: u8 = 4;
469 ((self.bits >> OFFSET) & MASK as u32) != 0
470 })
471 }
472 #[doc = "Bit 3 - Channel x transfer error flag (x = 1 ..7)"]
473 #[inline]
474 pub fn teif1(&self) -> TEIF1R {
475 TEIF1R::_from({
476 const MASK: bool = true;
477 const OFFSET: u8 = 3;
478 ((self.bits >> OFFSET) & MASK as u32) != 0
479 })
480 }
481 #[doc = "Bit 2 - Channel x half transfer flag (x = 1 ..7)"]
482 #[inline]
483 pub fn htif1(&self) -> HTIF1R {
484 HTIF1R::_from({
485 const MASK: bool = true;
486 const OFFSET: u8 = 2;
487 ((self.bits >> OFFSET) & MASK as u32) != 0
488 })
489 }
490 #[doc = "Bit 1 - Channel x transfer complete flag (x = 1 ..7)"]
491 #[inline]
492 pub fn tcif1(&self) -> TCIF1R {
493 TCIF1R::_from({
494 const MASK: bool = true;
495 const OFFSET: u8 = 1;
496 ((self.bits >> OFFSET) & MASK as u32) != 0
497 })
498 }
499 #[doc = "Bit 0 - Channel x global interrupt flag (x = 1 ..7)"]
500 #[inline]
501 pub fn gif1(&self) -> GIF1R {
502 GIF1R::_from({
503 const MASK: bool = true;
504 const OFFSET: u8 = 0;
505 ((self.bits >> OFFSET) & MASK as u32) != 0
506 })
507 }
508}