d1_pac/tcon_lcd0/
lcd_gamma_table.rs1#[doc = "Register `lcd_gamma_table%s` reader"]
2pub type R = crate::R<LCD_GAMMA_TABLE_SPEC>;
3#[doc = "Register `lcd_gamma_table%s` writer"]
4pub type W = crate::W<LCD_GAMMA_TABLE_SPEC>;
5#[doc = "Field `blue_comp` reader - Blue Component"]
6pub type BLUE_COMP_R = crate::FieldReader;
7#[doc = "Field `blue_comp` writer - Blue Component"]
8pub type BLUE_COMP_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `green_comp` reader - Green Component"]
10pub type GREEN_COMP_R = crate::FieldReader;
11#[doc = "Field `green_comp` writer - Green Component"]
12pub type GREEN_COMP_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13#[doc = "Field `red_comp` reader - Red Component"]
14pub type RED_COMP_R = crate::FieldReader;
15#[doc = "Field `red_comp` writer - Red Component"]
16pub type RED_COMP_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
17impl R {
18 #[doc = "Bits 0:7 - Blue Component"]
19 #[inline(always)]
20 pub fn blue_comp(&self) -> BLUE_COMP_R {
21 BLUE_COMP_R::new((self.bits & 0xff) as u8)
22 }
23 #[doc = "Bits 8:15 - Green Component"]
24 #[inline(always)]
25 pub fn green_comp(&self) -> GREEN_COMP_R {
26 GREEN_COMP_R::new(((self.bits >> 8) & 0xff) as u8)
27 }
28 #[doc = "Bits 16:23 - Red Component"]
29 #[inline(always)]
30 pub fn red_comp(&self) -> RED_COMP_R {
31 RED_COMP_R::new(((self.bits >> 16) & 0xff) as u8)
32 }
33}
34impl W {
35 #[doc = "Bits 0:7 - Blue Component"]
36 #[inline(always)]
37 #[must_use]
38 pub fn blue_comp(&mut self) -> BLUE_COMP_W<LCD_GAMMA_TABLE_SPEC> {
39 BLUE_COMP_W::new(self, 0)
40 }
41 #[doc = "Bits 8:15 - Green Component"]
42 #[inline(always)]
43 #[must_use]
44 pub fn green_comp(&mut self) -> GREEN_COMP_W<LCD_GAMMA_TABLE_SPEC> {
45 GREEN_COMP_W::new(self, 8)
46 }
47 #[doc = "Bits 16:23 - Red Component"]
48 #[inline(always)]
49 #[must_use]
50 pub fn red_comp(&mut self) -> RED_COMP_W<LCD_GAMMA_TABLE_SPEC> {
51 RED_COMP_W::new(self, 16)
52 }
53 #[doc = r" Writes raw bits to the register."]
54 #[doc = r""]
55 #[doc = r" # Safety"]
56 #[doc = r""]
57 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
58 #[inline(always)]
59 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
60 self.bits = bits;
61 self
62 }
63}
64#[doc = "LCD Gamma Table Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`lcd_gamma_table::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`lcd_gamma_table::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
65pub struct LCD_GAMMA_TABLE_SPEC;
66impl crate::RegisterSpec for LCD_GAMMA_TABLE_SPEC {
67 type Ux = u32;
68}
69#[doc = "`read()` method returns [`lcd_gamma_table::R`](R) reader structure"]
70impl crate::Readable for LCD_GAMMA_TABLE_SPEC {}
71#[doc = "`write(|w| ..)` method takes [`lcd_gamma_table::W`](W) writer structure"]
72impl crate::Writable for LCD_GAMMA_TABLE_SPEC {
73 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
74 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
75}
76#[doc = "`reset()` method sets lcd_gamma_table%s to value 0"]
77impl crate::Resettable for LCD_GAMMA_TABLE_SPEC {
78 const RESET_VALUE: Self::Ux = 0;
79}