1pub type R = crate::R<COMP1_CSRrs>;
3pub type W = crate::W<COMP1_CSRrs>;
5#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10pub enum EN {
11 Disabled = 0,
13 Enabled = 1,
15}
16impl From<EN> for bool {
17 #[inline(always)]
18 fn from(variant: EN) -> Self {
19 variant as u8 != 0
20 }
21}
22pub type EN_R = crate::BitReader<EN>;
24impl EN_R {
25 #[inline(always)]
27 pub const fn variant(&self) -> EN {
28 match self.bits {
29 false => EN::Disabled,
30 true => EN::Enabled,
31 }
32 }
33 #[inline(always)]
35 pub fn is_disabled(&self) -> bool {
36 *self == EN::Disabled
37 }
38 #[inline(always)]
40 pub fn is_enabled(&self) -> bool {
41 *self == EN::Enabled
42 }
43}
44pub type EN_W<'a, REG> = crate::BitWriter<'a, REG, EN>;
46impl<'a, REG> EN_W<'a, REG>
47where
48 REG: crate::Writable + crate::RegisterSpec,
49{
50 #[inline(always)]
52 pub fn disabled(self) -> &'a mut crate::W<REG> {
53 self.variant(EN::Disabled)
54 }
55 #[inline(always)]
57 pub fn enabled(self) -> &'a mut crate::W<REG> {
58 self.variant(EN::Enabled)
59 }
60}
61#[cfg_attr(feature = "defmt", derive(defmt::Format))]
65#[derive(Clone, Copy, Debug, PartialEq, Eq)]
66#[repr(u8)]
67pub enum PWRMODE {
68 HighSpeed = 0,
70 MediumSpeed = 1,
72 LowSpeed = 3,
74}
75impl From<PWRMODE> for u8 {
76 #[inline(always)]
77 fn from(variant: PWRMODE) -> Self {
78 variant as _
79 }
80}
81impl crate::FieldSpec for PWRMODE {
82 type Ux = u8;
83}
84impl crate::IsEnum for PWRMODE {}
85pub type PWRMODE_R = crate::FieldReader<PWRMODE>;
87impl PWRMODE_R {
88 #[inline(always)]
90 pub const fn variant(&self) -> Option<PWRMODE> {
91 match self.bits {
92 0 => Some(PWRMODE::HighSpeed),
93 1 => Some(PWRMODE::MediumSpeed),
94 3 => Some(PWRMODE::LowSpeed),
95 _ => None,
96 }
97 }
98 #[inline(always)]
100 pub fn is_high_speed(&self) -> bool {
101 *self == PWRMODE::HighSpeed
102 }
103 #[inline(always)]
105 pub fn is_medium_speed(&self) -> bool {
106 *self == PWRMODE::MediumSpeed
107 }
108 #[inline(always)]
110 pub fn is_low_speed(&self) -> bool {
111 *self == PWRMODE::LowSpeed
112 }
113}
114pub type PWRMODE_W<'a, REG> = crate::FieldWriter<'a, REG, 2, PWRMODE>;
116impl<'a, REG> PWRMODE_W<'a, REG>
117where
118 REG: crate::Writable + crate::RegisterSpec,
119 REG::Ux: From<u8>,
120{
121 #[inline(always)]
123 pub fn high_speed(self) -> &'a mut crate::W<REG> {
124 self.variant(PWRMODE::HighSpeed)
125 }
126 #[inline(always)]
128 pub fn medium_speed(self) -> &'a mut crate::W<REG> {
129 self.variant(PWRMODE::MediumSpeed)
130 }
131 #[inline(always)]
133 pub fn low_speed(self) -> &'a mut crate::W<REG> {
134 self.variant(PWRMODE::LowSpeed)
135 }
136}
137#[cfg_attr(feature = "defmt", derive(defmt::Format))]
141#[derive(Clone, Copy, Debug, PartialEq, Eq)]
142#[repr(u8)]
143pub enum INMSEL {
144 OneQuarterVref = 0,
146 OneHalfVref = 1,
148 ThreeQuarterVref = 2,
150 Vref = 3,
152 DacCh1 = 4,
154 DacCh2 = 5,
156 Gpiox = 6,
158}
159impl From<INMSEL> for u8 {
160 #[inline(always)]
161 fn from(variant: INMSEL) -> Self {
162 variant as _
163 }
164}
165impl crate::FieldSpec for INMSEL {
166 type Ux = u8;
167}
168impl crate::IsEnum for INMSEL {}
169pub type INMSEL_R = crate::FieldReader<INMSEL>;
171impl INMSEL_R {
172 #[inline(always)]
174 pub const fn variant(&self) -> Option<INMSEL> {
175 match self.bits {
176 0 => Some(INMSEL::OneQuarterVref),
177 1 => Some(INMSEL::OneHalfVref),
178 2 => Some(INMSEL::ThreeQuarterVref),
179 3 => Some(INMSEL::Vref),
180 4 => Some(INMSEL::DacCh1),
181 5 => Some(INMSEL::DacCh2),
182 6 => Some(INMSEL::Gpiox),
183 _ => None,
184 }
185 }
186 #[inline(always)]
188 pub fn is_one_quarter_vref(&self) -> bool {
189 *self == INMSEL::OneQuarterVref
190 }
191 #[inline(always)]
193 pub fn is_one_half_vref(&self) -> bool {
194 *self == INMSEL::OneHalfVref
195 }
196 #[inline(always)]
198 pub fn is_three_quarter_vref(&self) -> bool {
199 *self == INMSEL::ThreeQuarterVref
200 }
201 #[inline(always)]
203 pub fn is_vref(&self) -> bool {
204 *self == INMSEL::Vref
205 }
206 #[inline(always)]
208 pub fn is_dac_ch1(&self) -> bool {
209 *self == INMSEL::DacCh1
210 }
211 #[inline(always)]
213 pub fn is_dac_ch2(&self) -> bool {
214 *self == INMSEL::DacCh2
215 }
216 #[inline(always)]
218 pub fn is_gpiox(&self) -> bool {
219 *self == INMSEL::Gpiox
220 }
221}
222pub type INMSEL_W<'a, REG> = crate::FieldWriter<'a, REG, 3, INMSEL>;
224impl<'a, REG> INMSEL_W<'a, REG>
225where
226 REG: crate::Writable + crate::RegisterSpec,
227 REG::Ux: From<u8>,
228{
229 #[inline(always)]
231 pub fn one_quarter_vref(self) -> &'a mut crate::W<REG> {
232 self.variant(INMSEL::OneQuarterVref)
233 }
234 #[inline(always)]
236 pub fn one_half_vref(self) -> &'a mut crate::W<REG> {
237 self.variant(INMSEL::OneHalfVref)
238 }
239 #[inline(always)]
241 pub fn three_quarter_vref(self) -> &'a mut crate::W<REG> {
242 self.variant(INMSEL::ThreeQuarterVref)
243 }
244 #[inline(always)]
246 pub fn vref(self) -> &'a mut crate::W<REG> {
247 self.variant(INMSEL::Vref)
248 }
249 #[inline(always)]
251 pub fn dac_ch1(self) -> &'a mut crate::W<REG> {
252 self.variant(INMSEL::DacCh1)
253 }
254 #[inline(always)]
256 pub fn dac_ch2(self) -> &'a mut crate::W<REG> {
257 self.variant(INMSEL::DacCh2)
258 }
259 #[inline(always)]
261 pub fn gpiox(self) -> &'a mut crate::W<REG> {
262 self.variant(INMSEL::Gpiox)
263 }
264}
265#[cfg_attr(feature = "defmt", derive(defmt::Format))]
269#[derive(Clone, Copy, Debug, PartialEq, Eq)]
270#[repr(u8)]
271pub enum INPSEL {
272 Pc5 = 0,
274 Pb2 = 1,
276 Pa3 = 2,
278}
279impl From<INPSEL> for u8 {
280 #[inline(always)]
281 fn from(variant: INPSEL) -> Self {
282 variant as _
283 }
284}
285impl crate::FieldSpec for INPSEL {
286 type Ux = u8;
287}
288impl crate::IsEnum for INPSEL {}
289pub type INPSEL_R = crate::FieldReader<INPSEL>;
291impl INPSEL_R {
292 #[inline(always)]
294 pub const fn variant(&self) -> Option<INPSEL> {
295 match self.bits {
296 0 => Some(INPSEL::Pc5),
297 1 => Some(INPSEL::Pb2),
298 2 => Some(INPSEL::Pa3),
299 _ => None,
300 }
301 }
302 #[inline(always)]
304 pub fn is_pc5(&self) -> bool {
305 *self == INPSEL::Pc5
306 }
307 #[inline(always)]
309 pub fn is_pb2(&self) -> bool {
310 *self == INPSEL::Pb2
311 }
312 #[inline(always)]
314 pub fn is_pa3(&self) -> bool {
315 *self == INPSEL::Pa3
316 }
317}
318pub type INPSEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2, INPSEL>;
320impl<'a, REG> INPSEL_W<'a, REG>
321where
322 REG: crate::Writable + crate::RegisterSpec,
323 REG::Ux: From<u8>,
324{
325 #[inline(always)]
327 pub fn pc5(self) -> &'a mut crate::W<REG> {
328 self.variant(INPSEL::Pc5)
329 }
330 #[inline(always)]
332 pub fn pb2(self) -> &'a mut crate::W<REG> {
333 self.variant(INPSEL::Pb2)
334 }
335 #[inline(always)]
337 pub fn pa3(self) -> &'a mut crate::W<REG> {
338 self.variant(INPSEL::Pa3)
339 }
340}
341#[cfg_attr(feature = "defmt", derive(defmt::Format))]
345#[derive(Clone, Copy, Debug, PartialEq, Eq)]
346pub enum POLARITY {
347 NotInverted = 0,
349 Inverted = 1,
351}
352impl From<POLARITY> for bool {
353 #[inline(always)]
354 fn from(variant: POLARITY) -> Self {
355 variant as u8 != 0
356 }
357}
358pub type POLARITY_R = crate::BitReader<POLARITY>;
360impl POLARITY_R {
361 #[inline(always)]
363 pub const fn variant(&self) -> POLARITY {
364 match self.bits {
365 false => POLARITY::NotInverted,
366 true => POLARITY::Inverted,
367 }
368 }
369 #[inline(always)]
371 pub fn is_not_inverted(&self) -> bool {
372 *self == POLARITY::NotInverted
373 }
374 #[inline(always)]
376 pub fn is_inverted(&self) -> bool {
377 *self == POLARITY::Inverted
378 }
379}
380pub type POLARITY_W<'a, REG> = crate::BitWriter<'a, REG, POLARITY>;
382impl<'a, REG> POLARITY_W<'a, REG>
383where
384 REG: crate::Writable + crate::RegisterSpec,
385{
386 #[inline(always)]
388 pub fn not_inverted(self) -> &'a mut crate::W<REG> {
389 self.variant(POLARITY::NotInverted)
390 }
391 #[inline(always)]
393 pub fn inverted(self) -> &'a mut crate::W<REG> {
394 self.variant(POLARITY::Inverted)
395 }
396}
397#[cfg_attr(feature = "defmt", derive(defmt::Format))]
401#[derive(Clone, Copy, Debug, PartialEq, Eq)]
402#[repr(u8)]
403pub enum HYST {
404 NoHysteresis = 0,
406 LowHysteresis = 1,
408 MediumHysteresis = 2,
410 HighHysteresis = 3,
412}
413impl From<HYST> for u8 {
414 #[inline(always)]
415 fn from(variant: HYST) -> Self {
416 variant as _
417 }
418}
419impl crate::FieldSpec for HYST {
420 type Ux = u8;
421}
422impl crate::IsEnum for HYST {}
423pub type HYST_R = crate::FieldReader<HYST>;
425impl HYST_R {
426 #[inline(always)]
428 pub const fn variant(&self) -> HYST {
429 match self.bits {
430 0 => HYST::NoHysteresis,
431 1 => HYST::LowHysteresis,
432 2 => HYST::MediumHysteresis,
433 3 => HYST::HighHysteresis,
434 _ => unreachable!(),
435 }
436 }
437 #[inline(always)]
439 pub fn is_no_hysteresis(&self) -> bool {
440 *self == HYST::NoHysteresis
441 }
442 #[inline(always)]
444 pub fn is_low_hysteresis(&self) -> bool {
445 *self == HYST::LowHysteresis
446 }
447 #[inline(always)]
449 pub fn is_medium_hysteresis(&self) -> bool {
450 *self == HYST::MediumHysteresis
451 }
452 #[inline(always)]
454 pub fn is_high_hysteresis(&self) -> bool {
455 *self == HYST::HighHysteresis
456 }
457}
458pub type HYST_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HYST, crate::Safe>;
460impl<'a, REG> HYST_W<'a, REG>
461where
462 REG: crate::Writable + crate::RegisterSpec,
463 REG::Ux: From<u8>,
464{
465 #[inline(always)]
467 pub fn no_hysteresis(self) -> &'a mut crate::W<REG> {
468 self.variant(HYST::NoHysteresis)
469 }
470 #[inline(always)]
472 pub fn low_hysteresis(self) -> &'a mut crate::W<REG> {
473 self.variant(HYST::LowHysteresis)
474 }
475 #[inline(always)]
477 pub fn medium_hysteresis(self) -> &'a mut crate::W<REG> {
478 self.variant(HYST::MediumHysteresis)
479 }
480 #[inline(always)]
482 pub fn high_hysteresis(self) -> &'a mut crate::W<REG> {
483 self.variant(HYST::HighHysteresis)
484 }
485}
486#[cfg_attr(feature = "defmt", derive(defmt::Format))]
490#[derive(Clone, Copy, Debug, PartialEq, Eq)]
491#[repr(u8)]
492pub enum BLANKING {
493 NoBlanking = 0,
495 Tim1oc5 = 4,
497}
498impl From<BLANKING> for u8 {
499 #[inline(always)]
500 fn from(variant: BLANKING) -> Self {
501 variant as _
502 }
503}
504impl crate::FieldSpec for BLANKING {
505 type Ux = u8;
506}
507impl crate::IsEnum for BLANKING {}
508pub type BLANKING_R = crate::FieldReader<BLANKING>;
510impl BLANKING_R {
511 #[inline(always)]
513 pub const fn variant(&self) -> Option<BLANKING> {
514 match self.bits {
515 0 => Some(BLANKING::NoBlanking),
516 4 => Some(BLANKING::Tim1oc5),
517 _ => None,
518 }
519 }
520 #[inline(always)]
522 pub fn is_no_blanking(&self) -> bool {
523 *self == BLANKING::NoBlanking
524 }
525 #[inline(always)]
527 pub fn is_tim1oc5(&self) -> bool {
528 *self == BLANKING::Tim1oc5
529 }
530}
531pub type BLANKING_W<'a, REG> = crate::FieldWriter<'a, REG, 3, BLANKING>;
533impl<'a, REG> BLANKING_W<'a, REG>
534where
535 REG: crate::Writable + crate::RegisterSpec,
536 REG::Ux: From<u8>,
537{
538 #[inline(always)]
540 pub fn no_blanking(self) -> &'a mut crate::W<REG> {
541 self.variant(BLANKING::NoBlanking)
542 }
543 #[inline(always)]
545 pub fn tim1oc5(self) -> &'a mut crate::W<REG> {
546 self.variant(BLANKING::Tim1oc5)
547 }
548}
549#[cfg_attr(feature = "defmt", derive(defmt::Format))]
553#[derive(Clone, Copy, Debug, PartialEq, Eq)]
554pub enum BRGEN {
555 Disabled = 0,
557 Enabled = 1,
559}
560impl From<BRGEN> for bool {
561 #[inline(always)]
562 fn from(variant: BRGEN) -> Self {
563 variant as u8 != 0
564 }
565}
566pub type BRGEN_R = crate::BitReader<BRGEN>;
568impl BRGEN_R {
569 #[inline(always)]
571 pub const fn variant(&self) -> BRGEN {
572 match self.bits {
573 false => BRGEN::Disabled,
574 true => BRGEN::Enabled,
575 }
576 }
577 #[inline(always)]
579 pub fn is_disabled(&self) -> bool {
580 *self == BRGEN::Disabled
581 }
582 #[inline(always)]
584 pub fn is_enabled(&self) -> bool {
585 *self == BRGEN::Enabled
586 }
587}
588pub type BRGEN_W<'a, REG> = crate::BitWriter<'a, REG, BRGEN>;
590impl<'a, REG> BRGEN_W<'a, REG>
591where
592 REG: crate::Writable + crate::RegisterSpec,
593{
594 #[inline(always)]
596 pub fn disabled(self) -> &'a mut crate::W<REG> {
597 self.variant(BRGEN::Disabled)
598 }
599 #[inline(always)]
601 pub fn enabled(self) -> &'a mut crate::W<REG> {
602 self.variant(BRGEN::Enabled)
603 }
604}
605#[cfg_attr(feature = "defmt", derive(defmt::Format))]
609#[derive(Clone, Copy, Debug, PartialEq, Eq)]
610pub enum SCALEN {
611 Disabled = 0,
613 Enabled = 1,
615}
616impl From<SCALEN> for bool {
617 #[inline(always)]
618 fn from(variant: SCALEN) -> Self {
619 variant as u8 != 0
620 }
621}
622pub type SCALEN_R = crate::BitReader<SCALEN>;
624impl SCALEN_R {
625 #[inline(always)]
627 pub const fn variant(&self) -> SCALEN {
628 match self.bits {
629 false => SCALEN::Disabled,
630 true => SCALEN::Enabled,
631 }
632 }
633 #[inline(always)]
635 pub fn is_disabled(&self) -> bool {
636 *self == SCALEN::Disabled
637 }
638 #[inline(always)]
640 pub fn is_enabled(&self) -> bool {
641 *self == SCALEN::Enabled
642 }
643}
644pub type SCALEN_W<'a, REG> = crate::BitWriter<'a, REG, SCALEN>;
646impl<'a, REG> SCALEN_W<'a, REG>
647where
648 REG: crate::Writable + crate::RegisterSpec,
649{
650 #[inline(always)]
652 pub fn disabled(self) -> &'a mut crate::W<REG> {
653 self.variant(SCALEN::Disabled)
654 }
655 #[inline(always)]
657 pub fn enabled(self) -> &'a mut crate::W<REG> {
658 self.variant(SCALEN::Enabled)
659 }
660}
661#[cfg_attr(feature = "defmt", derive(defmt::Format))]
665#[derive(Clone, Copy, Debug, PartialEq, Eq)]
666#[repr(u8)]
667pub enum INMESEL {
668 Pc4 = 0,
670 Pa0 = 1,
672 Pa4 = 2,
674 Pa5 = 3,
676}
677impl From<INMESEL> for u8 {
678 #[inline(always)]
679 fn from(variant: INMESEL) -> Self {
680 variant as _
681 }
682}
683impl crate::FieldSpec for INMESEL {
684 type Ux = u8;
685}
686impl crate::IsEnum for INMESEL {}
687pub type INMESEL_R = crate::FieldReader<INMESEL>;
689impl INMESEL_R {
690 #[inline(always)]
692 pub const fn variant(&self) -> INMESEL {
693 match self.bits {
694 0 => INMESEL::Pc4,
695 1 => INMESEL::Pa0,
696 2 => INMESEL::Pa4,
697 3 => INMESEL::Pa5,
698 _ => unreachable!(),
699 }
700 }
701 #[inline(always)]
703 pub fn is_pc4(&self) -> bool {
704 *self == INMESEL::Pc4
705 }
706 #[inline(always)]
708 pub fn is_pa0(&self) -> bool {
709 *self == INMESEL::Pa0
710 }
711 #[inline(always)]
713 pub fn is_pa4(&self) -> bool {
714 *self == INMESEL::Pa4
715 }
716 #[inline(always)]
718 pub fn is_pa5(&self) -> bool {
719 *self == INMESEL::Pa5
720 }
721}
722pub type INMESEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2, INMESEL, crate::Safe>;
724impl<'a, REG> INMESEL_W<'a, REG>
725where
726 REG: crate::Writable + crate::RegisterSpec,
727 REG::Ux: From<u8>,
728{
729 #[inline(always)]
731 pub fn pc4(self) -> &'a mut crate::W<REG> {
732 self.variant(INMESEL::Pc4)
733 }
734 #[inline(always)]
736 pub fn pa0(self) -> &'a mut crate::W<REG> {
737 self.variant(INMESEL::Pa0)
738 }
739 #[inline(always)]
741 pub fn pa4(self) -> &'a mut crate::W<REG> {
742 self.variant(INMESEL::Pa4)
743 }
744 #[inline(always)]
746 pub fn pa5(self) -> &'a mut crate::W<REG> {
747 self.variant(INMESEL::Pa5)
748 }
749}
750#[cfg_attr(feature = "defmt", derive(defmt::Format))]
754#[derive(Clone, Copy, Debug, PartialEq, Eq)]
755pub enum VALUE {
756 Low = 0,
758 High = 1,
760}
761impl From<VALUE> for bool {
762 #[inline(always)]
763 fn from(variant: VALUE) -> Self {
764 variant as u8 != 0
765 }
766}
767pub type VALUE_R = crate::BitReader<VALUE>;
769impl VALUE_R {
770 #[inline(always)]
772 pub const fn variant(&self) -> VALUE {
773 match self.bits {
774 false => VALUE::Low,
775 true => VALUE::High,
776 }
777 }
778 #[inline(always)]
780 pub fn is_low(&self) -> bool {
781 *self == VALUE::Low
782 }
783 #[inline(always)]
785 pub fn is_high(&self) -> bool {
786 *self == VALUE::High
787 }
788}
789pub type LOCK_W<'a, REG> = crate::BitWriter<'a, REG>;
791impl R {
792 #[inline(always)]
794 pub fn en(&self) -> EN_R {
795 EN_R::new((self.bits & 1) != 0)
796 }
797 #[inline(always)]
799 pub fn pwrmode(&self) -> PWRMODE_R {
800 PWRMODE_R::new(((self.bits >> 2) & 3) as u8)
801 }
802 #[inline(always)]
804 pub fn inmsel(&self) -> INMSEL_R {
805 INMSEL_R::new(((self.bits >> 4) & 7) as u8)
806 }
807 #[inline(always)]
809 pub fn inpsel(&self) -> INPSEL_R {
810 INPSEL_R::new(((self.bits >> 7) & 3) as u8)
811 }
812 #[inline(always)]
814 pub fn polarity(&self) -> POLARITY_R {
815 POLARITY_R::new(((self.bits >> 15) & 1) != 0)
816 }
817 #[inline(always)]
819 pub fn hyst(&self) -> HYST_R {
820 HYST_R::new(((self.bits >> 16) & 3) as u8)
821 }
822 #[inline(always)]
824 pub fn blanking(&self) -> BLANKING_R {
825 BLANKING_R::new(((self.bits >> 18) & 7) as u8)
826 }
827 #[inline(always)]
829 pub fn brgen(&self) -> BRGEN_R {
830 BRGEN_R::new(((self.bits >> 22) & 1) != 0)
831 }
832 #[inline(always)]
834 pub fn scalen(&self) -> SCALEN_R {
835 SCALEN_R::new(((self.bits >> 23) & 1) != 0)
836 }
837 #[inline(always)]
839 pub fn inmesel(&self) -> INMESEL_R {
840 INMESEL_R::new(((self.bits >> 25) & 3) as u8)
841 }
842 #[inline(always)]
844 pub fn value(&self) -> VALUE_R {
845 VALUE_R::new(((self.bits >> 30) & 1) != 0)
846 }
847}
848impl core::fmt::Debug for R {
849 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
850 f.debug_struct("COMP1_CSR")
851 .field("en", &self.en())
852 .field("pwrmode", &self.pwrmode())
853 .field("inmsel", &self.inmsel())
854 .field("inpsel", &self.inpsel())
855 .field("polarity", &self.polarity())
856 .field("hyst", &self.hyst())
857 .field("blanking", &self.blanking())
858 .field("brgen", &self.brgen())
859 .field("scalen", &self.scalen())
860 .field("inmesel", &self.inmesel())
861 .field("value", &self.value())
862 .finish()
863 }
864}
865impl W {
866 #[inline(always)]
868 pub fn en(&mut self) -> EN_W<COMP1_CSRrs> {
869 EN_W::new(self, 0)
870 }
871 #[inline(always)]
873 pub fn pwrmode(&mut self) -> PWRMODE_W<COMP1_CSRrs> {
874 PWRMODE_W::new(self, 2)
875 }
876 #[inline(always)]
878 pub fn inmsel(&mut self) -> INMSEL_W<COMP1_CSRrs> {
879 INMSEL_W::new(self, 4)
880 }
881 #[inline(always)]
883 pub fn inpsel(&mut self) -> INPSEL_W<COMP1_CSRrs> {
884 INPSEL_W::new(self, 7)
885 }
886 #[inline(always)]
888 pub fn polarity(&mut self) -> POLARITY_W<COMP1_CSRrs> {
889 POLARITY_W::new(self, 15)
890 }
891 #[inline(always)]
893 pub fn hyst(&mut self) -> HYST_W<COMP1_CSRrs> {
894 HYST_W::new(self, 16)
895 }
896 #[inline(always)]
898 pub fn blanking(&mut self) -> BLANKING_W<COMP1_CSRrs> {
899 BLANKING_W::new(self, 18)
900 }
901 #[inline(always)]
903 pub fn brgen(&mut self) -> BRGEN_W<COMP1_CSRrs> {
904 BRGEN_W::new(self, 22)
905 }
906 #[inline(always)]
908 pub fn scalen(&mut self) -> SCALEN_W<COMP1_CSRrs> {
909 SCALEN_W::new(self, 23)
910 }
911 #[inline(always)]
913 pub fn inmesel(&mut self) -> INMESEL_W<COMP1_CSRrs> {
914 INMESEL_W::new(self, 25)
915 }
916 #[inline(always)]
918 pub fn lock(&mut self) -> LOCK_W<COMP1_CSRrs> {
919 LOCK_W::new(self, 31)
920 }
921}
922pub struct COMP1_CSRrs;
928impl crate::RegisterSpec for COMP1_CSRrs {
929 type Ux = u32;
930}
931impl crate::Readable for COMP1_CSRrs {}
933impl crate::Writable for COMP1_CSRrs {
935 type Safety = crate::Unsafe;
936}
937impl crate::Resettable for COMP1_CSRrs {}