1#[doc = "Register `TFTCTRL` reader"]
2pub struct R(crate::R<TFTCTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<TFTCTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<TFTCTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<TFTCTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `TFTCTRL` writer"]
17pub struct W(crate::W<TFTCTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<TFTCTRL_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<TFTCTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<TFTCTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "TFT Direct Drive Mode\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39#[repr(u8)]
40pub enum DD_A {
41 #[doc = "0: Direct Drive is disabled."]
42 DISABLED = 0,
43 #[doc = "1: Direct Drive from internal memory enabled and started."]
44 INTERNAL = 1,
45 #[doc = "2: Direct Drive from external memory enabled and started."]
46 EXTERNAL = 2,
47}
48impl From<DD_A> for u8 {
49 #[inline(always)]
50 fn from(variant: DD_A) -> Self {
51 variant as _
52 }
53}
54#[doc = "Field `DD` reader - TFT Direct Drive Mode"]
55pub type DD_R = crate::FieldReader<u8, DD_A>;
56impl DD_R {
57 #[doc = "Get enumerated values variant"]
58 #[inline(always)]
59 pub fn variant(&self) -> Option<DD_A> {
60 match self.bits {
61 0 => Some(DD_A::DISABLED),
62 1 => Some(DD_A::INTERNAL),
63 2 => Some(DD_A::EXTERNAL),
64 _ => None,
65 }
66 }
67 #[doc = "Checks if the value of the field is `DISABLED`"]
68 #[inline(always)]
69 pub fn is_disabled(&self) -> bool {
70 *self == DD_A::DISABLED
71 }
72 #[doc = "Checks if the value of the field is `INTERNAL`"]
73 #[inline(always)]
74 pub fn is_internal(&self) -> bool {
75 *self == DD_A::INTERNAL
76 }
77 #[doc = "Checks if the value of the field is `EXTERNAL`"]
78 #[inline(always)]
79 pub fn is_external(&self) -> bool {
80 *self == DD_A::EXTERNAL
81 }
82}
83#[doc = "Field `DD` writer - TFT Direct Drive Mode"]
84pub type DD_W<'a> = crate::FieldWriter<'a, u32, TFTCTRL_SPEC, u8, DD_A, 2, 0>;
85impl<'a> DD_W<'a> {
86 #[doc = "Direct Drive is disabled."]
87 #[inline(always)]
88 pub fn disabled(self) -> &'a mut W {
89 self.variant(DD_A::DISABLED)
90 }
91 #[doc = "Direct Drive from internal memory enabled and started."]
92 #[inline(always)]
93 pub fn internal(self) -> &'a mut W {
94 self.variant(DD_A::INTERNAL)
95 }
96 #[doc = "Direct Drive from external memory enabled and started."]
97 #[inline(always)]
98 pub fn external(self) -> &'a mut W {
99 self.variant(DD_A::EXTERNAL)
100 }
101}
102#[doc = "TFT Mask and Blend Mode\n\nValue on reset: 0"]
103#[derive(Clone, Copy, Debug, PartialEq)]
104#[repr(u8)]
105pub enum MASKBLEND_A {
106 #[doc = "0: Masking and Blending are disabled."]
107 DISABLED = 0,
108 #[doc = "1: Internal Masking is enabled."]
109 IMASK = 1,
110 #[doc = "2: Internal Alpha Blending is enabled."]
111 IALPHA = 2,
112 #[doc = "3: Internal Masking and Alpha Blending are enabled."]
113 IMASKALPHA = 3,
114 #[doc = "4: External Frame Buffer Masking is enabled."]
115 EFBMASK = 4,
116 #[doc = "5: External Frame Buffer Alpha Blending is enabled."]
117 EFBALPHA = 5,
118 #[doc = "6: External Frame Buffer Masking and Alpha Blending are enabled."]
119 EFBMASKALPHA = 6,
120 #[doc = "7: Internal Frame Buffer Masking is enabled."]
121 IFBMASK = 7,
122 #[doc = "8: Internal Frame Buffer Alpha Blending is enabled."]
123 IFBALPHA = 8,
124 #[doc = "9: Internal Frame Buffer Masking and Alpha Blending are enabled."]
125 IFBMASKALPHA = 9,
126}
127impl From<MASKBLEND_A> for u8 {
128 #[inline(always)]
129 fn from(variant: MASKBLEND_A) -> Self {
130 variant as _
131 }
132}
133#[doc = "Field `MASKBLEND` reader - TFT Mask and Blend Mode"]
134pub type MASKBLEND_R = crate::FieldReader<u8, MASKBLEND_A>;
135impl MASKBLEND_R {
136 #[doc = "Get enumerated values variant"]
137 #[inline(always)]
138 pub fn variant(&self) -> Option<MASKBLEND_A> {
139 match self.bits {
140 0 => Some(MASKBLEND_A::DISABLED),
141 1 => Some(MASKBLEND_A::IMASK),
142 2 => Some(MASKBLEND_A::IALPHA),
143 3 => Some(MASKBLEND_A::IMASKALPHA),
144 4 => Some(MASKBLEND_A::EFBMASK),
145 5 => Some(MASKBLEND_A::EFBALPHA),
146 6 => Some(MASKBLEND_A::EFBMASKALPHA),
147 7 => Some(MASKBLEND_A::IFBMASK),
148 8 => Some(MASKBLEND_A::IFBALPHA),
149 9 => Some(MASKBLEND_A::IFBMASKALPHA),
150 _ => None,
151 }
152 }
153 #[doc = "Checks if the value of the field is `DISABLED`"]
154 #[inline(always)]
155 pub fn is_disabled(&self) -> bool {
156 *self == MASKBLEND_A::DISABLED
157 }
158 #[doc = "Checks if the value of the field is `IMASK`"]
159 #[inline(always)]
160 pub fn is_imask(&self) -> bool {
161 *self == MASKBLEND_A::IMASK
162 }
163 #[doc = "Checks if the value of the field is `IALPHA`"]
164 #[inline(always)]
165 pub fn is_ialpha(&self) -> bool {
166 *self == MASKBLEND_A::IALPHA
167 }
168 #[doc = "Checks if the value of the field is `IMASKALPHA`"]
169 #[inline(always)]
170 pub fn is_imaskalpha(&self) -> bool {
171 *self == MASKBLEND_A::IMASKALPHA
172 }
173 #[doc = "Checks if the value of the field is `EFBMASK`"]
174 #[inline(always)]
175 pub fn is_efbmask(&self) -> bool {
176 *self == MASKBLEND_A::EFBMASK
177 }
178 #[doc = "Checks if the value of the field is `EFBALPHA`"]
179 #[inline(always)]
180 pub fn is_efbalpha(&self) -> bool {
181 *self == MASKBLEND_A::EFBALPHA
182 }
183 #[doc = "Checks if the value of the field is `EFBMASKALPHA`"]
184 #[inline(always)]
185 pub fn is_efbmaskalpha(&self) -> bool {
186 *self == MASKBLEND_A::EFBMASKALPHA
187 }
188 #[doc = "Checks if the value of the field is `IFBMASK`"]
189 #[inline(always)]
190 pub fn is_ifbmask(&self) -> bool {
191 *self == MASKBLEND_A::IFBMASK
192 }
193 #[doc = "Checks if the value of the field is `IFBALPHA`"]
194 #[inline(always)]
195 pub fn is_ifbalpha(&self) -> bool {
196 *self == MASKBLEND_A::IFBALPHA
197 }
198 #[doc = "Checks if the value of the field is `IFBMASKALPHA`"]
199 #[inline(always)]
200 pub fn is_ifbmaskalpha(&self) -> bool {
201 *self == MASKBLEND_A::IFBMASKALPHA
202 }
203}
204#[doc = "Field `MASKBLEND` writer - TFT Mask and Blend Mode"]
205pub type MASKBLEND_W<'a> = crate::FieldWriter<'a, u32, TFTCTRL_SPEC, u8, MASKBLEND_A, 4, 2>;
206impl<'a> MASKBLEND_W<'a> {
207 #[doc = "Masking and Blending are disabled."]
208 #[inline(always)]
209 pub fn disabled(self) -> &'a mut W {
210 self.variant(MASKBLEND_A::DISABLED)
211 }
212 #[doc = "Internal Masking is enabled."]
213 #[inline(always)]
214 pub fn imask(self) -> &'a mut W {
215 self.variant(MASKBLEND_A::IMASK)
216 }
217 #[doc = "Internal Alpha Blending is enabled."]
218 #[inline(always)]
219 pub fn ialpha(self) -> &'a mut W {
220 self.variant(MASKBLEND_A::IALPHA)
221 }
222 #[doc = "Internal Masking and Alpha Blending are enabled."]
223 #[inline(always)]
224 pub fn imaskalpha(self) -> &'a mut W {
225 self.variant(MASKBLEND_A::IMASKALPHA)
226 }
227 #[doc = "External Frame Buffer Masking is enabled."]
228 #[inline(always)]
229 pub fn efbmask(self) -> &'a mut W {
230 self.variant(MASKBLEND_A::EFBMASK)
231 }
232 #[doc = "External Frame Buffer Alpha Blending is enabled."]
233 #[inline(always)]
234 pub fn efbalpha(self) -> &'a mut W {
235 self.variant(MASKBLEND_A::EFBALPHA)
236 }
237 #[doc = "External Frame Buffer Masking and Alpha Blending are enabled."]
238 #[inline(always)]
239 pub fn efbmaskalpha(self) -> &'a mut W {
240 self.variant(MASKBLEND_A::EFBMASKALPHA)
241 }
242 #[doc = "Internal Frame Buffer Masking is enabled."]
243 #[inline(always)]
244 pub fn ifbmask(self) -> &'a mut W {
245 self.variant(MASKBLEND_A::IFBMASK)
246 }
247 #[doc = "Internal Frame Buffer Alpha Blending is enabled."]
248 #[inline(always)]
249 pub fn ifbalpha(self) -> &'a mut W {
250 self.variant(MASKBLEND_A::IFBALPHA)
251 }
252 #[doc = "Internal Frame Buffer Masking and Alpha Blending are enabled."]
253 #[inline(always)]
254 pub fn ifbmaskalpha(self) -> &'a mut W {
255 self.variant(MASKBLEND_A::IFBMASKALPHA)
256 }
257}
258#[doc = "Field `SHIFTDCLKEN` reader - TFT EBI_DCLK Shift Enable"]
259pub type SHIFTDCLKEN_R = crate::BitReader<bool>;
260#[doc = "Field `SHIFTDCLKEN` writer - TFT EBI_DCLK Shift Enable"]
261pub type SHIFTDCLKEN_W<'a> = crate::BitWriter<'a, u32, TFTCTRL_SPEC, bool, 8>;
262#[doc = "Field `FBCTRIG` reader - TFT Frame Base Copy Trigger"]
263pub type FBCTRIG_R = crate::BitReader<bool>;
264#[doc = "Field `FBCTRIG` writer - TFT Frame Base Copy Trigger"]
265pub type FBCTRIG_W<'a> = crate::BitWriter<'a, u32, TFTCTRL_SPEC, bool, 9>;
266#[doc = "Interleave Mode\n\nValue on reset: 0"]
267#[derive(Clone, Copy, Debug, PartialEq)]
268#[repr(u8)]
269pub enum INTERLEAVE_A {
270 #[doc = "0: Allow unlimited interleaved EBI accesses per EBI_DCLK period. This can cause jitter on the EBI_DCLK"]
271 UNLIMITED = 0,
272 #[doc = "1: Allow 1 interleaved EBI access per EBI_DCLK period."]
273 ONEPERDCLK = 1,
274 #[doc = "2: Only allow EBI accesses during TFT porches."]
275 PORCH = 2,
276}
277impl From<INTERLEAVE_A> for u8 {
278 #[inline(always)]
279 fn from(variant: INTERLEAVE_A) -> Self {
280 variant as _
281 }
282}
283#[doc = "Field `INTERLEAVE` reader - Interleave Mode"]
284pub type INTERLEAVE_R = crate::FieldReader<u8, INTERLEAVE_A>;
285impl INTERLEAVE_R {
286 #[doc = "Get enumerated values variant"]
287 #[inline(always)]
288 pub fn variant(&self) -> Option<INTERLEAVE_A> {
289 match self.bits {
290 0 => Some(INTERLEAVE_A::UNLIMITED),
291 1 => Some(INTERLEAVE_A::ONEPERDCLK),
292 2 => Some(INTERLEAVE_A::PORCH),
293 _ => None,
294 }
295 }
296 #[doc = "Checks if the value of the field is `UNLIMITED`"]
297 #[inline(always)]
298 pub fn is_unlimited(&self) -> bool {
299 *self == INTERLEAVE_A::UNLIMITED
300 }
301 #[doc = "Checks if the value of the field is `ONEPERDCLK`"]
302 #[inline(always)]
303 pub fn is_oneperdclk(&self) -> bool {
304 *self == INTERLEAVE_A::ONEPERDCLK
305 }
306 #[doc = "Checks if the value of the field is `PORCH`"]
307 #[inline(always)]
308 pub fn is_porch(&self) -> bool {
309 *self == INTERLEAVE_A::PORCH
310 }
311}
312#[doc = "Field `INTERLEAVE` writer - Interleave Mode"]
313pub type INTERLEAVE_W<'a> = crate::FieldWriter<'a, u32, TFTCTRL_SPEC, u8, INTERLEAVE_A, 2, 10>;
314impl<'a> INTERLEAVE_W<'a> {
315 #[doc = "Allow unlimited interleaved EBI accesses per EBI_DCLK period. This can cause jitter on the EBI_DCLK"]
316 #[inline(always)]
317 pub fn unlimited(self) -> &'a mut W {
318 self.variant(INTERLEAVE_A::UNLIMITED)
319 }
320 #[doc = "Allow 1 interleaved EBI access per EBI_DCLK period."]
321 #[inline(always)]
322 pub fn oneperdclk(self) -> &'a mut W {
323 self.variant(INTERLEAVE_A::ONEPERDCLK)
324 }
325 #[doc = "Only allow EBI accesses during TFT porches."]
326 #[inline(always)]
327 pub fn porch(self) -> &'a mut W {
328 self.variant(INTERLEAVE_A::PORCH)
329 }
330}
331#[doc = "Field `COLOR1SRC` reader - Masking/Alpha Blending Color1 Source"]
332pub type COLOR1SRC_R = crate::BitReader<bool>;
333#[doc = "Field `COLOR1SRC` writer - Masking/Alpha Blending Color1 Source"]
334pub type COLOR1SRC_W<'a> = crate::BitWriter<'a, u32, TFTCTRL_SPEC, bool, 12>;
335#[doc = "TFT Transaction Width\n\nValue on reset: 0"]
336#[derive(Clone, Copy, Debug, PartialEq)]
337#[repr(u8)]
338pub enum WIDTH_A {
339 #[doc = "0: TFT Data is 8 bit wide."]
340 BYTE = 0,
341 #[doc = "1: TFT Data is 16 bit wide."]
342 HALFWORD = 1,
343}
344impl From<WIDTH_A> for u8 {
345 #[inline(always)]
346 fn from(variant: WIDTH_A) -> Self {
347 variant as _
348 }
349}
350#[doc = "Field `WIDTH` reader - TFT Transaction Width"]
351pub type WIDTH_R = crate::FieldReader<u8, WIDTH_A>;
352impl WIDTH_R {
353 #[doc = "Get enumerated values variant"]
354 #[inline(always)]
355 pub fn variant(&self) -> Option<WIDTH_A> {
356 match self.bits {
357 0 => Some(WIDTH_A::BYTE),
358 1 => Some(WIDTH_A::HALFWORD),
359 _ => None,
360 }
361 }
362 #[doc = "Checks if the value of the field is `BYTE`"]
363 #[inline(always)]
364 pub fn is_byte(&self) -> bool {
365 *self == WIDTH_A::BYTE
366 }
367 #[doc = "Checks if the value of the field is `HALFWORD`"]
368 #[inline(always)]
369 pub fn is_halfword(&self) -> bool {
370 *self == WIDTH_A::HALFWORD
371 }
372}
373#[doc = "Field `WIDTH` writer - TFT Transaction Width"]
374pub type WIDTH_W<'a> = crate::FieldWriter<'a, u32, TFTCTRL_SPEC, u8, WIDTH_A, 2, 16>;
375impl<'a> WIDTH_W<'a> {
376 #[doc = "TFT Data is 8 bit wide."]
377 #[inline(always)]
378 pub fn byte(self) -> &'a mut W {
379 self.variant(WIDTH_A::BYTE)
380 }
381 #[doc = "TFT Data is 16 bit wide."]
382 #[inline(always)]
383 pub fn halfword(self) -> &'a mut W {
384 self.variant(WIDTH_A::HALFWORD)
385 }
386}
387#[doc = "Field `ALIASBANKEN` reader - Alias to Graphics Bank Enable"]
388pub type ALIASBANKEN_R = crate::BitReader<bool>;
389#[doc = "Field `ALIASBANKEN` writer - Alias to Graphics Bank Enable"]
390pub type ALIASBANKEN_W<'a> = crate::BitWriter<'a, u32, TFTCTRL_SPEC, bool, 19>;
391#[doc = "Graphics Bank\n\nValue on reset: 0"]
392#[derive(Clone, Copy, Debug, PartialEq)]
393#[repr(u8)]
394pub enum BANKSEL_A {
395 #[doc = "0: Memory bank 0 is used for Direct Drive, Masking, and Alpha Blending."]
396 BANK0 = 0,
397 #[doc = "1: Memory bank 1 is used for Direct Drive, Masking, and Alpha Blending."]
398 BANK1 = 1,
399 #[doc = "2: Memory bank 2 is used for Direct Drive, Masking, and Alpha Blending."]
400 BANK2 = 2,
401 #[doc = "3: Memory bank 3 is used for Direct Drive, Masking, and Alpha Blending."]
402 BANK3 = 3,
403}
404impl From<BANKSEL_A> for u8 {
405 #[inline(always)]
406 fn from(variant: BANKSEL_A) -> Self {
407 variant as _
408 }
409}
410#[doc = "Field `BANKSEL` reader - Graphics Bank"]
411pub type BANKSEL_R = crate::FieldReader<u8, BANKSEL_A>;
412impl BANKSEL_R {
413 #[doc = "Get enumerated values variant"]
414 #[inline(always)]
415 pub fn variant(&self) -> BANKSEL_A {
416 match self.bits {
417 0 => BANKSEL_A::BANK0,
418 1 => BANKSEL_A::BANK1,
419 2 => BANKSEL_A::BANK2,
420 3 => BANKSEL_A::BANK3,
421 _ => unreachable!(),
422 }
423 }
424 #[doc = "Checks if the value of the field is `BANK0`"]
425 #[inline(always)]
426 pub fn is_bank0(&self) -> bool {
427 *self == BANKSEL_A::BANK0
428 }
429 #[doc = "Checks if the value of the field is `BANK1`"]
430 #[inline(always)]
431 pub fn is_bank1(&self) -> bool {
432 *self == BANKSEL_A::BANK1
433 }
434 #[doc = "Checks if the value of the field is `BANK2`"]
435 #[inline(always)]
436 pub fn is_bank2(&self) -> bool {
437 *self == BANKSEL_A::BANK2
438 }
439 #[doc = "Checks if the value of the field is `BANK3`"]
440 #[inline(always)]
441 pub fn is_bank3(&self) -> bool {
442 *self == BANKSEL_A::BANK3
443 }
444}
445#[doc = "Field `BANKSEL` writer - Graphics Bank"]
446pub type BANKSEL_W<'a> = crate::FieldWriterSafe<'a, u32, TFTCTRL_SPEC, u8, BANKSEL_A, 2, 20>;
447impl<'a> BANKSEL_W<'a> {
448 #[doc = "Memory bank 0 is used for Direct Drive, Masking, and Alpha Blending."]
449 #[inline(always)]
450 pub fn bank0(self) -> &'a mut W {
451 self.variant(BANKSEL_A::BANK0)
452 }
453 #[doc = "Memory bank 1 is used for Direct Drive, Masking, and Alpha Blending."]
454 #[inline(always)]
455 pub fn bank1(self) -> &'a mut W {
456 self.variant(BANKSEL_A::BANK1)
457 }
458 #[doc = "Memory bank 2 is used for Direct Drive, Masking, and Alpha Blending."]
459 #[inline(always)]
460 pub fn bank2(self) -> &'a mut W {
461 self.variant(BANKSEL_A::BANK2)
462 }
463 #[doc = "Memory bank 3 is used for Direct Drive, Masking, and Alpha Blending."]
464 #[inline(always)]
465 pub fn bank3(self) -> &'a mut W {
466 self.variant(BANKSEL_A::BANK3)
467 }
468}
469#[doc = "Graphic Bank Select Aliasing\n\nValue on reset: 0"]
470#[derive(Clone, Copy, Debug, PartialEq)]
471#[repr(u8)]
472pub enum ALIASBANK_A {
473 #[doc = "0: Graphic Bank Select is alias to Bank Select 0"]
474 ALIASBANK0 = 0,
475 #[doc = "1: Graphic Bank Select is alias to Bank Select 1"]
476 ALIASBANK1 = 1,
477 #[doc = "2: Graphic Bank Select is alias to Bank Select 2"]
478 ALIASBANK2 = 2,
479 #[doc = "3: Graphic Bank Select is alias to Bank Select 3"]
480 ALIASBANK3 = 3,
481}
482impl From<ALIASBANK_A> for u8 {
483 #[inline(always)]
484 fn from(variant: ALIASBANK_A) -> Self {
485 variant as _
486 }
487}
488#[doc = "Field `ALIASBANK` reader - Graphic Bank Select Aliasing"]
489pub type ALIASBANK_R = crate::FieldReader<u8, ALIASBANK_A>;
490impl ALIASBANK_R {
491 #[doc = "Get enumerated values variant"]
492 #[inline(always)]
493 pub fn variant(&self) -> ALIASBANK_A {
494 match self.bits {
495 0 => ALIASBANK_A::ALIASBANK0,
496 1 => ALIASBANK_A::ALIASBANK1,
497 2 => ALIASBANK_A::ALIASBANK2,
498 3 => ALIASBANK_A::ALIASBANK3,
499 _ => unreachable!(),
500 }
501 }
502 #[doc = "Checks if the value of the field is `ALIASBANK0`"]
503 #[inline(always)]
504 pub fn is_aliasbank0(&self) -> bool {
505 *self == ALIASBANK_A::ALIASBANK0
506 }
507 #[doc = "Checks if the value of the field is `ALIASBANK1`"]
508 #[inline(always)]
509 pub fn is_aliasbank1(&self) -> bool {
510 *self == ALIASBANK_A::ALIASBANK1
511 }
512 #[doc = "Checks if the value of the field is `ALIASBANK2`"]
513 #[inline(always)]
514 pub fn is_aliasbank2(&self) -> bool {
515 *self == ALIASBANK_A::ALIASBANK2
516 }
517 #[doc = "Checks if the value of the field is `ALIASBANK3`"]
518 #[inline(always)]
519 pub fn is_aliasbank3(&self) -> bool {
520 *self == ALIASBANK_A::ALIASBANK3
521 }
522}
523#[doc = "Field `ALIASBANK` writer - Graphic Bank Select Aliasing"]
524pub type ALIASBANK_W<'a> = crate::FieldWriterSafe<'a, u32, TFTCTRL_SPEC, u8, ALIASBANK_A, 2, 22>;
525impl<'a> ALIASBANK_W<'a> {
526 #[doc = "Graphic Bank Select is alias to Bank Select 0"]
527 #[inline(always)]
528 pub fn aliasbank0(self) -> &'a mut W {
529 self.variant(ALIASBANK_A::ALIASBANK0)
530 }
531 #[doc = "Graphic Bank Select is alias to Bank Select 1"]
532 #[inline(always)]
533 pub fn aliasbank1(self) -> &'a mut W {
534 self.variant(ALIASBANK_A::ALIASBANK1)
535 }
536 #[doc = "Graphic Bank Select is alias to Bank Select 2"]
537 #[inline(always)]
538 pub fn aliasbank2(self) -> &'a mut W {
539 self.variant(ALIASBANK_A::ALIASBANK2)
540 }
541 #[doc = "Graphic Bank Select is alias to Bank Select 3"]
542 #[inline(always)]
543 pub fn aliasbank3(self) -> &'a mut W {
544 self.variant(ALIASBANK_A::ALIASBANK3)
545 }
546}
547impl R {
548 #[doc = "Bits 0:1 - TFT Direct Drive Mode"]
549 #[inline(always)]
550 pub fn dd(&self) -> DD_R {
551 DD_R::new((self.bits & 3) as u8)
552 }
553 #[doc = "Bits 2:5 - TFT Mask and Blend Mode"]
554 #[inline(always)]
555 pub fn maskblend(&self) -> MASKBLEND_R {
556 MASKBLEND_R::new(((self.bits >> 2) & 0x0f) as u8)
557 }
558 #[doc = "Bit 8 - TFT EBI_DCLK Shift Enable"]
559 #[inline(always)]
560 pub fn shiftdclken(&self) -> SHIFTDCLKEN_R {
561 SHIFTDCLKEN_R::new(((self.bits >> 8) & 1) != 0)
562 }
563 #[doc = "Bit 9 - TFT Frame Base Copy Trigger"]
564 #[inline(always)]
565 pub fn fbctrig(&self) -> FBCTRIG_R {
566 FBCTRIG_R::new(((self.bits >> 9) & 1) != 0)
567 }
568 #[doc = "Bits 10:11 - Interleave Mode"]
569 #[inline(always)]
570 pub fn interleave(&self) -> INTERLEAVE_R {
571 INTERLEAVE_R::new(((self.bits >> 10) & 3) as u8)
572 }
573 #[doc = "Bit 12 - Masking/Alpha Blending Color1 Source"]
574 #[inline(always)]
575 pub fn color1src(&self) -> COLOR1SRC_R {
576 COLOR1SRC_R::new(((self.bits >> 12) & 1) != 0)
577 }
578 #[doc = "Bits 16:17 - TFT Transaction Width"]
579 #[inline(always)]
580 pub fn width(&self) -> WIDTH_R {
581 WIDTH_R::new(((self.bits >> 16) & 3) as u8)
582 }
583 #[doc = "Bit 19 - Alias to Graphics Bank Enable"]
584 #[inline(always)]
585 pub fn aliasbanken(&self) -> ALIASBANKEN_R {
586 ALIASBANKEN_R::new(((self.bits >> 19) & 1) != 0)
587 }
588 #[doc = "Bits 20:21 - Graphics Bank"]
589 #[inline(always)]
590 pub fn banksel(&self) -> BANKSEL_R {
591 BANKSEL_R::new(((self.bits >> 20) & 3) as u8)
592 }
593 #[doc = "Bits 22:23 - Graphic Bank Select Aliasing"]
594 #[inline(always)]
595 pub fn aliasbank(&self) -> ALIASBANK_R {
596 ALIASBANK_R::new(((self.bits >> 22) & 3) as u8)
597 }
598}
599impl W {
600 #[doc = "Bits 0:1 - TFT Direct Drive Mode"]
601 #[inline(always)]
602 pub fn dd(&mut self) -> DD_W {
603 DD_W::new(self)
604 }
605 #[doc = "Bits 2:5 - TFT Mask and Blend Mode"]
606 #[inline(always)]
607 pub fn maskblend(&mut self) -> MASKBLEND_W {
608 MASKBLEND_W::new(self)
609 }
610 #[doc = "Bit 8 - TFT EBI_DCLK Shift Enable"]
611 #[inline(always)]
612 pub fn shiftdclken(&mut self) -> SHIFTDCLKEN_W {
613 SHIFTDCLKEN_W::new(self)
614 }
615 #[doc = "Bit 9 - TFT Frame Base Copy Trigger"]
616 #[inline(always)]
617 pub fn fbctrig(&mut self) -> FBCTRIG_W {
618 FBCTRIG_W::new(self)
619 }
620 #[doc = "Bits 10:11 - Interleave Mode"]
621 #[inline(always)]
622 pub fn interleave(&mut self) -> INTERLEAVE_W {
623 INTERLEAVE_W::new(self)
624 }
625 #[doc = "Bit 12 - Masking/Alpha Blending Color1 Source"]
626 #[inline(always)]
627 pub fn color1src(&mut self) -> COLOR1SRC_W {
628 COLOR1SRC_W::new(self)
629 }
630 #[doc = "Bits 16:17 - TFT Transaction Width"]
631 #[inline(always)]
632 pub fn width(&mut self) -> WIDTH_W {
633 WIDTH_W::new(self)
634 }
635 #[doc = "Bit 19 - Alias to Graphics Bank Enable"]
636 #[inline(always)]
637 pub fn aliasbanken(&mut self) -> ALIASBANKEN_W {
638 ALIASBANKEN_W::new(self)
639 }
640 #[doc = "Bits 20:21 - Graphics Bank"]
641 #[inline(always)]
642 pub fn banksel(&mut self) -> BANKSEL_W {
643 BANKSEL_W::new(self)
644 }
645 #[doc = "Bits 22:23 - Graphic Bank Select Aliasing"]
646 #[inline(always)]
647 pub fn aliasbank(&mut self) -> ALIASBANK_W {
648 ALIASBANK_W::new(self)
649 }
650 #[doc = "Writes raw bits to the register."]
651 #[inline(always)]
652 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
653 self.0.bits(bits);
654 self
655 }
656}
657#[doc = "TFT 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 [tftctrl](index.html) module"]
658pub struct TFTCTRL_SPEC;
659impl crate::RegisterSpec for TFTCTRL_SPEC {
660 type Ux = u32;
661}
662#[doc = "`read()` method returns [tftctrl::R](R) reader structure"]
663impl crate::Readable for TFTCTRL_SPEC {
664 type Reader = R;
665}
666#[doc = "`write(|w| ..)` method takes [tftctrl::W](W) writer structure"]
667impl crate::Writable for TFTCTRL_SPEC {
668 type Writer = W;
669}
670#[doc = "`reset()` method sets TFTCTRL to value 0"]
671impl crate::Resettable for TFTCTRL_SPEC {
672 #[inline(always)]
673 fn reset_value() -> Self::Ux {
674 0
675 }
676}