n32g4/n32g455/comp/
comp4_ctrl.rs1pub type R = crate::R<Comp4CtrlSpec>;
3pub type W = crate::W<Comp4CtrlSpec>;
5pub type EnR = crate::BitReader;
7pub type EnW<'a, REG> = crate::BitWriter<'a, REG>;
9pub type InmselR = crate::FieldReader;
11pub type InmselW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
13pub type InpselR = crate::FieldReader;
15pub type InpselW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
17pub type OutselR = crate::FieldReader;
19pub type OutselW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
21pub type PolR = crate::BitReader;
23pub type PolW<'a, REG> = crate::BitWriter<'a, REG>;
25pub type HystR = crate::FieldReader;
27pub type HystW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
29pub type BlkingR = crate::FieldReader;
31pub type BlkingW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
33pub type OutR = crate::BitReader;
35pub type InpdacR = crate::BitReader;
37pub type InpdacW<'a, REG> = crate::BitWriter<'a, REG>;
39impl R {
40 #[inline(always)]
42 pub fn en(&self) -> EnR {
43 EnR::new((self.bits & 1) != 0)
44 }
45 #[inline(always)]
47 pub fn inmsel(&self) -> InmselR {
48 InmselR::new(((self.bits >> 1) & 7) as u8)
49 }
50 #[inline(always)]
52 pub fn inpsel(&self) -> InpselR {
53 InpselR::new(((self.bits >> 4) & 7) as u8)
54 }
55 #[inline(always)]
57 pub fn outsel(&self) -> OutselR {
58 OutselR::new(((self.bits >> 7) & 0x0f) as u8)
59 }
60 #[inline(always)]
62 pub fn pol(&self) -> PolR {
63 PolR::new(((self.bits >> 11) & 1) != 0)
64 }
65 #[inline(always)]
67 pub fn hyst(&self) -> HystR {
68 HystR::new(((self.bits >> 12) & 3) as u8)
69 }
70 #[inline(always)]
72 pub fn blking(&self) -> BlkingR {
73 BlkingR::new(((self.bits >> 14) & 7) as u8)
74 }
75 #[inline(always)]
77 pub fn out(&self) -> OutR {
78 OutR::new(((self.bits >> 17) & 1) != 0)
79 }
80 #[inline(always)]
82 pub fn inpdac(&self) -> InpdacR {
83 InpdacR::new(((self.bits >> 18) & 1) != 0)
84 }
85}
86impl W {
87 #[inline(always)]
89 #[must_use]
90 pub fn en(&mut self) -> EnW<Comp4CtrlSpec> {
91 EnW::new(self, 0)
92 }
93 #[inline(always)]
95 #[must_use]
96 pub fn inmsel(&mut self) -> InmselW<Comp4CtrlSpec> {
97 InmselW::new(self, 1)
98 }
99 #[inline(always)]
101 #[must_use]
102 pub fn inpsel(&mut self) -> InpselW<Comp4CtrlSpec> {
103 InpselW::new(self, 4)
104 }
105 #[inline(always)]
107 #[must_use]
108 pub fn outsel(&mut self) -> OutselW<Comp4CtrlSpec> {
109 OutselW::new(self, 7)
110 }
111 #[inline(always)]
113 #[must_use]
114 pub fn pol(&mut self) -> PolW<Comp4CtrlSpec> {
115 PolW::new(self, 11)
116 }
117 #[inline(always)]
119 #[must_use]
120 pub fn hyst(&mut self) -> HystW<Comp4CtrlSpec> {
121 HystW::new(self, 12)
122 }
123 #[inline(always)]
125 #[must_use]
126 pub fn blking(&mut self) -> BlkingW<Comp4CtrlSpec> {
127 BlkingW::new(self, 14)
128 }
129 #[inline(always)]
131 #[must_use]
132 pub fn inpdac(&mut self) -> InpdacW<Comp4CtrlSpec> {
133 InpdacW::new(self, 18)
134 }
135}
136pub struct Comp4CtrlSpec;
140impl crate::RegisterSpec for Comp4CtrlSpec {
141 type Ux = u32;
142}
143impl crate::Readable for Comp4CtrlSpec {}
145impl crate::Writable for Comp4CtrlSpec {
147 type Safety = crate::Unsafe;
148 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
149 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
150}
151impl crate::Resettable for Comp4CtrlSpec {
153 const RESET_VALUE: u32 = 0;
154}