1#[doc = "Register `ACMPCR` reader"]
2pub struct R(crate::R<ACMPCR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<ACMPCR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<ACMPCR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<ACMPCR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `ACMPCR` writer"]
17pub struct W(crate::W<ACMPCR_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<ACMPCR_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<ACMPCR_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<ACMPCR_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `CMP0ON` reader - CMP0ON field"]
38pub type CMP0ON_R = crate::BitReader<bool>;
39#[doc = "Field `CMP0ON` writer - CMP0ON field"]
40pub type CMP0ON_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACMPCR_SPEC, bool, O>;
41#[doc = "Field `CMP1ON` reader - CMP1ON field"]
42pub type CMP1ON_R = crate::BitReader<bool>;
43#[doc = "Field `CMP1ON` writer - CMP1ON field"]
44pub type CMP1ON_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACMPCR_SPEC, bool, O>;
45#[doc = "Field `CMP2ON` reader - CMP2ON field"]
46pub type CMP2ON_R = crate::BitReader<bool>;
47#[doc = "Field `CMP2ON` writer - CMP2ON field"]
48pub type CMP2ON_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACMPCR_SPEC, bool, O>;
49#[doc = "Field `CMP0HYS` reader - CMP0HYS field"]
50pub type CMP0HYS_R = crate::BitReader<bool>;
51#[doc = "Field `CMP0HYS` writer - CMP0HYS field"]
52pub type CMP0HYS_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACMPCR_SPEC, bool, O>;
53#[doc = "Field `CMP1HYS` reader - CMP1HYS field"]
54pub type CMP1HYS_R = crate::BitReader<bool>;
55#[doc = "Field `CMP1HYS` writer - CMP1HYS field"]
56pub type CMP1HYS_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACMPCR_SPEC, bool, O>;
57#[doc = "Field `CMP2HYS` reader - CMP2HYS field"]
58pub type CMP2HYS_R = crate::BitReader<bool>;
59#[doc = "Field `CMP2HYS` writer - CMP2HYS field"]
60pub type CMP2HYS_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACMPCR_SPEC, bool, O>;
61#[doc = "Field `_0NVREF` reader - _0NVREF field"]
62pub type _0NVREF_R = crate::BitReader<bool>;
63#[doc = "Field `_0NVREF` writer - _0NVREF field"]
64pub type _0NVREF_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACMPCR_SPEC, bool, O>;
65#[doc = "Field `_1NVREF` reader - _1NVREF field"]
66pub type _1NVREF_R = crate::BitReader<bool>;
67#[doc = "Field `_1NVREF` writer - _1NVREF field"]
68pub type _1NVREF_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACMPCR_SPEC, bool, O>;
69#[doc = "Field `_2NVREF` reader - _2NVREF field"]
70pub type _2NVREF_R = crate::BitReader<bool>;
71#[doc = "Field `_2NVREF` writer - _2NVREF field"]
72pub type _2NVREF_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACMPCR_SPEC, bool, O>;
73#[doc = "Field `CMP0IE` reader - CMP0IE field"]
74pub type CMP0IE_R = crate::BitReader<bool>;
75#[doc = "Field `CMP0IE` writer - CMP0IE field"]
76pub type CMP0IE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACMPCR_SPEC, bool, O>;
77#[doc = "Field `CMP1IE` reader - CMP1IE field"]
78pub type CMP1IE_R = crate::BitReader<bool>;
79#[doc = "Field `CMP1IE` writer - CMP1IE field"]
80pub type CMP1IE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACMPCR_SPEC, bool, O>;
81#[doc = "Field `CMP2IE` reader - CMP2IE field"]
82pub type CMP2IE_R = crate::BitReader<bool>;
83#[doc = "Field `CMP2IE` writer - CMP2IE field"]
84pub type CMP2IE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACMPCR_SPEC, bool, O>;
85impl R {
86 #[doc = "Bit 0 - CMP0ON field"]
87 #[inline(always)]
88 pub fn cmp0on(&self) -> CMP0ON_R {
89 CMP0ON_R::new((self.bits & 1) != 0)
90 }
91 #[doc = "Bit 1 - CMP1ON field"]
92 #[inline(always)]
93 pub fn cmp1on(&self) -> CMP1ON_R {
94 CMP1ON_R::new(((self.bits >> 1) & 1) != 0)
95 }
96 #[doc = "Bit 2 - CMP2ON field"]
97 #[inline(always)]
98 pub fn cmp2on(&self) -> CMP2ON_R {
99 CMP2ON_R::new(((self.bits >> 2) & 1) != 0)
100 }
101 #[doc = "Bit 8 - CMP0HYS field"]
102 #[inline(always)]
103 pub fn cmp0hys(&self) -> CMP0HYS_R {
104 CMP0HYS_R::new(((self.bits >> 8) & 1) != 0)
105 }
106 #[doc = "Bit 9 - CMP1HYS field"]
107 #[inline(always)]
108 pub fn cmp1hys(&self) -> CMP1HYS_R {
109 CMP1HYS_R::new(((self.bits >> 9) & 1) != 0)
110 }
111 #[doc = "Bit 10 - CMP2HYS field"]
112 #[inline(always)]
113 pub fn cmp2hys(&self) -> CMP2HYS_R {
114 CMP2HYS_R::new(((self.bits >> 10) & 1) != 0)
115 }
116 #[doc = "Bit 16 - _0NVREF field"]
117 #[inline(always)]
118 pub fn _0nvref(&self) -> _0NVREF_R {
119 _0NVREF_R::new(((self.bits >> 16) & 1) != 0)
120 }
121 #[doc = "Bit 17 - _1NVREF field"]
122 #[inline(always)]
123 pub fn _1nvref(&self) -> _1NVREF_R {
124 _1NVREF_R::new(((self.bits >> 17) & 1) != 0)
125 }
126 #[doc = "Bit 18 - _2NVREF field"]
127 #[inline(always)]
128 pub fn _2nvref(&self) -> _2NVREF_R {
129 _2NVREF_R::new(((self.bits >> 18) & 1) != 0)
130 }
131 #[doc = "Bit 24 - CMP0IE field"]
132 #[inline(always)]
133 pub fn cmp0ie(&self) -> CMP0IE_R {
134 CMP0IE_R::new(((self.bits >> 24) & 1) != 0)
135 }
136 #[doc = "Bit 25 - CMP1IE field"]
137 #[inline(always)]
138 pub fn cmp1ie(&self) -> CMP1IE_R {
139 CMP1IE_R::new(((self.bits >> 25) & 1) != 0)
140 }
141 #[doc = "Bit 26 - CMP2IE field"]
142 #[inline(always)]
143 pub fn cmp2ie(&self) -> CMP2IE_R {
144 CMP2IE_R::new(((self.bits >> 26) & 1) != 0)
145 }
146}
147impl W {
148 #[doc = "Bit 0 - CMP0ON field"]
149 #[inline(always)]
150 pub fn cmp0on(&mut self) -> CMP0ON_W<0> {
151 CMP0ON_W::new(self)
152 }
153 #[doc = "Bit 1 - CMP1ON field"]
154 #[inline(always)]
155 pub fn cmp1on(&mut self) -> CMP1ON_W<1> {
156 CMP1ON_W::new(self)
157 }
158 #[doc = "Bit 2 - CMP2ON field"]
159 #[inline(always)]
160 pub fn cmp2on(&mut self) -> CMP2ON_W<2> {
161 CMP2ON_W::new(self)
162 }
163 #[doc = "Bit 8 - CMP0HYS field"]
164 #[inline(always)]
165 pub fn cmp0hys(&mut self) -> CMP0HYS_W<8> {
166 CMP0HYS_W::new(self)
167 }
168 #[doc = "Bit 9 - CMP1HYS field"]
169 #[inline(always)]
170 pub fn cmp1hys(&mut self) -> CMP1HYS_W<9> {
171 CMP1HYS_W::new(self)
172 }
173 #[doc = "Bit 10 - CMP2HYS field"]
174 #[inline(always)]
175 pub fn cmp2hys(&mut self) -> CMP2HYS_W<10> {
176 CMP2HYS_W::new(self)
177 }
178 #[doc = "Bit 16 - _0NVREF field"]
179 #[inline(always)]
180 pub fn _0nvref(&mut self) -> _0NVREF_W<16> {
181 _0NVREF_W::new(self)
182 }
183 #[doc = "Bit 17 - _1NVREF field"]
184 #[inline(always)]
185 pub fn _1nvref(&mut self) -> _1NVREF_W<17> {
186 _1NVREF_W::new(self)
187 }
188 #[doc = "Bit 18 - _2NVREF field"]
189 #[inline(always)]
190 pub fn _2nvref(&mut self) -> _2NVREF_W<18> {
191 _2NVREF_W::new(self)
192 }
193 #[doc = "Bit 24 - CMP0IE field"]
194 #[inline(always)]
195 pub fn cmp0ie(&mut self) -> CMP0IE_W<24> {
196 CMP0IE_W::new(self)
197 }
198 #[doc = "Bit 25 - CMP1IE field"]
199 #[inline(always)]
200 pub fn cmp1ie(&mut self) -> CMP1IE_W<25> {
201 CMP1IE_W::new(self)
202 }
203 #[doc = "Bit 26 - CMP2IE field"]
204 #[inline(always)]
205 pub fn cmp2ie(&mut self) -> CMP2IE_W<26> {
206 CMP2IE_W::new(self)
207 }
208 #[doc = "Writes raw bits to the register."]
209 #[inline(always)]
210 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
211 self.0.bits(bits);
212 self
213 }
214}
215#[doc = "ACMPCR 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 [acmpcr](index.html) module"]
216pub struct ACMPCR_SPEC;
217impl crate::RegisterSpec for ACMPCR_SPEC {
218 type Ux = u32;
219}
220#[doc = "`read()` method returns [acmpcr::R](R) reader structure"]
221impl crate::Readable for ACMPCR_SPEC {
222 type Reader = R;
223}
224#[doc = "`write(|w| ..)` method takes [acmpcr::W](W) writer structure"]
225impl crate::Writable for ACMPCR_SPEC {
226 type Writer = W;
227}
228#[doc = "`reset()` method sets ACMPCR to value 0"]
229impl crate::Resettable for ACMPCR_SPEC {
230 #[inline(always)]
231 fn reset_value() -> Self::Ux {
232 0
233 }
234}