1#[doc = "Register `CFG` reader"]
2pub struct R(crate::R<CFG_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CFG_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CFG_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CFG_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `CFG` writer"]
17pub struct W(crate::W<CFG_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<CFG_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<CFG_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<CFG_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `SRCFMT` reader - SRCFMT field"]
38pub type SRCFMT_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `SRCFMT` writer - SRCFMT field"]
40pub type SRCFMT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CFG_SPEC, u8, u8, 2, O>;
41#[doc = "Field `SCANMOD` reader - SCANMOD field"]
42pub type SCANMOD_R = crate::BitReader<bool>;
43#[doc = "Field `SCANMOD` writer - SCANMOD field"]
44pub type SCANMOD_W<'a, const O: u8> = crate::BitWriter<'a, u32, CFG_SPEC, bool, O>;
45#[doc = "Field `NISCOMP` reader - NISCOMP field"]
46pub type NISCOMP_R = crate::FieldReader<u8, u8>;
47#[doc = "Field `NISCOMP` writer - NISCOMP field"]
48pub type NISCOMP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CFG_SPEC, u8, u8, 2, O>;
49#[doc = "Field `HT1COMP` reader - HT1COMP field"]
50pub type HT1COMP_R = crate::BitReader<bool>;
51#[doc = "Field `HT1COMP` writer - HT1COMP field"]
52pub type HT1COMP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CFG_SPEC, bool, O>;
53#[doc = "Field `HT2COMP` reader - HT2COMP field"]
54pub type HT2COMP_R = crate::BitReader<bool>;
55#[doc = "Field `HT2COMP` writer - HT2COMP field"]
56pub type HT2COMP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CFG_SPEC, bool, O>;
57#[doc = "Field `HT3COMP` reader - HT3COMP field"]
58pub type HT3COMP_R = crate::BitReader<bool>;
59#[doc = "Field `HT3COMP` writer - HT3COMP field"]
60pub type HT3COMP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CFG_SPEC, bool, O>;
61#[doc = "Field `QT1COMP` reader - QT1COMP field"]
62pub type QT1COMP_R = crate::FieldReader<u8, u8>;
63#[doc = "Field `QT1COMP` writer - QT1COMP field"]
64pub type QT1COMP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CFG_SPEC, u8, u8, 2, O>;
65#[doc = "Field `QT2COMP` reader - QT2COMP field"]
66pub type QT2COMP_R = crate::FieldReader<u8, u8>;
67#[doc = "Field `QT2COMP` writer - QT2COMP field"]
68pub type QT2COMP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CFG_SPEC, u8, u8, 2, O>;
69#[doc = "Field `QT3COMP` reader - QT3COMP field"]
70pub type QT3COMP_R = crate::FieldReader<u8, u8>;
71#[doc = "Field `QT3COMP` writer - QT3COMP field"]
72pub type QT3COMP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CFG_SPEC, u8, u8, 2, O>;
73#[doc = "Field `OUTFMT` reader - OUTFMT field"]
74pub type OUTFMT_R = crate::FieldReader<u8, u8>;
75#[doc = "Field `OUTFMT` writer - OUTFMT field"]
76pub type OUTFMT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CFG_SPEC, u8, u8, 3, O>;
77#[doc = "Field `YUV2RGB` reader - YUV2RGB field"]
78pub type YUV2RGB_R = crate::BitReader<bool>;
79#[doc = "Field `YUV2RGB` writer - YUV2RGB field"]
80pub type YUV2RGB_W<'a, const O: u8> = crate::BitWriter<'a, u32, CFG_SPEC, bool, O>;
81#[doc = "Field `UVSWAP` reader - UVSWAP field"]
82pub type UVSWAP_R = crate::BitReader<bool>;
83#[doc = "Field `UVSWAP` writer - UVSWAP field"]
84pub type UVSWAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CFG_SPEC, bool, O>;
85#[doc = "Field `RBSWAP` reader - RBSWAP field"]
86pub type RBSWAP_R = crate::BitReader<bool>;
87#[doc = "Field `RBSWAP` writer - RBSWAP field"]
88pub type RBSWAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CFG_SPEC, bool, O>;
89#[doc = "Field `EDSWAP` reader - EDSWAP field"]
90pub type EDSWAP_R = crate::BitReader<bool>;
91#[doc = "Field `EDSWAP` writer - EDSWAP field"]
92pub type EDSWAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CFG_SPEC, bool, O>;
93#[doc = "Field `_565DITH` reader - _565DITH field"]
94pub type _565DITH_R = crate::BitReader<bool>;
95#[doc = "Field `_565DITH` writer - _565DITH field"]
96pub type _565DITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, CFG_SPEC, bool, O>;
97impl R {
98 #[doc = "Bits 0:1 - SRCFMT field"]
99 #[inline(always)]
100 pub fn srcfmt(&self) -> SRCFMT_R {
101 SRCFMT_R::new((self.bits & 3) as u8)
102 }
103 #[doc = "Bit 2 - SCANMOD field"]
104 #[inline(always)]
105 pub fn scanmod(&self) -> SCANMOD_R {
106 SCANMOD_R::new(((self.bits >> 2) & 1) != 0)
107 }
108 #[doc = "Bits 3:4 - NISCOMP field"]
109 #[inline(always)]
110 pub fn niscomp(&self) -> NISCOMP_R {
111 NISCOMP_R::new(((self.bits >> 3) & 3) as u8)
112 }
113 #[doc = "Bit 5 - HT1COMP field"]
114 #[inline(always)]
115 pub fn ht1comp(&self) -> HT1COMP_R {
116 HT1COMP_R::new(((self.bits >> 5) & 1) != 0)
117 }
118 #[doc = "Bit 6 - HT2COMP field"]
119 #[inline(always)]
120 pub fn ht2comp(&self) -> HT2COMP_R {
121 HT2COMP_R::new(((self.bits >> 6) & 1) != 0)
122 }
123 #[doc = "Bit 7 - HT3COMP field"]
124 #[inline(always)]
125 pub fn ht3comp(&self) -> HT3COMP_R {
126 HT3COMP_R::new(((self.bits >> 7) & 1) != 0)
127 }
128 #[doc = "Bits 8:9 - QT1COMP field"]
129 #[inline(always)]
130 pub fn qt1comp(&self) -> QT1COMP_R {
131 QT1COMP_R::new(((self.bits >> 8) & 3) as u8)
132 }
133 #[doc = "Bits 10:11 - QT2COMP field"]
134 #[inline(always)]
135 pub fn qt2comp(&self) -> QT2COMP_R {
136 QT2COMP_R::new(((self.bits >> 10) & 3) as u8)
137 }
138 #[doc = "Bits 12:13 - QT3COMP field"]
139 #[inline(always)]
140 pub fn qt3comp(&self) -> QT3COMP_R {
141 QT3COMP_R::new(((self.bits >> 12) & 3) as u8)
142 }
143 #[doc = "Bits 14:16 - OUTFMT field"]
144 #[inline(always)]
145 pub fn outfmt(&self) -> OUTFMT_R {
146 OUTFMT_R::new(((self.bits >> 14) & 7) as u8)
147 }
148 #[doc = "Bit 17 - YUV2RGB field"]
149 #[inline(always)]
150 pub fn yuv2rgb(&self) -> YUV2RGB_R {
151 YUV2RGB_R::new(((self.bits >> 17) & 1) != 0)
152 }
153 #[doc = "Bit 18 - UVSWAP field"]
154 #[inline(always)]
155 pub fn uvswap(&self) -> UVSWAP_R {
156 UVSWAP_R::new(((self.bits >> 18) & 1) != 0)
157 }
158 #[doc = "Bit 19 - RBSWAP field"]
159 #[inline(always)]
160 pub fn rbswap(&self) -> RBSWAP_R {
161 RBSWAP_R::new(((self.bits >> 19) & 1) != 0)
162 }
163 #[doc = "Bit 20 - EDSWAP field"]
164 #[inline(always)]
165 pub fn edswap(&self) -> EDSWAP_R {
166 EDSWAP_R::new(((self.bits >> 20) & 1) != 0)
167 }
168 #[doc = "Bit 21 - _565DITH field"]
169 #[inline(always)]
170 pub fn _565dith(&self) -> _565DITH_R {
171 _565DITH_R::new(((self.bits >> 21) & 1) != 0)
172 }
173}
174impl W {
175 #[doc = "Bits 0:1 - SRCFMT field"]
176 #[inline(always)]
177 pub fn srcfmt(&mut self) -> SRCFMT_W<0> {
178 SRCFMT_W::new(self)
179 }
180 #[doc = "Bit 2 - SCANMOD field"]
181 #[inline(always)]
182 pub fn scanmod(&mut self) -> SCANMOD_W<2> {
183 SCANMOD_W::new(self)
184 }
185 #[doc = "Bits 3:4 - NISCOMP field"]
186 #[inline(always)]
187 pub fn niscomp(&mut self) -> NISCOMP_W<3> {
188 NISCOMP_W::new(self)
189 }
190 #[doc = "Bit 5 - HT1COMP field"]
191 #[inline(always)]
192 pub fn ht1comp(&mut self) -> HT1COMP_W<5> {
193 HT1COMP_W::new(self)
194 }
195 #[doc = "Bit 6 - HT2COMP field"]
196 #[inline(always)]
197 pub fn ht2comp(&mut self) -> HT2COMP_W<6> {
198 HT2COMP_W::new(self)
199 }
200 #[doc = "Bit 7 - HT3COMP field"]
201 #[inline(always)]
202 pub fn ht3comp(&mut self) -> HT3COMP_W<7> {
203 HT3COMP_W::new(self)
204 }
205 #[doc = "Bits 8:9 - QT1COMP field"]
206 #[inline(always)]
207 pub fn qt1comp(&mut self) -> QT1COMP_W<8> {
208 QT1COMP_W::new(self)
209 }
210 #[doc = "Bits 10:11 - QT2COMP field"]
211 #[inline(always)]
212 pub fn qt2comp(&mut self) -> QT2COMP_W<10> {
213 QT2COMP_W::new(self)
214 }
215 #[doc = "Bits 12:13 - QT3COMP field"]
216 #[inline(always)]
217 pub fn qt3comp(&mut self) -> QT3COMP_W<12> {
218 QT3COMP_W::new(self)
219 }
220 #[doc = "Bits 14:16 - OUTFMT field"]
221 #[inline(always)]
222 pub fn outfmt(&mut self) -> OUTFMT_W<14> {
223 OUTFMT_W::new(self)
224 }
225 #[doc = "Bit 17 - YUV2RGB field"]
226 #[inline(always)]
227 pub fn yuv2rgb(&mut self) -> YUV2RGB_W<17> {
228 YUV2RGB_W::new(self)
229 }
230 #[doc = "Bit 18 - UVSWAP field"]
231 #[inline(always)]
232 pub fn uvswap(&mut self) -> UVSWAP_W<18> {
233 UVSWAP_W::new(self)
234 }
235 #[doc = "Bit 19 - RBSWAP field"]
236 #[inline(always)]
237 pub fn rbswap(&mut self) -> RBSWAP_W<19> {
238 RBSWAP_W::new(self)
239 }
240 #[doc = "Bit 20 - EDSWAP field"]
241 #[inline(always)]
242 pub fn edswap(&mut self) -> EDSWAP_W<20> {
243 EDSWAP_W::new(self)
244 }
245 #[doc = "Bit 21 - _565DITH field"]
246 #[inline(always)]
247 pub fn _565dith(&mut self) -> _565DITH_W<21> {
248 _565DITH_W::new(self)
249 }
250 #[doc = "Writes raw bits to the register."]
251 #[inline(always)]
252 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
253 self.0.bits(bits);
254 self
255 }
256}
257#[doc = "CFG 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)."]
258pub struct CFG_SPEC;
259impl crate::RegisterSpec for CFG_SPEC {
260 type Ux = u32;
261}
262#[doc = "`read()` method returns [cfg::R](R) reader structure"]
263impl crate::Readable for CFG_SPEC {
264 type Reader = R;
265}
266#[doc = "`write(|w| ..)` method takes [cfg::W](W) writer structure"]
267impl crate::Writable for CFG_SPEC {
268 type Writer = W;
269}
270#[doc = "`reset()` method sets CFG to value 0"]
271impl crate::Resettable for CFG_SPEC {
272 #[inline(always)]
273 fn reset_value() -> Self::Ux {
274 0
275 }
276}