ra4m2 0.2.0

Peripheral access API for ra4m2 microcontrollers (generated using svd2rust)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
#[doc = "Register `POSR` writer"]
pub struct W(crate::W<POSR_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<POSR_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl From<crate::W<POSR_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<POSR_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR00_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR00_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR00_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR00` writer - Pmn Output Set"]
pub type POSR00_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR00_AW, O>;
impl<'a, const O: u8> POSR00_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR00_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR00_AW::_1)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR01_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR01_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR01_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR01` writer - Pmn Output Set"]
pub type POSR01_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR01_AW, O>;
impl<'a, const O: u8> POSR01_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR01_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR01_AW::_1)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR02_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR02_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR02_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR02` writer - Pmn Output Set"]
pub type POSR02_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR02_AW, O>;
impl<'a, const O: u8> POSR02_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR02_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR02_AW::_1)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR03_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR03_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR03_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR03` writer - Pmn Output Set"]
pub type POSR03_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR03_AW, O>;
impl<'a, const O: u8> POSR03_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR03_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR03_AW::_1)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR04_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR04_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR04_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR04` writer - Pmn Output Set"]
pub type POSR04_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR04_AW, O>;
impl<'a, const O: u8> POSR04_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR04_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR04_AW::_1)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR05_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR05_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR05_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR05` writer - Pmn Output Set"]
pub type POSR05_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR05_AW, O>;
impl<'a, const O: u8> POSR05_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR05_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR05_AW::_1)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR06_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR06_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR06_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR06` writer - Pmn Output Set"]
pub type POSR06_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR06_AW, O>;
impl<'a, const O: u8> POSR06_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR06_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR06_AW::_1)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR07_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR07_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR07_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR07` writer - Pmn Output Set"]
pub type POSR07_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR07_AW, O>;
impl<'a, const O: u8> POSR07_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR07_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR07_AW::_1)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR08_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR08_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR08_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR08` writer - Pmn Output Set"]
pub type POSR08_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR08_AW, O>;
impl<'a, const O: u8> POSR08_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR08_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR08_AW::_1)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR09_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR09_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR09_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR09` writer - Pmn Output Set"]
pub type POSR09_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR09_AW, O>;
impl<'a, const O: u8> POSR09_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR09_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR09_AW::_1)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR10_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR10_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR10_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR10` writer - Pmn Output Set"]
pub type POSR10_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR10_AW, O>;
impl<'a, const O: u8> POSR10_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR10_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR10_AW::_1)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR11_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR11_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR11_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR11` writer - Pmn Output Set"]
pub type POSR11_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR11_AW, O>;
impl<'a, const O: u8> POSR11_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR11_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR11_AW::_1)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR12_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR12_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR12_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR12` writer - Pmn Output Set"]
pub type POSR12_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR12_AW, O>;
impl<'a, const O: u8> POSR12_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR12_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR12_AW::_1)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR13_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR13_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR13_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR13` writer - Pmn Output Set"]
pub type POSR13_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR13_AW, O>;
impl<'a, const O: u8> POSR13_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR13_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR13_AW::_1)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR14_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR14_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR14_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR14` writer - Pmn Output Set"]
pub type POSR14_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR14_AW, O>;
impl<'a, const O: u8> POSR14_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR14_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR14_AW::_1)
    }
}
#[doc = "Pmn Output Set\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum POSR15_AW {
    #[doc = "0: No effect on output"]
    _0 = 0,
    #[doc = "1: High output"]
    _1 = 1,
}
impl From<POSR15_AW> for bool {
    #[inline(always)]
    fn from(variant: POSR15_AW) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `POSR15` writer - Pmn Output Set"]
pub type POSR15_W<'a, const O: u8> = crate::BitWriter<'a, u16, POSR_SPEC, POSR15_AW, O>;
impl<'a, const O: u8> POSR15_W<'a, O> {
    #[doc = "No effect on output"]
    #[inline(always)]
    pub fn _0(self) -> &'a mut W {
        self.variant(POSR15_AW::_0)
    }
    #[doc = "High output"]
    #[inline(always)]
    pub fn _1(self) -> &'a mut W {
        self.variant(POSR15_AW::_1)
    }
}
impl W {
    #[doc = "Bit 0 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr00(&mut self) -> POSR00_W<0> {
        POSR00_W::new(self)
    }
    #[doc = "Bit 1 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr01(&mut self) -> POSR01_W<1> {
        POSR01_W::new(self)
    }
    #[doc = "Bit 2 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr02(&mut self) -> POSR02_W<2> {
        POSR02_W::new(self)
    }
    #[doc = "Bit 3 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr03(&mut self) -> POSR03_W<3> {
        POSR03_W::new(self)
    }
    #[doc = "Bit 4 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr04(&mut self) -> POSR04_W<4> {
        POSR04_W::new(self)
    }
    #[doc = "Bit 5 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr05(&mut self) -> POSR05_W<5> {
        POSR05_W::new(self)
    }
    #[doc = "Bit 6 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr06(&mut self) -> POSR06_W<6> {
        POSR06_W::new(self)
    }
    #[doc = "Bit 7 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr07(&mut self) -> POSR07_W<7> {
        POSR07_W::new(self)
    }
    #[doc = "Bit 8 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr08(&mut self) -> POSR08_W<8> {
        POSR08_W::new(self)
    }
    #[doc = "Bit 9 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr09(&mut self) -> POSR09_W<9> {
        POSR09_W::new(self)
    }
    #[doc = "Bit 10 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr10(&mut self) -> POSR10_W<10> {
        POSR10_W::new(self)
    }
    #[doc = "Bit 11 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr11(&mut self) -> POSR11_W<11> {
        POSR11_W::new(self)
    }
    #[doc = "Bit 12 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr12(&mut self) -> POSR12_W<12> {
        POSR12_W::new(self)
    }
    #[doc = "Bit 13 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr13(&mut self) -> POSR13_W<13> {
        POSR13_W::new(self)
    }
    #[doc = "Bit 14 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr14(&mut self) -> POSR14_W<14> {
        POSR14_W::new(self)
    }
    #[doc = "Bit 15 - Pmn Output Set"]
    #[inline(always)]
    #[must_use]
    pub fn posr15(&mut self) -> POSR15_W<15> {
        POSR15_W::new(self)
    }
    #[doc = "Writes raw bits to the register."]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "Port Control Register 3\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [posr](index.html) module"]
pub struct POSR_SPEC;
impl crate::RegisterSpec for POSR_SPEC {
    type Ux = u16;
}
#[doc = "`write(|w| ..)` method takes [posr::W](W) writer structure"]
impl crate::Writable for POSR_SPEC {
    type Writer = W;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
}
#[doc = "`reset()` method sets POSR to value 0"]
impl crate::Resettable for POSR_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}