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
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
#[doc = "Register `micbias` reader"]
pub struct R(crate::R<MICBIAS_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<MICBIAS_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<MICBIAS_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<MICBIAS_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `micbias` writer"]
pub struct W(crate::W<MICBIAS_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<MICBIAS_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<MICBIAS_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<MICBIAS_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `mmic_bias_chopper_clk_sel` reader - MMIC BIAS Chopper Clock Select"]
pub type MMIC_BIAS_CHOPPER_CLK_SEL_R = crate::FieldReader<u8, MMIC_BIAS_CHOPPER_CLK_SEL_A>;
#[doc = "MMIC BIAS Chopper Clock Select\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum MMIC_BIAS_CHOPPER_CLK_SEL_A {
    #[doc = "0: 250 kHz"]
    _250KHZ = 0,
    #[doc = "1: 500 kHz"]
    _500KHZ = 1,
    #[doc = "2: 1 MHz"]
    _1MHZ = 2,
    #[doc = "3: 2 MHz"]
    _2MHZ = 3,
}
impl From<MMIC_BIAS_CHOPPER_CLK_SEL_A> for u8 {
    #[inline(always)]
    fn from(variant: MMIC_BIAS_CHOPPER_CLK_SEL_A) -> Self {
        variant as _
    }
}
impl MMIC_BIAS_CHOPPER_CLK_SEL_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> MMIC_BIAS_CHOPPER_CLK_SEL_A {
        match self.bits {
            0 => MMIC_BIAS_CHOPPER_CLK_SEL_A::_250KHZ,
            1 => MMIC_BIAS_CHOPPER_CLK_SEL_A::_500KHZ,
            2 => MMIC_BIAS_CHOPPER_CLK_SEL_A::_1MHZ,
            3 => MMIC_BIAS_CHOPPER_CLK_SEL_A::_2MHZ,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `_250KHZ`"]
    #[inline(always)]
    pub fn is_250khz(&self) -> bool {
        *self == MMIC_BIAS_CHOPPER_CLK_SEL_A::_250KHZ
    }
    #[doc = "Checks if the value of the field is `_500KHZ`"]
    #[inline(always)]
    pub fn is_500khz(&self) -> bool {
        *self == MMIC_BIAS_CHOPPER_CLK_SEL_A::_500KHZ
    }
    #[doc = "Checks if the value of the field is `_1MHZ`"]
    #[inline(always)]
    pub fn is_1mhz(&self) -> bool {
        *self == MMIC_BIAS_CHOPPER_CLK_SEL_A::_1MHZ
    }
    #[doc = "Checks if the value of the field is `_2MHZ`"]
    #[inline(always)]
    pub fn is_2mhz(&self) -> bool {
        *self == MMIC_BIAS_CHOPPER_CLK_SEL_A::_2MHZ
    }
}
#[doc = "Field `mmic_bias_chopper_clk_sel` writer - MMIC BIAS Chopper Clock Select"]
pub type MMIC_BIAS_CHOPPER_CLK_SEL_W<'a, const O: u8> =
    crate::FieldWriterSafe<'a, u32, MICBIAS_SPEC, u8, MMIC_BIAS_CHOPPER_CLK_SEL_A, 2, O>;
impl<'a, const O: u8> MMIC_BIAS_CHOPPER_CLK_SEL_W<'a, O> {
    #[doc = "250 kHz"]
    #[inline(always)]
    pub fn _250khz(self) -> &'a mut W {
        self.variant(MMIC_BIAS_CHOPPER_CLK_SEL_A::_250KHZ)
    }
    #[doc = "500 kHz"]
    #[inline(always)]
    pub fn _500khz(self) -> &'a mut W {
        self.variant(MMIC_BIAS_CHOPPER_CLK_SEL_A::_500KHZ)
    }
    #[doc = "1 MHz"]
    #[inline(always)]
    pub fn _1mhz(self) -> &'a mut W {
        self.variant(MMIC_BIAS_CHOPPER_CLK_SEL_A::_1MHZ)
    }
    #[doc = "2 MHz"]
    #[inline(always)]
    pub fn _2mhz(self) -> &'a mut W {
        self.variant(MMIC_BIAS_CHOPPER_CLK_SEL_A::_2MHZ)
    }
}
#[doc = "Field `mmic_bias_chopper_en` reader - MMIC BIAS Chopper Enable"]
pub type MMIC_BIAS_CHOPPER_EN_R = crate::BitReader<MMIC_BIAS_CHOPPER_EN_A>;
#[doc = "MMIC BIAS Chopper Enable\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum MMIC_BIAS_CHOPPER_EN_A {
    #[doc = "0: Disabled"]
    DISABLED = 0,
    #[doc = "1: Enabled"]
    ENABLED = 1,
}
impl From<MMIC_BIAS_CHOPPER_EN_A> for bool {
    #[inline(always)]
    fn from(variant: MMIC_BIAS_CHOPPER_EN_A) -> Self {
        variant as u8 != 0
    }
}
impl MMIC_BIAS_CHOPPER_EN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> MMIC_BIAS_CHOPPER_EN_A {
        match self.bits {
            false => MMIC_BIAS_CHOPPER_EN_A::DISABLED,
            true => MMIC_BIAS_CHOPPER_EN_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == MMIC_BIAS_CHOPPER_EN_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == MMIC_BIAS_CHOPPER_EN_A::ENABLED
    }
}
#[doc = "Field `mmic_bias_chopper_en` writer - MMIC BIAS Chopper Enable"]
pub type MMIC_BIAS_CHOPPER_EN_W<'a, const O: u8> =
    crate::BitWriter<'a, u32, MICBIAS_SPEC, MMIC_BIAS_CHOPPER_EN_A, O>;
