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
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
#[doc = "Writer for register FMR"]
pub type W = crate::W<u32, super::FMR>;
#[doc = "Register FMR `reset()`'s with value 0"]
impl crate::ResetValue for super::FMR {
    type Type = u32;
    #[inline(always)]
    fn reset_value() -> Self::Type {
        0
    }
}
#[doc = "Modify Transmit Data Valid\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MTDV_AW {
    #[doc = "0: No action."]
    VALUE1,
    #[doc = "1: Bit TDV is set, TE is unchanged."]
    VALUE2,
    #[doc = "2: Bits TDV and TE are cleared."]
    VALUE3,
}
impl From<MTDV_AW> for u8 {
    #[inline(always)]
    fn from(variant: MTDV_AW) -> Self {
        match variant {
            MTDV_AW::VALUE1 => 0,
            MTDV_AW::VALUE2 => 1,
            MTDV_AW::VALUE3 => 2,
        }
    }
}
#[doc = "Write proxy for field `MTDV`"]
pub struct MTDV_W<'a> {
    w: &'a mut W,
}
impl<'a> MTDV_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: MTDV_AW) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "No action."]
    #[inline(always)]
    pub fn value1(self) -> &'a mut W {
        self.variant(MTDV_AW::VALUE1)
    }
    #[doc = "Bit TDV is set, TE is unchanged."]
    #[inline(always)]
    pub fn value2(self) -> &'a mut W {
        self.variant(MTDV_AW::VALUE2)
    }
    #[doc = "Bits TDV and TE are cleared."]
    #[inline(always)]
    pub fn value3(self) -> &'a mut W {
        self.variant(MTDV_AW::VALUE3)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !0x03) | ((value as u32) & 0x03);
        self.w
    }
}
#[doc = "Activate Bit TVC\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ATVC_AW {
    #[doc = "0: No action."]
    VALUE1,
    #[doc = "1: Bit TCSR.TVC is set."]
    VALUE2,
}
impl From<ATVC_AW> for bool {
    #[inline(always)]
    fn from(variant: ATVC_AW) -> Self {
        match variant {
            ATVC_AW::VALUE1 => false,
            ATVC_AW::VALUE2 => true,
        }
    }
}
#[doc = "Write proxy for field `ATVC`"]
pub struct ATVC_W<'a> {
    w: &'a mut W,
}
impl<'a> ATVC_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: ATVC_AW) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "No action."]
    #[inline(always)]
    pub fn value1(self) -> &'a mut W {
        self.variant(ATVC_AW::VALUE1)
    }
    #[doc = "Bit TCSR.TVC is set."]
    #[inline(always)]
    pub fn value2(self) -> &'a mut W {
        self.variant(ATVC_AW::VALUE2)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
        self.w
    }
}
#[doc = "Clear Bits RDV for RBUF0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRDV0_AW {
    #[doc = "0: No action."]
    VALUE1,
    #[doc = "1: Bits RBUF01SR.RDV00 and RBUF01SR.RDV10 are cleared."]
    VALUE2,
}
impl From<CRDV0_AW> for bool {
    #[inline(always)]
    fn from(variant: CRDV0_AW) -> Self {
        match variant {
            CRDV0_AW::VALUE1 => false,
            CRDV0_AW::VALUE2 => true,
        }
    }
}
#[doc = "Write proxy for field `CRDV0`"]
pub struct CRDV0_W<'a> {
    w: &'a mut W,
}
impl<'a> CRDV0_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: CRDV0_AW) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "No action."]
    #[inline(always)]
    pub fn value1(self) -> &'a mut W {
        self.variant(CRDV0_AW::VALUE1)
    }
    #[doc = "Bits RBUF01SR.RDV00 and RBUF01SR.RDV10 are cleared."]
    #[inline(always)]
    pub fn value2(self) -> &'a mut W {
        self.variant(CRDV0_AW::VALUE2)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
        self.w
    }
}
#[doc = "Clear Bit RDV for RBUF1\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRDV1_AW {
    #[doc = "0: No action."]
    VALUE1,
    #[doc = "1: Bits RBUF01SR.RDV01 and RBUF01SR.RDV11 are cleared."]
    VALUE2,
}
impl From<CRDV1_AW> for bool {
    #[inline(always)]
    fn from(variant: CRDV1_AW) -> Self {
        match variant {
            CRDV1_AW::VALUE1 => false,
            CRDV1_AW::VALUE2 => true,
        }
    }
}
#[doc = "Write proxy for field `CRDV1`"]
pub struct CRDV1_W<'a> {
    w: &'a mut W,
}
impl<'a> CRDV1_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: CRDV1_AW) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "No action."]
    #[inline(always)]
    pub fn value1(self) -> &'a mut W {
        self.variant(CRDV1_AW::VALUE1)
    }
    #[doc = "Bits RBUF01SR.RDV01 and RBUF01SR.RDV11 are cleared."]
    #[inline(always)]
    pub fn value2(self) -> &'a mut W {
        self.variant(CRDV1_AW::VALUE2)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
        self.w
    }
}
#[doc = "Set Interrupt Output SRx\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SIO0_AW {
    #[doc = "0: No action."]
    VALUE1,
    #[doc = "1: The service request output SRx is activated."]
    VALUE2,
}
impl From<SIO0_AW> for bool {
    #[inline(always)]
    fn from(variant: SIO0_AW) -> Self {
        match variant {
            SIO0_AW::VALUE1 => false,
            SIO0_AW::VALUE2 => true,
        }
    }
}
#[doc = "Write proxy for field `SIO0`"]
pub struct SIO0_W<'a> {
    w: &'a mut W,
}
impl<'a> SIO0_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: SIO0_AW) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "No action."]
    #[inline(always)]
    pub fn value1(self) -> &'a mut W {
        self.variant(SIO0_AW::VALUE1)
    }
    #[doc = "The service request output SRx is activated."]
    #[inline(always)]
    pub fn value2(self) -> &'a mut W {
        self.variant(SIO0_AW::VALUE2)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
        self.w
    }
}
#[doc = "Set Interrupt Output SRx\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SIO1_AW {
    #[doc = "0: No action."]
    VALUE1,
    #[doc = "1: The service request output SRx is activated."]
    VALUE2,
}
impl From<SIO1_AW> for bool {
    #[inline(always)]
    fn from(variant: SIO1_AW) -> Self {
        match variant {
            SIO1_AW::VALUE1 => false,
            SIO1_AW::VALUE2 => true,
        }
    }
}
#[doc = "Write proxy for field `SIO1`"]
pub struct SIO1_W<'a> {
    w: &'a mut W,
}
impl<'a> SIO1_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: SIO1_AW) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "No action."]
    #[inline(always)]
    pub fn value1(self) -> &'a mut W {
        self.variant(SIO1_AW::VALUE1)
    }
    #[doc = "The service request output SRx is activated."]
    #[inline(always)]
    pub fn value2(self) -> &'a mut W {
        self.variant(SIO1_AW::VALUE2)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17);
        self.w
    }
}
#[doc = "Set Interrupt Output SRx\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SIO2_AW {
    #[doc = "0: No action."]
    VALUE1,
    #[doc = "1: The service request output SRx is activated."]
    VALUE2,
}
impl From<SIO2_AW> for bool {
    #[inline(always)]
    fn from(variant: SIO2_AW) -> Self {
        match variant {
            SIO2_AW::VALUE1 => false,
            SIO2_AW::VALUE2 => true,
        }
    }
}
#[doc = "Write proxy for field `SIO2`"]
pub struct SIO2_W<'a> {
    w: &'a mut W,
}
impl<'a> SIO2_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: SIO2_AW) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "No action."]
    #[inline(always)]
    pub fn value1(self) -> &'a mut W {
        self.variant(SIO2_AW::VALUE1)
    }
    #[doc = "The service request output SRx is activated."]
    #[inline(always)]
    pub fn value2(self) -> &'a mut W {
        self.variant(SIO2_AW::VALUE2)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18);
        self.w
    }
}
#[doc = "Set Interrupt Output SRx\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SIO3_AW {
    #[doc = "0: No action."]
    VALUE1,
    #[doc = "1: The service request output SRx is activated."]
    VALUE2,
}
impl From<SIO3_AW> for bool {
    #[inline(always)]
    fn from(variant: SIO3_AW) -> Self {
        match variant {
            SIO3_AW::VALUE1 => false,
            SIO3_AW::VALUE2 => true,
        }
    }
}
#[doc = "Write proxy for field `SIO3`"]
pub struct SIO3_W<'a> {
    w: &'a mut W,
}
impl<'a> SIO3_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: SIO3_AW) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "No action."]
    #[inline(always)]
    pub fn value1(self) -> &'a mut W {
        self.variant(SIO3_AW::VALUE1)
    }
    #[doc = "The service request output SRx is activated."]
    #[inline(always)]
    pub fn value2(self) -> &'a mut W {
        self.variant(SIO3_AW::VALUE2)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19);
        self.w
    }
}
#[doc = "Set Interrupt Output SRx\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SIO4_AW {
    #[doc = "0: No action."]
    VALUE1,
    #[doc = "1: The service request output SRx is activated."]
    VALUE2,
}
impl From<SIO4_AW> for bool {
    #[inline(always)]
    fn from(variant: SIO4_AW) -> Self {
        match variant {
            SIO4_AW::VALUE1 => false,
            SIO4_AW::VALUE2 => true,
        }
    }
}
#[doc = "Write proxy for field `SIO4`"]
pub struct SIO4_W<'a> {
    w: &'a mut W,
}
impl<'a> SIO4_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: SIO4_AW) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "No action."]
    #[inline(always)]
    pub fn value1(self) -> &'a mut W {
        self.variant(SIO4_AW::VALUE1)
    }
    #[doc = "The service request output SRx is activated."]
    #[inline(always)]
    pub fn value2(self) -> &'a mut W {
        self.variant(SIO4_AW::VALUE2)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20);
        self.w
    }
}
#[doc = "Set Interrupt Output SRx\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SIO5_AW {
    #[doc = "0: No action."]
    VALUE1,
    #[doc = "1: The service request output SRx is activated."]
    VALUE2,
}
impl From<SIO5_AW> for bool {
    #[inline(always)]
    fn from(variant: SIO5_AW) -> Self {
        match variant {
            SIO5_AW::VALUE1 => false,
            SIO5_AW::VALUE2 => true,
        }
    }
}
#[doc = "Write proxy for field `SIO5`"]
pub struct SIO5_W<'a> {
    w: &'a mut W,
}
impl<'a> SIO5_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: SIO5_AW) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "No action."]
    #[inline(always)]
    pub fn value1(self) -> &'a mut W {
        self.variant(SIO5_AW::VALUE1)
    }
    #[doc = "The service request output SRx is activated."]
    #[inline(always)]
    pub fn value2(self) -> &'a mut W {
        self.variant(SIO5_AW::VALUE2)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21);
        self.w
    }
}
impl W {
    #[doc = "Bits 0:1 - Modify Transmit Data Valid"]
    #[inline(always)]
    pub fn mtdv(&mut self) -> MTDV_W {
        MTDV_W { w: self }
    }
    #[doc = "Bit 4 - Activate Bit TVC"]
    #[inline(always)]
    pub fn atvc(&mut self) -> ATVC_W {
        ATVC_W { w: self }
    }
    #[doc = "Bit 14 - Clear Bits RDV for RBUF0"]
    #[inline(always)]
    pub fn crdv0(&mut self) -> CRDV0_W {
        CRDV0_W { w: self }
    }
    #[doc = "Bit 15 - Clear Bit RDV for RBUF1"]
    #[inline(always)]
    pub fn crdv1(&mut self) -> CRDV1_W {
        CRDV1_W { w: self }
    }
    #[doc = "Bit 16 - Set Interrupt Output SRx"]
    #[inline(always)]
    pub fn sio0(&mut self) -> SIO0_W {
        SIO0_W { w: self }
    }
    #[doc = "Bit 17 - Set Interrupt Output SRx"]
    #[inline(always)]
    pub fn sio1(&mut self) -> SIO1_W {
        SIO1_W { w: self }
    }
    #[doc = "Bit 18 - Set Interrupt Output SRx"]
    #[inline(always)]
    pub fn sio2(&mut self) -> SIO2_W {
        SIO2_W { w: self }
    }
    #[doc = "Bit 19 - Set Interrupt Output SRx"]
    #[inline(always)]
    pub fn sio3(&mut self) -> SIO3_W {
        SIO3_W { w: self }
    }
    #[doc = "Bit 20 - Set Interrupt Output SRx"]
    #[inline(always)]
    pub fn sio4(&mut self) -> SIO4_W {
        SIO4_W { w: self }
    }
    #[doc = "Bit 21 - Set Interrupt Output SRx"]
    #[inline(always)]
    pub fn sio5(&mut self) -> SIO5_W {
        SIO5_W { w: self }
    }
}