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
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
#[doc = "Register `STAT0` reader"]
pub type R = crate::R<Stat0Spec>;
#[doc = "Register `STAT0` writer"]
pub type W = crate::W<Stat0Spec>;
#[doc = "START condition sent out in master mode\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Sbsend {
    #[doc = "0: No Start condition"]
    NoStart = 0,
    #[doc = "1: Start condition generated"]
    Start = 1,
}
impl From<Sbsend> for bool {
    #[inline(always)]
    fn from(variant: Sbsend) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `SBSEND` reader - START condition sent out in master mode"]
pub type SbsendR = crate::BitReader<Sbsend>;
impl SbsendR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Sbsend {
        match self.bits {
            false => Sbsend::NoStart,
            true => Sbsend::Start,
        }
    }
    #[doc = "No Start condition"]
    #[inline(always)]
    pub fn is_no_start(&self) -> bool {
        *self == Sbsend::NoStart
    }
    #[doc = "Start condition generated"]
    #[inline(always)]
    pub fn is_start(&self) -> bool {
        *self == Sbsend::Start
    }
}
#[doc = "Address is sent in master mode or received and matches in slave mode\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Addsend {
    #[doc = "0: Adress mismatched or not received"]
    NotMatch = 0,
    #[doc = "1: Received slave address matched with one of the enabled slave addresses"]
    Match = 1,
}
impl From<Addsend> for bool {
    #[inline(always)]
    fn from(variant: Addsend) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `ADDSEND` reader - Address is sent in master mode or received and matches in slave mode"]
pub type AddsendR = crate::BitReader<Addsend>;
impl AddsendR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Addsend {
        match self.bits {
            false => Addsend::NotMatch,
            true => Addsend::Match,
        }
    }
    #[doc = "Adress mismatched or not received"]
    #[inline(always)]
    pub fn is_not_match(&self) -> bool {
        *self == Addsend::NotMatch
    }
    #[doc = "Received slave address matched with one of the enabled slave addresses"]
    #[inline(always)]
    pub fn is_match(&self) -> bool {
        *self == Addsend::Match
    }
}
#[doc = "Byte transmission completed\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Btc {
    #[doc = "0: Data byte transfer not done"]
    NotFinished = 0,
    #[doc = "1: Data byte transfer successful"]
    Finished = 1,
}
impl From<Btc> for bool {
    #[inline(always)]
    fn from(variant: Btc) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `BTC` reader - Byte transmission completed"]
pub type BtcR = crate::BitReader<Btc>;
impl BtcR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Btc {
        match self.bits {
            false => Btc::NotFinished,
            true => Btc::Finished,
        }
    }
    #[doc = "Data byte transfer not done"]
    #[inline(always)]
    pub fn is_not_finished(&self) -> bool {
        *self == Btc::NotFinished
    }
    #[doc = "Data byte transfer successful"]
    #[inline(always)]
    pub fn is_finished(&self) -> bool {
        *self == Btc::Finished
    }
}
#[doc = "Header of 10-bit address is sent in master mode\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Add10send {
    #[doc = "0: No header of 10-bit address is sent"]
    NoHeader = 0,
    #[doc = "1: Header of 10-bit address is sent"]
    Header = 1,
}
impl From<Add10send> for bool {
    #[inline(always)]
    fn from(variant: Add10send) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `ADD10SEND` reader - Header of 10-bit address is sent in master mode"]
pub type Add10sendR = crate::BitReader<Add10send>;
impl Add10sendR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Add10send {
        match self.bits {
            false => Add10send::NoHeader,
            true => Add10send::Header,
        }
    }
    #[doc = "No header of 10-bit address is sent"]
    #[inline(always)]
    pub fn is_no_header(&self) -> bool {
        *self == Add10send::NoHeader
    }
    #[doc = "Header of 10-bit address is sent"]
    #[inline(always)]
    pub fn is_header(&self) -> bool {
        *self == Add10send::Header
    }
}
#[doc = "STOP condition detected in slave mode\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Stpdet {
    #[doc = "0: No Stop condition detected"]
    NoStop = 0,
    #[doc = "1: Stop condition detected"]
    Stop = 1,
}
impl From<Stpdet> for bool {
    #[inline(always)]
    fn from(variant: Stpdet) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `STPDET` reader - STOP condition detected in slave mode"]
pub type StpdetR = crate::BitReader<Stpdet>;
impl StpdetR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Stpdet {
        match self.bits {
            false => Stpdet::NoStop,
            true => Stpdet::Stop,
        }
    }
    #[doc = "No Stop condition detected"]
    #[inline(always)]
    pub fn is_no_stop(&self) -> bool {
        *self == Stpdet::NoStop
    }
    #[doc = "Stop condition detected"]
    #[inline(always)]
    pub fn is_stop(&self) -> bool {
        *self == Stpdet::Stop
    }
}
#[doc = "TRBR is not Empty during receiving\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Rbne {
    #[doc = "0: Data register empty"]
    Empty = 0,
    #[doc = "1: Data register not empty, software can read"]
    NotEmpty = 1,
}
impl From<Rbne> for bool {
    #[inline(always)]
    fn from(variant: Rbne) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `RBNE` reader - TRBR is not Empty during receiving"]
pub type RbneR = crate::BitReader<Rbne>;
impl RbneR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Rbne {
        match self.bits {
            false => Rbne::Empty,
            true => Rbne::NotEmpty,
        }
    }
    #[doc = "Data register empty"]
    #[inline(always)]
    pub fn is_empty(&self) -> bool {
        *self == Rbne::Empty
    }
    #[doc = "Data register not empty, software can read"]
    #[inline(always)]
    pub fn is_not_empty(&self) -> bool {
        *self == Rbne::NotEmpty
    }
}
#[doc = "I2C_DATA is Empty during transmitting\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Tbe {
    #[doc = "0: Data register not empty"]
    NotEmpty = 0,
    #[doc = "1: Data register empty, software can write"]
    Empty = 1,
}
impl From<Tbe> for bool {
    #[inline(always)]
    fn from(variant: Tbe) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TBE` reader - I2C_DATA is Empty during transmitting"]
pub type TbeR = crate::BitReader<Tbe>;
impl TbeR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Tbe {
        match self.bits {
            false => Tbe::NotEmpty,
            true => Tbe::Empty,
        }
    }
    #[doc = "Data register not empty"]
    #[inline(always)]
    pub fn is_not_empty(&self) -> bool {
        *self == Tbe::NotEmpty
    }
    #[doc = "Data register empty, software can write"]
    #[inline(always)]
    pub fn is_empty(&self) -> bool {
        *self == Tbe::Empty
    }
}
#[doc = "Bus error\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Berr {
    #[doc = "0: No misplaced Start or Stop condition"]
    NoError = 0,
    #[doc = "1: Misplaced Start or Stop condition"]
    Error = 1,
}
impl From<Berr> for bool {
    #[inline(always)]
    fn from(variant: Berr) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `BERR` reader - Bus error"]
pub type BerrR = crate::BitReader<Berr>;
impl BerrR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Berr {
        match self.bits {
            false => Berr::NoError,
            true => Berr::Error,
        }
    }
    #[doc = "No misplaced Start or Stop condition"]
    #[inline(always)]
    pub fn is_no_error(&self) -> bool {
        *self == Berr::NoError
    }
    #[doc = "Misplaced Start or Stop condition"]
    #[inline(always)]
    pub fn is_error(&self) -> bool {
        *self == Berr::Error
    }
}
#[doc = "Field `BERR` writer - Bus error"]
pub type BerrW<'a, REG> = crate::BitWriter<'a, REG, Berr>;
impl<'a, REG> BerrW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "No misplaced Start or Stop condition"]
    #[inline(always)]
    pub fn no_error(self) -> &'a mut crate::W<REG> {
        self.variant(Berr::NoError)
    }
    #[doc = "Misplaced Start or Stop condition"]
    #[inline(always)]
    pub fn error(self) -> &'a mut crate::W<REG> {
        self.variant(Berr::Error)
    }
}
#[doc = "Arbitration Lost in master mode\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Lostarb {
    #[doc = "0: No Arbitration Lost detected"]
    NoLost = 0,
    #[doc = "1: Arbitration Lost detected"]
    Lost = 1,
}
impl From<Lostarb> for bool {
    #[inline(always)]
    fn from(variant: Lostarb) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `LOSTARB` reader - Arbitration Lost in master mode"]
pub type LostarbR = crate::BitReader<Lostarb>;
impl LostarbR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Lostarb {
        match self.bits {
            false => Lostarb::NoLost,
            true => Lostarb::Lost,
        }
    }
    #[doc = "No Arbitration Lost detected"]
    #[inline(always)]
    pub fn is_no_lost(&self) -> bool {
        *self == Lostarb::NoLost
    }
    #[doc = "Arbitration Lost detected"]
    #[inline(always)]
    pub fn is_lost(&self) -> bool {
        *self == Lostarb::Lost
    }
}
#[doc = "Field `LOSTARB` writer - Arbitration Lost in master mode"]
pub type LostarbW<'a, REG> = crate::BitWriter<'a, REG, Lostarb>;
impl<'a, REG> LostarbW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "No Arbitration Lost detected"]
    #[inline(always)]
    pub fn no_lost(self) -> &'a mut crate::W<REG> {
        self.variant(Lostarb::NoLost)
    }
    #[doc = "Arbitration Lost detected"]
    #[inline(always)]
    pub fn lost(self) -> &'a mut crate::W<REG> {
        self.variant(Lostarb::Lost)
    }
}
#[doc = "Acknowledge error\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Aerr {
    #[doc = "0: No acknowledge error"]
    NoError = 0,
    #[doc = "1: Acknowledge error"]
    Error = 1,
}
impl From<Aerr> for bool {
    #[inline(always)]
    fn from(variant: Aerr) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `AERR` reader - Acknowledge error"]
pub type AerrR = crate::BitReader<Aerr>;
impl AerrR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Aerr {
        match self.bits {
            false => Aerr::NoError,
            true => Aerr::Error,
        }
    }
    #[doc = "No acknowledge error"]
    #[inline(always)]
    pub fn is_no_error(&self) -> bool {
        *self == Aerr::NoError
    }
    #[doc = "Acknowledge error"]
    #[inline(always)]
    pub fn is_error(&self) -> bool {
        *self == Aerr::Error
    }
}
#[doc = "Field `AERR` writer - Acknowledge error"]
pub type AerrW<'a, REG> = crate::BitWriter<'a, REG, Aerr>;
impl<'a, REG> AerrW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "No acknowledge error"]
    #[inline(always)]
    pub fn no_error(self) -> &'a mut crate::W<REG> {
        self.variant(Aerr::NoError)
    }
    #[doc = "Acknowledge error"]
    #[inline(always)]
    pub fn error(self) -> &'a mut crate::W<REG> {
        self.variant(Aerr::Error)
    }
}
#[doc = "Over-run or under-run situation occurs in slave mode\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Ouerr {
    #[doc = "0: No overrun/underrun occured"]
    NoOverrun = 0,
    #[doc = "1: Overrun/underrun occured"]
    Overrun = 1,
}
impl From<Ouerr> for bool {
    #[inline(always)]
    fn from(variant: Ouerr) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `OUERR` reader - Over-run or under-run situation occurs in slave mode"]
pub type OuerrR = crate::BitReader<Ouerr>;
impl OuerrR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Ouerr {
        match self.bits {
            false => Ouerr::NoOverrun,
            true => Ouerr::Overrun,
        }
    }
    #[doc = "No overrun/underrun occured"]
    #[inline(always)]
    pub fn is_no_overrun(&self) -> bool {
        *self == Ouerr::NoOverrun
    }
    #[doc = "Overrun/underrun occured"]
    #[inline(always)]
    pub fn is_overrun(&self) -> bool {
        *self == Ouerr::Overrun
    }
}
#[doc = "Field `OUERR` writer - Over-run or under-run situation occurs in slave mode"]
pub type OuerrW<'a, REG> = crate::BitWriter<'a, REG, Ouerr>;
impl<'a, REG> OuerrW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "No overrun/underrun occured"]
    #[inline(always)]
    pub fn no_overrun(self) -> &'a mut crate::W<REG> {
        self.variant(Ouerr::NoOverrun)
    }
    #[doc = "Overrun/underrun occured"]
    #[inline(always)]
    pub fn overrun(self) -> &'a mut crate::W<REG> {
        self.variant(Ouerr::Overrun)
    }
}
#[doc = "PEC error when receiving data\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Pecerr {
    #[doc = "0: No PEC error"]
    NoError = 0,
    #[doc = "1: PEC error"]
    Error = 1,
}
impl From<Pecerr> for bool {
    #[inline(always)]
    fn from(variant: Pecerr) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `PECERR` reader - PEC error when receiving data"]
pub type PecerrR = crate::BitReader<Pecerr>;
impl PecerrR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Pecerr {
        match self.bits {
            false => Pecerr::NoError,
            true => Pecerr::Error,
        }
    }
    #[doc = "No PEC error"]
    #[inline(always)]
    pub fn is_no_error(&self) -> bool {
        *self == Pecerr::NoError
    }
    #[doc = "PEC error"]
    #[inline(always)]
    pub fn is_error(&self) -> bool {
        *self == Pecerr::Error
    }
}
#[doc = "Field `PECERR` writer - PEC error when receiving data"]
pub type PecerrW<'a, REG> = crate::BitWriter<'a, REG, Pecerr>;
impl<'a, REG> PecerrW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "No PEC error"]
    #[inline(always)]
    pub fn no_error(self) -> &'a mut crate::W<REG> {
        self.variant(Pecerr::NoError)
    }
    #[doc = "PEC error"]
    #[inline(always)]
    pub fn error(self) -> &'a mut crate::W<REG> {
        self.variant(Pecerr::Error)
    }
}
#[doc = "Timeout signal in SMBus mode\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Smbto {
    #[doc = "0: No Timeout error"]
    NoTimeout = 0,
    #[doc = "1: SCL remained low for 25 ms"]
    Timeout = 1,
}
impl From<Smbto> for bool {
    #[inline(always)]
    fn from(variant: Smbto) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `SMBTO` reader - Timeout signal in SMBus mode"]
pub type SmbtoR = crate::BitReader<Smbto>;
impl SmbtoR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Smbto {
        match self.bits {
            false => Smbto::NoTimeout,
            true => Smbto::Timeout,
        }
    }
    #[doc = "No Timeout error"]
    #[inline(always)]
    pub fn is_no_timeout(&self) -> bool {
        *self == Smbto::NoTimeout
    }
    #[doc = "SCL remained low for 25 ms"]
    #[inline(always)]
    pub fn is_timeout(&self) -> bool {
        *self == Smbto::Timeout
    }
}
#[doc = "Field `SMBTO` writer - Timeout signal in SMBus mode"]
pub type SmbtoW<'a, REG> = crate::BitWriter<'a, REG, Smbto>;
impl<'a, REG> SmbtoW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "No Timeout error"]
    #[inline(always)]
    pub fn no_timeout(self) -> &'a mut crate::W<REG> {
        self.variant(Smbto::NoTimeout)
    }
    #[doc = "SCL remained low for 25 ms"]
    #[inline(always)]
    pub fn timeout(self) -> &'a mut crate::W<REG> {
        self.variant(Smbto::Timeout)
    }
}
#[doc = "SMBus Alert status\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Smbalt {
    #[doc = "0: SMBA not pulled down or no alert occured"]
    NoAlert = 0,
    #[doc = "1: SMBA pulled down or alert occurred"]
    Alert = 1,
}
impl From<Smbalt> for bool {
    #[inline(always)]
    fn from(variant: Smbalt) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `SMBALT` reader - SMBus Alert status"]
pub type SmbaltR = crate::BitReader<Smbalt>;
impl SmbaltR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Smbalt {
        match self.bits {
            false => Smbalt::NoAlert,
            true => Smbalt::Alert,
        }
    }
    #[doc = "SMBA not pulled down or no alert occured"]
    #[inline(always)]
    pub fn is_no_alert(&self) -> bool {
        *self == Smbalt::NoAlert
    }
    #[doc = "SMBA pulled down or alert occurred"]
    #[inline(always)]
    pub fn is_alert(&self) -> bool {
        *self == Smbalt::Alert
    }
}
#[doc = "Field `SMBALT` writer - SMBus Alert status"]
pub type SmbaltW<'a, REG> = crate::BitWriter<'a, REG, Smbalt>;
impl<'a, REG> SmbaltW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "SMBA not pulled down or no alert occured"]
    #[inline(always)]
    pub fn no_alert(self) -> &'a mut crate::W<REG> {
        self.variant(Smbalt::NoAlert)
    }
    #[doc = "SMBA pulled down or alert occurred"]
    #[inline(always)]
    pub fn alert(self) -> &'a mut crate::W<REG> {
        self.variant(Smbalt::Alert)
    }
}
impl R {
    #[doc = "Bit 0 - START condition sent out in master mode"]
    #[inline(always)]
    pub fn sbsend(&self) -> SbsendR {
        SbsendR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Address is sent in master mode or received and matches in slave mode"]
    #[inline(always)]
    pub fn addsend(&self) -> AddsendR {
        AddsendR::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - Byte transmission completed"]
    #[inline(always)]
    pub fn btc(&self) -> BtcR {
        BtcR::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - Header of 10-bit address is sent in master mode"]
    #[inline(always)]
    pub fn add10send(&self) -> Add10sendR {
        Add10sendR::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - STOP condition detected in slave mode"]
    #[inline(always)]
    pub fn stpdet(&self) -> StpdetR {
        StpdetR::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 6 - TRBR is not Empty during receiving"]
    #[inline(always)]
    pub fn rbne(&self) -> RbneR {
        RbneR::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - I2C_DATA is Empty during transmitting"]
    #[inline(always)]
    pub fn tbe(&self) -> TbeR {
        TbeR::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 8 - Bus error"]
    #[inline(always)]
    pub fn berr(&self) -> BerrR {
        BerrR::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 9 - Arbitration Lost in master mode"]
    #[inline(always)]
    pub fn lostarb(&self) -> LostarbR {
        LostarbR::new(((self.bits >> 9) & 1) != 0)
    }
    #[doc = "Bit 10 - Acknowledge error"]
    #[inline(always)]
    pub fn aerr(&self) -> AerrR {
        AerrR::new(((self.bits >> 10) & 1) != 0)
    }
    #[doc = "Bit 11 - Over-run or under-run situation occurs in slave mode"]
    #[inline(always)]
    pub fn ouerr(&self) -> OuerrR {
        OuerrR::new(((self.bits >> 11) & 1) != 0)
    }
    #[doc = "Bit 12 - PEC error when receiving data"]
    #[inline(always)]
    pub fn pecerr(&self) -> PecerrR {
        PecerrR::new(((self.bits >> 12) & 1) != 0)
    }
    #[doc = "Bit 14 - Timeout signal in SMBus mode"]
    #[inline(always)]
    pub fn smbto(&self) -> SmbtoR {
        SmbtoR::new(((self.bits >> 14) & 1) != 0)
    }
    #[doc = "Bit 15 - SMBus Alert status"]
    #[inline(always)]
    pub fn smbalt(&self) -> SmbaltR {
        SmbaltR::new(((self.bits >> 15) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 8 - Bus error"]
    #[inline(always)]
    #[must_use]
    pub fn berr(&mut self) -> BerrW<Stat0Spec> {
        BerrW::new(self, 8)
    }
    #[doc = "Bit 9 - Arbitration Lost in master mode"]
    #[inline(always)]
    #[must_use]
    pub fn lostarb(&mut self) -> LostarbW<Stat0Spec> {
        LostarbW::new(self, 9)
    }
    #[doc = "Bit 10 - Acknowledge error"]
    #[inline(always)]
    #[must_use]
    pub fn aerr(&mut self) -> AerrW<Stat0Spec> {
        AerrW::new(self, 10)
    }
    #[doc = "Bit 11 - Over-run or under-run situation occurs in slave mode"]
    #[inline(always)]
    #[must_use]
    pub fn ouerr(&mut self) -> OuerrW<Stat0Spec> {
        OuerrW::new(self, 11)
    }
    #[doc = "Bit 12 - PEC error when receiving data"]
    #[inline(always)]
    #[must_use]
    pub fn pecerr(&mut self) -> PecerrW<Stat0Spec> {
        PecerrW::new(self, 12)
    }
    #[doc = "Bit 14 - Timeout signal in SMBus mode"]
    #[inline(always)]
    #[must_use]
    pub fn smbto(&mut self) -> SmbtoW<Stat0Spec> {
        SmbtoW::new(self, 14)
    }
    #[doc = "Bit 15 - SMBus Alert status"]
    #[inline(always)]
    #[must_use]
    pub fn smbalt(&mut self) -> SmbaltW<Stat0Spec> {
        SmbaltW::new(self, 15)
    }
}
#[doc = "Transfer status register 0\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`stat0::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`stat0::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct Stat0Spec;
impl crate::RegisterSpec for Stat0Spec {
    type Ux = u16;
}
#[doc = "`read()` method returns [`stat0::R`](R) reader structure"]
impl crate::Readable for Stat0Spec {}
#[doc = "`write(|w| ..)` method takes [`stat0::W`](W) writer structure"]
impl crate::Writable for Stat0Spec {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
}
#[doc = "`reset()` method sets STAT0 to value 0"]
impl crate::Resettable for Stat0Spec {
    const RESET_VALUE: u16 = 0;
}