impl<'a, const O: u8> MMIC_BIAS_CHOPPER_EN_W<'a, O> {
    #[doc = "Disabled"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(MMIC_BIAS_CHOPPER_EN_A::DISABLED)
    }
    #[doc = "Enabled"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(MMIC_BIAS_CHOPPER_EN_A::ENABLED)
    }
}
#[doc = "Field `mbiassel` reader - MMICBIAS Voltage Level Select"]
pub type MBIASSEL_R = crate::FieldReader<u8, MBIASSEL_A>;
#[doc = "MMICBIAS Voltage Level Select\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum MBIASSEL_A {
    #[doc = "0: 1.88 V"]
    _1_88_V = 0,
    #[doc = "1: 2.09 V"]
    _2_09_V = 1,
    #[doc = "2: 2.33 V"]
    _2_33_V = 2,
    #[doc = "3: 2.50 V"]
    _2_50_V = 3,
}
impl From<MBIASSEL_A> for u8 {
    #[inline(always)]
    fn from(variant: MBIASSEL_A) -> Self {
        variant as _
    }
}
impl MBIASSEL_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> MBIASSEL_A {
        match self.bits {
            0 => MBIASSEL_A::_1_88_V,
            1 => MBIASSEL_A::_2_09_V,
            2 => MBIASSEL_A::_2_33_V,
            3 => MBIASSEL_A::_2_50_V,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `_1_88_V`"]
    #[inline(always)]
    pub fn is_1_88_v(&self) -> bool {
        *self == MBIASSEL_A::_1_88_V
    }
    #[doc = "Checks if the value of the field is `_2_09_V`"]
    #[inline(always)]
    pub fn is_2_09_v(&self) -> bool {
        *self == MBIASSEL_A::_2_09_V
    }
    #[doc = "Checks if the value of the field is `_2_33_V`"]
    #[inline(always)]
    pub fn is_2_33_v(&self) -> bool {
        *self == MBIASSEL_A::_2_33_V
    }
    #[doc = "Checks if the value of the field is `_2_50_V`"]
    #[inline(always)]
    pub fn is_2_50_v(&self) -> bool {
        *self == MBIASSEL_A::_2_50_V
    }
}
#[doc = "Field `mbiassel` writer - MMICBIAS Voltage Level Select"]
pub type MBIASSEL_W<'a, const O: u8> =
    crate::FieldWriterSafe<'a, u32, MICBIAS_SPEC, u8, MBIASSEL_A, 2, O>;
impl<'a, const O: u8> MBIASSEL_W<'a, O> {
    #[doc = "1.88 V"]
    #[inline(always)]
    pub fn _1_88_v(self) -> &'a mut W {
        self.variant(MBIASSEL_A::_1_88_V)
    }
    #[doc = "2.09 V"]
    #[inline(always)]
    pub fn _2_09_v(self) -> &'a mut W {
        self.variant(MBIASSEL_A::_2_09_V)
    }
    #[doc = "2.33 V"]
    #[inline(always)]
    pub fn _2_33_v(self) -> &'a mut W {
        self.variant(MBIASSEL_A::_2_33_V)
    }
    #[doc = "2.50 V"]
    #[inline(always)]
    pub fn _2_50_v(self) -> &'a mut W {
        self.variant(MBIASSEL_A::_2_50_V)
    }
}
#[doc = "Field `mmicbiasen` reader - Master Microphone Bias Enable"]
pub type MMICBIASEN_R = crate::BitReader<MMICBIASEN_A>;
#[doc = "Master Microphone Bias Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum MMICBIASEN_A {
    #[doc = "0: Disabled"]
    DISABLED = 0,
    #[doc = "1: Enabled"]
    ENABLED = 1,
}
impl From<MMICBIASEN_A> for bool {
    #[inline(always)]
    fn from(variant: MMICBIASEN_A) -> Self {
        variant as u8 != 0
    }
}
impl MMICBIASEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> MMICBIASEN_A {
        match self.bits {
            false => MMICBIASEN_A::DISABLED,
            true => MMICBIASEN_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == MMICBIASEN_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == MMICBIASEN_A::ENABLED
    }
}
#[doc = "Field `mmicbiasen` writer - Master Microphone Bias Enable"]
pub type MMICBIASEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MICBIAS_SPEC, MMICBIASEN_A, O>;
impl<'a, const O: u8> MMICBIASEN_W<'a, O> {
    #[doc = "Disabled"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(MMICBIASEN_A::DISABLED)
    }
    #[doc = "Enabled"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(MMICBIASEN_A::ENABLED)
    }
}
#[doc = "Field `hmic_bias_chopper_clk_sel` reader - HMIC BIAS Chopper Clock Select"]
pub type HMIC_BIAS_CHOPPER_CLK_SEL_R = crate::FieldReader<u8, HMIC_BIAS_CHOPPER_CLK_SEL_A>;
#[doc = "HMIC BIAS Chopper Clock Select\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum HMIC_BIAS_CHOPPER_CLK_SEL_A {
    #[doc = "0: 250 kHz"]
    _250KHZ = 0,
    #[doc = "1: 500 kHz"]
    _500KHZ = 1,
    #[doc = "2: 1 MHz"]
    _1MHZ = 2,
    #[doc = "3: 2 MHz"]
    _2MHZ = 3,
}
impl From<HMIC_BIAS_CHOPPER_CLK_SEL_A> for u8 {
    #[inline(always)]
    fn from(variant: HMIC_BIAS_CHOPPER_CLK_SEL_A) -> Self {
        variant as _
    }
}
impl HMIC_BIAS_CHOPPER_CLK_SEL_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> HMIC_BIAS_CHOPPER_CLK_SEL_A {
        match self.bits {
            0 => HMIC_BIAS_CHOPPER_CLK_SEL_A::_250KHZ,
            1 => HMIC_BIAS_CHOPPER_CLK_SEL_A::_500KHZ,
            2 => HMIC_BIAS_CHOPPER_CLK_SEL_A::_1MHZ,
            3 => HMIC_BIAS_CHOPPER_CLK_SEL_A::_2MHZ,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `_250KHZ`"]
    #[inline(always)]
    pub fn is_250khz(&self) -> bool {
        *self == HMIC_BIAS_CHOPPER_CLK_SEL_A::_250KHZ
    }
    #[doc = "Checks if the value of the field is `_500KHZ`"]
    #[inline(always)]
    pub fn is_500khz(&self) -> bool {
        *self == HMIC_BIAS_CHOPPER_CLK_SEL_A::_500KHZ
    }
    #[doc = "Checks if the value of the field is `_1MHZ`"]
    #[inline(always)]
    pub fn is_1mhz(&self) -> bool {
        *self == HMIC_BIAS_CHOPPER_CLK_SEL_A::_1MHZ
    }
    #[doc = "Checks if the value of the field is `_2MHZ`"]
    #[inline(always)]
    pub fn is_2mhz(&self) -> bool {
        *self == HMIC_BIAS_CHOPPER_CLK_SEL_A::_2MHZ
    }
}
#[doc = "Field `hmic_bias_chopper_clk_sel` writer - HMIC BIAS Chopper Clock Select"]
pub type HMIC_BIAS_CHOPPER_CLK_SEL_W<'a, const O: u8> =
    crate::FieldWriterSafe<'a, u32, MICBIAS_SPEC, u8, HMIC_BIAS_CHOPPER_CLK_SEL_A, 2, O>;
impl<'a, const O: u8> HMIC_BIAS_CHOPPER_CLK_SEL_W<'a, O> {
    #[doc = "250 kHz"]
    #[inline(always)]
    pub fn _250khz(self) -> &'a mut W {
        self.variant(HMIC_BIAS_CHOPPER_CLK_SEL_A::_250KHZ)
    }
    #[doc = "500 kHz"]
    #[inline(always)]
    pub fn _500khz(self) -> &'a mut W {
        self.variant(HMIC_BIAS_CHOPPER_CLK_SEL_A::_500KHZ)
    }
    #[doc = "1 MHz"]
    #[inline(always)]
    pub fn _1mhz(self) -> &'a mut W {
        self.variant(HMIC_BIAS_CHOPPER_CLK_SEL_A::_1MHZ)
    }
    #[doc = "2 MHz"]
    #[inline(always)]
    pub fn _2mhz(self) -> &'a mut W {
        self.variant(HMIC_BIAS_CHOPPER_CLK_SEL_A::_2MHZ)
    }
}
#[doc = "Field `hmic_bias_chopper_en` reader - HMIC BIAS Chopper Enable"]
pub type HMIC_BIAS_CHOPPER_EN_R = crate::BitReader<HMIC_BIAS_CHOPPER_EN_A>;
#[doc = "HMIC BIAS Chopper Enable\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum HMIC_BIAS_CHOPPER_EN_A {
    #[doc = "0: Disabled"]
    DISABLED = 0,
    #[doc = "1: Enabled"]
    ENABLED = 1,
}
impl From<HMIC_BIAS_CHOPPER_EN_A> for bool {
    #[inline(always)]
    fn from(variant: HMIC_BIAS_CHOPPER_EN_A) -> Self {
        variant as u8 != 0
    }
}
impl HMIC_BIAS_CHOPPER_EN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> HMIC_BIAS_CHOPPER_EN_A {
        match self.bits {
            false => HMIC_BIAS_CHOPPER_EN_A::DISABLED,
            true => HMIC_BIAS_CHOPPER_EN_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == HMIC_BIAS_CHOPPER_EN_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == HMIC_BIAS_CHOPPER_EN_A::ENABLED
    }
}
#[doc = "Field `hmic_bias_chopper_en` writer - HMIC BIAS Chopper Enable"]
pub type HMIC_BIAS_CHOPPER_EN_W<'a, const O: u8> =
    crate::BitWriter<'a, u32, MICBIAS_SPEC, HMIC_BIAS_CHOPPER_EN_A, O>;
impl<'a, const O: u8> HMIC_BIAS_CHOPPER_EN_W<'a, O> {
    #[doc = "Disabled"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(HMIC_BIAS_CHOPPER_EN_A::DISABLED)
    }
    #[doc = "Enabled"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(HMIC_BIAS_CHOPPER_EN_A::ENABLED)
    }
}
#[doc = "Field `hbiassel` reader - HMICBIAS Voltage Level Select"]
pub type HBIASSEL_R = crate::FieldReader<u8, HBIASSEL_A>;
#[doc = "HMICBIAS Voltage Level Select\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum HBIASSEL_A {
    #[doc = "0: 1.88 V"]
    _1_88_V = 0,
    #[doc = "1: 2.09 V"]
    _2_09_V = 1,
    #[doc = "2: 2.33 V"]
    _2_33_V = 2,
    #[doc = "3: 2.55 V"]
    _2_55_V = 3,
}
impl From<HBIASSEL_A> for u8 {
    #[inline(always)]
    fn from(variant: HBIASSEL_A) -> Self {
        variant as _
    }
}
impl HBIASSEL_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> HBIASSEL_A {
        match self.bits {
            0 => HBIASSEL_A::_1_88_V,
            1 => HBIASSEL_A::_2_09_V,
            2 => HBIASSEL_A::_2_33_V,
            3 => HBIASSEL_A::_2_55_V,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `_1_88_V`"]
    #[inline(always)]
    pub fn is_1_88_v(&self) -> bool {
        *self == HBIASSEL_A::_1_88_V
    }
    #[doc = "Checks if the value of the field is `_2_09_V`"]
    #[inline(always)]
    pub fn is_2_09_v(&self) -> bool {
        *self == HBIASSEL_A::_2_09_V
    }
    #[doc = "Checks if the value of the field is `_2_33_V`"]
    #[inline(always)]
    pub fn is_2_33_v(&self) -> bool {
        *self == HBIASSEL_A::_2_33_V
    }
    #[doc = "Checks if the value of the field is `_2_55_V`"]
    #[inline(always)]
    pub fn is_2_55_v(&self) -> bool {
        *self == HBIASSEL_A::_2_55_V
    }
}
#[doc = "Field `hbiassel` writer - HMICBIAS Voltage Level Select"]
pub type HBIASSEL_W<'a, const O: u8> =
    crate::FieldWriterSafe<'a, u32, MICBIAS_SPEC, u8, HBIASSEL_A, 2, O>;
impl<'a, const O: u8> HBIASSEL_W<'a, O> {
    #[doc = "1.88 V"]
    #[inline(always)]
    pub fn _1_88_v(self) -> &'a mut W {
        self.variant(HBIASSEL_A::_1_88_V)
    }
    #[doc = "2.09 V"]
    #[inline(always)]
    pub fn _2_09_v(self) -> &'a mut W {
        self.variant(HBIASSEL_A::_2_09_V)
    }
    #[doc = "2.33 V"]
    #[inline(always)]
    pub fn _2_33_v(self) -> &'a mut W {
        self.variant(HBIASSEL_A::_2_33_V)
    }
    #[doc = "2.55 V"]
    #[inline(always)]
    pub fn _2_55_v(self) -> &'a mut W {
        self.variant(HBIASSEL_A::_2_55_V)
    }
}
#[doc = "Field `hmicbiasen` reader - Headphone Microphone Bias Enable"]
pub type HMICBIASEN_R = crate::BitReader<HMICBIASEN_A>;
#[doc = "Headphone Microphone Bias Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum HMICBIASEN_A {
    #[doc = "0: Disabled"]
    DISABLED = 0,
    #[doc = "1: Enabled"]
    ENABLED = 1,
}
impl From<HMICBIASEN_A> for bool {
    #[inline(always)]
    fn from(variant: HMICBIASEN_A) -> Self {
        variant as u8 != 0
    }
}
impl HMICBIASEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> HMICBIASEN_A {
        match self.bits {
            false => HMICBIASEN_A::DISABLED,
            true => HMICBIASEN_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == HMICBIASEN_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == HMICBIASEN_A::ENABLED
    }
}
#[doc = "Field `hmicbiasen` writer - Headphone Microphone Bias Enable"]
pub type HMICBIASEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MICBIAS_SPEC, HMICBIASEN_A, O>;
impl<'a, const O: u8> HMICBIASEN_W<'a, O> {
    #[doc = "Disabled"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(HMICBIASEN_A::DISABLED)
    }
    #[doc = "Enabled"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(HMICBIASEN_A::ENABLED)
    }
}
#[doc = "Field `micdetpl` reader - When this bit is 1and AUTOPLEN is 0, the MICDET is pulled down to GND."]
pub type MICDETPL_R = crate::BitReader<bool>;
#[doc = "Field `micdetpl` writer - When this bit is 1and AUTOPLEN is 0, the MICDET is pulled down to GND."]
pub type MICDETPL_W<'a, const O: u8> = crate::BitWriter<'a, u32, MICBIAS_SPEC, bool, O>;
#[doc = "Field `autoplen` reader - Enable the function to auto pull low MICDET when jack removal"]
pub type AUTOPLEN_R = crate::BitReader<AUTOPLEN_A>;
#[doc = "Enable the function to auto pull low MICDET when jack removal\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AUTOPLEN_A {
    #[doc = "0: Disabled"]
    DISABLED = 0,
    #[doc = "1: Enabled"]
    ENABLED = 1,
}
impl From<AUTOPLEN_A> for bool {
    #[inline(always)]
    fn from(variant: AUTOPLEN_A) -> Self {
        variant as u8 != 0
    }
}
impl AUTOPLEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> AUTOPLEN_A {
        match self.bits {
            false => AUTOPLEN_A::DISABLED,
            true => AUTOPLEN_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == AUTOPLEN_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == AUTOPLEN_A::ENABLED
    }
}
#[doc = "Field `autoplen` writer - Enable the function to auto pull low MICDET when jack removal"]
pub type AUTOPLEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MICBIAS_SPEC, AUTOPLEN_A, O>;
impl<'a, const O: u8> AUTOPLEN_W<'a, O> {
    #[doc = "Disabled"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(AUTOPLEN_A::DISABLED)
    }
    #[doc = "Enabled"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(AUTOPLEN_A::ENABLED)
    }
}
#[doc = "Field `det_mode` reader - MIC Detect Mode"]
pub type DET_MODE_R = crate::BitReader<DET_MODE_A>;
#[doc = "MIC Detect Mode\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DET_MODE_A {
    #[doc = "0: Jack in pull low"]
    LOW = 0,
    #[doc = "1: Jack in pull high"]
    HIGH = 1,
}
impl From<DET_MODE_A> for bool {
    #[inline(always)]
    fn from(variant: DET_MODE_A) -> Self {
        variant as u8 != 0
    }
}
impl DET_MODE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> DET_MODE_A {
        match self.bits {
            false => DET_MODE_A::LOW,
            true => DET_MODE_A::HIGH,
        }
    }
    #[doc = "Checks if the value of the field is `LOW`"]
    #[inline(always)]
    pub fn is_low(&self) -> bool {
        *self == DET_MODE_A::LOW
    }
    #[doc = "Checks if the value of the field is `HIGH`"]
    #[inline(always)]
    pub fn is_high(&self) -> bool {
        *self == DET_MODE_A::HIGH
    }
}
#[doc = "Field `det_mode` writer - MIC Detect Mode"]
pub type DET_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MICBIAS_SPEC, DET_MODE_A, O>;
impl<'a, const O: u8> DET_MODE_W<'a, O> {
    #[doc = "Jack in pull low"]
    #[inline(always)]
    pub fn low(self) -> &'a mut W {
        self.variant(DET_MODE_A::LOW)
    }
    #[doc = "Jack in pull high"]
    #[inline(always)]
    pub fn high(self) -> &'a mut W {
        self.variant(DET_MODE_A::HIGH)
    }
}
#[doc = "Field `popfree` reader - When this bit is 0, HBIAS MICADC is controlled by registor"]
pub type POPFREE_R = crate::BitReader<bool>;
#[doc = "Field `popfree` writer - When this bit is 0, HBIAS MICADC is controlled by registor"]
pub type POPFREE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MICBIAS_SPEC, bool, O>;
#[doc = "Field `micadcen` reader - Microphone detect ADC enable"]
pub type MICADCEN_R = crate::BitReader<MICADCEN_A>;
#[doc = "Microphone detect ADC enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum MICADCEN_A {
    #[doc = "0: Disabled"]
    DISABLED = 0,
    #[doc = "1: Enabled"]
    ENABLED = 1,
}
impl From<MICADCEN_A> for bool {
    #[inline(always)]
    fn from(variant: MICADCEN_A) -> Self {
        variant as u8 != 0
    }
}
impl MICADCEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> MICADCEN_A {
        match self.bits {
            false => MICADCEN_A::DISABLED,
            true => MICADCEN_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == MICADCEN_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == MICADCEN_A::ENABLED
    }
}
#[doc = "Field `micadcen` writer - Microphone detect ADC enable"]
pub type MICADCEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MICBIAS_SPEC, MICADCEN_A, O>;
impl<'a, const O: u8> MICADCEN_W<'a, O> {
    #[doc = "Disabled"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(MICADCEN_A::DISABLED)
    }
    #[doc = "Enabled"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(MICADCEN_A::ENABLED)
    }
}
#[doc = "Field `seldetadcdy` reader - Select the delay time to pull low the micdet when jack removal"]
pub type SELDETADCDY_R = crate::FieldReader<u8, SELDETADCDY_A>;
#[doc = "Select the delay time to pull low the micdet when jack removal\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum SELDETADCDY_A {
    #[doc = "0: 0.5 ms"]
    _0_5_MS = 0,
    #[doc = "1: 1 ms"]
    _1_MS = 1,
    #[doc = "2: 1.5 ms"]
    _1_5_MS = 2,
    #[doc = "3: 2 ms"]
    _2_MS = 3,
}
impl From<SELDETADCDY_A> for u8 {
    #[inline(always)]
    fn from(variant: SELDETADCDY_A) -> Self {
        variant as _
    }
}
impl SELDETADCDY_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> SELDETADCDY_A {
        match self.bits {
            0 => SELDETADCDY_A::_0_5_MS,
            1 => SELDETADCDY_A::_1_MS,
            2 => SELDETADCDY_A::_1_5_MS,
            3 => SELDETADCDY_A::_2_MS,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `_0_5_MS`"]
    #[inline(always)]
    pub fn is_0_5_ms(&self) -> bool {
        *self == SELDETADCDY_A::_0_5_MS
    }
    #[doc = "Checks if the value of the field is `_1_MS`"]
    #[inline(always)]
    pub fn is_1_ms(&self) -> bool {
        *self == SELDETADCDY_A::_1_MS
    }
    #[doc = "Checks if the value of the field is `_1_5_MS`"]
    #[inline(always)]
    pub fn is_1_5_ms(&self) -> bool {
        *self == SELDETADCDY_A::_1_5_MS
    }
    #[doc = "Checks if the value of the field is `_2_MS`"]
    #[inline(always)]
    pub fn is_2_ms(&self) -> bool {
        *self == SELDETADCDY_A::_2_MS
    }
}
#[doc = "Field `seldetadcdy` writer - Select the delay time to pull low the micdet when jack removal"]
pub type SELDETADCDY_W<'a, const O: u8> =
    crate::FieldWriterSafe<'a, u32, MICBIAS_SPEC, u8, SELDETADCDY_A, 2, O>;
impl<'a, const O: u8> SELDETADCDY_W<'a, O> {
    #[doc = "0.5 ms"]
    #[inline(always)]
    pub fn _0_5_ms(self) -> &'a mut W {
        self.variant(SELDETADCDY_A::_0_5_MS)
    }
    #[doc = "1 ms"]
    #[inline(always)]
    pub fn _1_ms(self) -> &'a mut W {
        self.variant(SELDETADCDY_A::_1_MS)
    }
    #[doc = "1.5 ms"]
    #[inline(always)]
    pub fn _1_5_ms(self) -> &'a mut W {
        self.variant(SELDETADCDY_A::_1_5_MS)
    }
    #[doc = "2 ms"]
    #[inline(always)]
    pub fn _2_ms(self) -> &'a mut W {
        self.variant(SELDETADCDY_A::_2_MS)
    }
}
#[doc = "Field `jackdeten` reader - Jack detect enable"]
pub type JACKDETEN_R = crate::BitReader<JACKDETEN_A>;
#[doc = "Jack detect enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum JACKDETEN_A {
    #[doc = "0: Disable"]
    DISABLE = 0,
    #[doc = "1: Enable"]
    ENABLE = 1,
}
impl From<JACKDETEN_A> for bool {
    #[inline(always)]
    fn from(variant: JACKDETEN_A) -> Self {
        variant as u8 != 0
    }
}
impl JACKDETEN_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> JACKDETEN_A {
        match self.bits {
            false => JACKDETEN_A::DISABLE,
            true => JACKDETEN_A::ENABLE,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLE`"]
    #[inline(always)]
    pub fn is_disable(&self) -> bool {
        *self == JACKDETEN_A::DISABLE
    }
    #[doc = "Checks if the value of the field is `ENABLE`"]
    #[inline(always)]
    pub fn is_enable(&self) -> bool {
        *self == JACKDETEN_A::ENABLE
    }
}
#[doc = "Field `jackdeten` writer - Jack detect enable"]
pub type JACKDETEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MICBIAS_SPEC, JACKDETEN_A, O>;
impl<'a, const O: u8> JACKDETEN_W<'a, O> {
    #[doc = "Disable"]
    #[inline(always)]
    pub fn disable(self) -> &'a mut W {
        self.variant(JACKDETEN_A::DISABLE)
    }
    #[doc = "Enable"]
    #[inline(always)]
    pub fn enable(self) -> &'a mut W {
        self.variant(JACKDETEN_A::ENABLE)
    }
}
#[doc = "Field `seldetadcbf` reader - Select the time to enable HBIAS before MICADC work"]
pub type SELDETADCBF_R = crate::FieldReader<u8, SELDETADCBF_A>;
#[doc = "Select the time to enable HBIAS before MICADC work\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum SELDETADCBF_A {
    #[doc = "0: 2 ms"]
    _2_MS = 0,
    #[doc = "1: 4 ms"]
    _4_MS = 1,
    #[doc = "2: 8 ms"]
    _8_MS = 2,
    #[doc = "3: 16 ms"]
    _16_MS = 3,
}
impl From<SELDETADCBF_A> for u8 {
    #[inline(always)]
    fn from(variant: SELDETADCBF_A) -> Self {
        variant as _
    }
}
impl SELDETADCBF_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> SELDETADCBF_A {
        match self.bits {
            0 => SELDETADCBF_A::_2_MS,
            1 => SELDETADCBF_A::_4_MS,
            2 => SELDETADCBF_A::_8_MS,
            3 => SELDETADCBF_A::_16_MS,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `_2_MS`"]
    #[inline(always)]
    pub fn is_2_ms(&self) -> bool {
        *self == SELDETADCBF_A::_2_MS
    }
    #[doc = "Checks if the value of the field is `_4_MS`"]
    #[inline(always)]
    pub fn is_4_ms(&self) -> bool {
        *self == SELDETADCBF_A::_4_MS
    }
    #[doc = "Checks if the value of the field is `_8_MS`"]
    #[inline(always)]
    pub fn is_8_ms(&self) -> bool {
        *self == SELDETADCBF_A::_8_MS
    }
    #[doc = "Checks if the value of the field is `_16_MS`"]
    #[inline(always)]
    pub fn is_16_ms(&self) -> bool {
        *self == SELDETADCBF_A::_16_MS
    }
}
#[doc = "Field `seldetadcbf` writer - Select the time to enable HBIAS before MICADC work"]
pub type SELDETADCBF_W<'a, const O: u8> =
    crate::FieldWriterSafe<'a, u32, MICBIAS_SPEC, u8, SELDETADCBF_A, 2, O>;
impl<'a, const O: u8> SELDETADCBF_W<'a, O> {
    #[doc = "2 ms"]
    #[inline(always)]
    pub fn _2_ms(self) -> &'a mut W {
        self.variant(SELDETADCBF_A::_2_MS)
    }
    #[doc = "4 ms"]
    #[inline(always)]
    pub fn _4_ms(self) -> &'a mut W {
        self.variant(SELDETADCBF_A::_4_MS)
    }
    #[doc = "8 ms"]
    #[inline(always)]
    pub fn _8_ms(self) -> &'a mut W {
        self.variant(SELDETADCBF_A::_8_MS)
    }
    #[doc = "16 ms"]
    #[inline(always)]
    pub fn _16_ms(self) -> &'a mut W {
        self.variant(SELDETADCBF_A::_16_MS)
    }
}
#[doc = "Field `seldetadcdb` reader - Select debounce time when jack removal"]
pub type SELDETADCDB_R = crate::FieldReader<u8, SELDETADCDB_A>;
#[doc = "Select debounce time when jack removal\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum SELDETADCDB_A {
    #[doc = "0: 128 ms"]
    _128_MS = 0,
    #[doc = "1: 256 ms"]
    _256_MS = 1,
    #[doc = "2: 512 ms"]
    _512_MS = 2,
    #[doc = "3: 1024 ms"]
    _1024_MS = 3,
}
impl From<SELDETADCDB_A> for u8 {
    #[inline(always)]
    fn from(variant: SELDETADCDB_A) -> Self {
        variant as _
    }
}
impl SELDETADCDB_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> SELDETADCDB_A {
        match self.bits {
            0 => SELDETADCDB_A::_128_MS,
            1 => SELDETADCDB_A::_256_MS,
            2 => SELDETADCDB_A::_512_MS,
            3 => SELDETADCDB_A::_1024_MS,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `_128_MS`"]
    #[inline(always)]
    pub fn is_128_ms(&self) -> bool {
        *self == SELDETADCDB_A::_128_MS
    }
    #[doc = "Checks if the value of the field is `_256_MS`"]
    #[inline(always)]
    pub fn is_256_ms(&self) -> bool {
        *self == SELDETADCDB_A::_256_MS
    }
    #[doc = "Checks if the value of the field is `_512_MS`"]
    #[inline(always)]
    pub fn is_512_ms(&self) -> bool {
        *self == SELDETADCDB_A::_512_MS
    }
    #[doc = "Checks if the value of the field is `_1024_MS`"]
    #[inline(always)]
    pub fn is_1024_ms(&self) -> bool {
        *self == SELDETADCDB_A::_1024_MS
    }
}
#[doc = "Field `seldetadcdb` writer - Select debounce time when jack removal"]
pub type SELDETADCDB_W<'a, const O: u8> =
    crate::FieldWriterSafe<'a, u32, MICBIAS_SPEC, u8, SELDETADCDB_A, 2, O>;
impl<'a, const O: u8> SELDETADCDB_W<'a, O> {
    #[doc = "128 ms"]
    #[inline(always)]
    pub fn _128_ms(self) -> &'a mut W {
        self.variant(SELDETADCDB_A::_128_MS)
    }
    #[doc = "256 ms"]
    #[inline(always)]
    pub fn _256_ms(self) -> &'a mut W {
        self.variant(SELDETADCDB_A::_256_MS)
    }
    #[doc = "512 ms"]
    #[inline(always)]
    pub fn _512_ms(self) -> &'a mut W {
        self.variant(SELDETADCDB_A::_512_MS)
    }
    #[doc = "1024 ms"]
    #[inline(always)]
    pub fn _1024_ms(self) -> &'a mut W {
        self.variant(SELDETADCDB_A::_1024_MS)
    }
}
#[doc = "Field `seldetadcfs` reader - Select sample interval of the ADC sample\\\\ 2 ^ (SELDETADCFS + 1) ms"]
pub type SELDETADCFS_R = crate::FieldReader<u8, u8>;
#[doc = "Field `seldetadcfs` writer - Select sample interval of the ADC sample\\\\ 2 ^ (SELDETADCFS + 1) ms"]
pub type SELDETADCFS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MICBIAS_SPEC, u8, u8, 3, O>;
impl R {
    #[doc = "Bits 2:3 - MMIC BIAS Chopper Clock Select"]
    #[inline(always)]
    pub fn mmic_bias_chopper_clk_sel(&self) -> MMIC_BIAS_CHOPPER_CLK_SEL_R {
        MMIC_BIAS_CHOPPER_CLK_SEL_R::new(((self.bits >> 2) & 3) as u8)
    }
    #[doc = "Bit 4 - MMIC BIAS Chopper Enable"]
    #[inline(always)]
    pub fn mmic_bias_chopper_en(&self) -> MMIC_BIAS_CHOPPER_EN_R {
        MMIC_BIAS_CHOPPER_EN_R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bits 5:6 - MMICBIAS Voltage Level Select"]
    #[inline(always)]
    pub fn mbiassel(&self) -> MBIASSEL_R {
        MBIASSEL_R::new(((self.bits >> 5) & 3) as u8)
    }
    #[doc = "Bit 7 - Master Microphone Bias Enable"]
    #[inline(always)]
    pub fn mmicbiasen(&self) -> MMICBIASEN_R {
        MMICBIASEN_R::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bits 10:11 - HMIC BIAS Chopper Clock Select"]
    #[inline(always)]
    pub fn hmic_bias_chopper_clk_sel(&self) -> HMIC_BIAS_CHOPPER_CLK_SEL_R {
        HMIC_BIAS_CHOPPER_CLK_SEL_R::new(((self.bits >> 10) & 3) as u8)
    }
    #[doc = "Bit 12 - HMIC BIAS Chopper Enable"]
    #[inline(always)]
    pub fn hmic_bias_chopper_en(&self) -> HMIC_BIAS_CHOPPER_EN_R {
        HMIC_BIAS_CHOPPER_EN_R::new(((self.bits >> 12) & 1) != 0)
    }
    #[doc = "Bits 13:14 - HMICBIAS Voltage Level Select"]
    #[inline(always)]
    pub fn hbiassel(&self) -> HBIASSEL_R {
        HBIASSEL_R::new(((self.bits >> 13) & 3) as u8)
    }
    #[doc = "Bit 15 - Headphone Microphone Bias Enable"]
    #[inline(always)]
    pub fn hmicbiasen(&self) -> HMICBIASEN_R {
        HMICBIASEN_R::new(((self.bits >> 15) & 1) != 0)
    }
    #[doc = "Bit 16 - When this bit is 1and AUTOPLEN is 0, the MICDET is pulled down to GND."]
    #[inline(always)]
    pub fn micdetpl(&self) -> MICDETPL_R {
        MICDETPL_R::new(((self.bits >> 16) & 1) != 0)
    }
    #[doc = "Bit 17 - Enable the function to auto pull low MICDET when jack removal"]
    #[inline(always)]
    pub fn autoplen(&self) -> AUTOPLEN_R {
        AUTOPLEN_R::new(((self.bits >> 17) & 1) != 0)
    }
    #[doc = "Bit 18 - MIC Detect Mode"]
    #[inline(always)]
    pub fn det_mode(&self) -> DET_MODE_R {
        DET_MODE_R::new(((self.bits >> 18) & 1) != 0)
    }
    #[doc = "Bit 19 - When this bit is 0, HBIAS MICADC is controlled by registor"]
    #[inline(always)]
    pub fn popfree(&self) -> POPFREE_R {
        POPFREE_R::new(((self.bits >> 19) & 1) != 0)
    }
    #[doc = "Bit 20 - Microphone detect ADC enable"]
    #[inline(always)]
    pub fn micadcen(&self) -> MICADCEN_R {
        MICADCEN_R::new(((self.bits >> 20) & 1) != 0)
    }
    #[doc = "Bits 21:22 - Select the delay time to pull low the micdet when jack removal"]
    #[inline(always)]
    pub fn seldetadcdy(&self) -> SELDETADCDY_R {
        SELDETADCDY_R::new(((self.bits >> 21) & 3) as u8)
    }
    #[doc = "Bit 23 - Jack detect enable"]
    #[inline(always)]
    pub fn jackdeten(&self) -> JACKDETEN_R {
        JACKDETEN_R::new(((self.bits >> 23) & 1) != 0)
    }
    #[doc = "Bits 24:25 - Select the time to enable HBIAS before MICADC work"]
    #[inline(always)]
    pub fn seldetadcbf(&self) -> SELDETADCBF_R {
        SELDETADCBF_R::new(((self.bits >> 24) & 3) as u8)
    }
    #[doc = "Bits 26:27 - Select debounce time when jack removal"]
    #[inline(always)]
    pub fn seldetadcdb(&self) -> SELDETADCDB_R {
        SELDETADCDB_R::new(((self.bits >> 26) & 3) as u8)
    }
    #[doc = "Bits 28:30 - Select sample interval of the ADC sample\\\\ 2 ^ (SELDETADCFS + 1) ms"]
    #[inline(always)]
    pub fn seldetadcfs(&self) -> SELDETADCFS_R {
        SELDETADCFS_R::new(((self.bits >> 28) & 7) as u8)
    }
}
impl W {
    #[doc = "Bits 2:3 - MMIC BIAS Chopper Clock Select"]
    #[inline(always)]
    #[must_use]
    pub fn mmic_bias_chopper_clk_sel(&mut self) -> MMIC_BIAS_CHOPPER_CLK_SEL_W<2> {
        MMIC_BIAS_CHOPPER_CLK_SEL_W::new(self)
    }
    #[doc = "Bit 4 - MMIC BIAS Chopper Enable"]
    #[inline(always)]
    #[must_use]
    pub fn mmic_bias_chopper_en(&mut self) -> MMIC_BIAS_CHOPPER_EN_W<4> {
        MMIC_BIAS_CHOPPER_EN_W::new(self)
    }
    #[doc = "Bits 5:6 - MMICBIAS Voltage Level Select"]
    #[inline(always)]
    #[must_use]
    pub fn mbiassel(&mut self) -> MBIASSEL_W<5> {
        MBIASSEL_W::new(self)
    }
    #[doc = "Bit 7 - Master Microphone Bias Enable"]
    #[inline(always)]
    #[must_use]
    pub fn mmicbiasen(&mut self) -> MMICBIASEN_W<7> {
        MMICBIASEN_W::new(self)
    }
    #[doc = "Bits 10:11 - HMIC BIAS Chopper Clock Select"]
    #[inline(always)]
    #[must_use]
    pub fn hmic_bias_chopper_clk_sel(&mut self) -> HMIC_BIAS_CHOPPER_CLK_SEL_W<10> {
        HMIC_BIAS_CHOPPER_CLK_SEL_W::new(self)
    }
    #[doc = "Bit 12 - HMIC BIAS Chopper Enable"]
    #[inline(always)]
    #[must_use]
    pub fn hmic_bias_chopper_en(&mut self) -> HMIC_BIAS_CHOPPER_EN_W<12> {
        HMIC_BIAS_CHOPPER_EN_W::new(self)
    }
    #[doc = "Bits 13:14 - HMICBIAS Voltage Level Select"]
    #[inline(always)]
    #[must_use]
    pub fn hbiassel(&mut self) -> HBIASSEL_W<13> {
        HBIASSEL_W::new(self)
    }
    #[doc = "Bit 15 - Headphone Microphone Bias Enable"]
    #[inline(always)]
    #[must_use]
    pub fn hmicbiasen(&mut self) -> HMICBIASEN_W<15> {
        HMICBIASEN_W::new(self)
    }
    #[doc = "Bit 16 - When this bit is 1and AUTOPLEN is 0, the MICDET is pulled down to GND."]
    #[inline(always)]
    #[must_use]
    pub fn micdetpl(&mut self) -> MICDETPL_W<16> {
        MICDETPL_W::new(self)
    }
    #[doc = "Bit 17 - Enable the function to auto pull low MICDET when jack removal"]
    #[inline(always)]
    #[must_use]
    pub fn autoplen(&mut self) -> AUTOPLEN_W<17> {
        AUTOPLEN_W::new(self)
    }
    #[doc = "Bit 18 - MIC Detect Mode"]
    #[inline(always)]
    #[must_use]
    pub fn det_mode(&mut self) -> DET_MODE_W<18> {
        DET_MODE_W::new(self)
    }
    #[doc = "Bit 19 - When this bit is 0, HBIAS MICADC is controlled by registor"]
    #[inline(always)]
    #[must_use]
    pub fn popfree(&mut self) -> POPFREE_W<19> {
        POPFREE_W::new(self)
    }
    #[doc = "Bit 20 - Microphone detect ADC enable"]
    #[inline(always)]
    #[must_use]
    pub fn micadcen(&mut self) -> MICADCEN_W<20> {
        MICADCEN_W::new(self)
    }
    #[doc = "Bits 21:22 - Select the delay time to pull low the micdet when jack removal"]
    #[inline(always)]
    #[must_use]
    pub fn seldetadcdy(&mut self) -> SELDETADCDY_W<21> {
        SELDETADCDY_W::new(self)
    }
    #[doc = "Bit 23 - Jack detect enable"]
    #[inline(always)]
    #[must_use]
    pub fn jackdeten(&mut self) -> JACKDETEN_W<23> {
        JACKDETEN_W::new(self)
    }
    #[doc = "Bits 24:25 - Select the time to enable HBIAS before MICADC work"]
    #[inline(always)]
    #[must_use]
    pub fn seldetadcbf(&mut self) -> SELDETADCBF_W<24> {
        SELDETADCBF_W::new(self)
    }
    #[doc = "Bits 26:27 - Select debounce time when jack removal"]
    #[inline(always)]
    #[must_use]
    pub fn seldetadcdb(&mut self) -> SELDETADCDB_W<26> {
        SELDETADCDB_W::new(self)
    }
    #[doc = "Bits 28:30 - Select sample interval of the ADC sample\\\\ 2 ^ (SELDETADCFS + 1) ms"]
    #[inline(always)]
    #[must_use]
    pub fn seldetadcfs(&mut self) -> SELDETADCFS_W<28> {
        SELDETADCFS_W::new(self)
    }
    #[doc = "Writes raw bits to the register."]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "MICBIAS Analog Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [micbias](index.html) module"]
pub struct MICBIAS_SPEC;
impl crate::RegisterSpec for MICBIAS_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [micbias::R](R) reader structure"]
impl crate::Readable for MICBIAS_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [micbias::W](W) writer structure"]
impl crate::Writable for MICBIAS_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 micbias to value 0x4000_3030"]
impl crate::Resettable for MICBIAS_SPEC {
    const RESET_VALUE: Self::Ux = 0x4000_3030;
}