esp32p4/isp/
gamma_bx2.rs

1#[doc = "Register `GAMMA_BX2` reader"]
2pub type R = crate::R<GAMMA_BX2_SPEC>;
3#[doc = "Register `GAMMA_BX2` writer"]
4pub type W = crate::W<GAMMA_BX2_SPEC>;
5#[doc = "Field `GAMMA_B_X0F` reader - this field configures the point 15 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
6pub type GAMMA_B_X0F_R = crate::FieldReader;
7#[doc = "Field `GAMMA_B_X0F` writer - this field configures the point 15 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
8pub type GAMMA_B_X0F_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
9#[doc = "Field `GAMMA_B_X0E` reader - this field configures the point 14 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
10pub type GAMMA_B_X0E_R = crate::FieldReader;
11#[doc = "Field `GAMMA_B_X0E` writer - this field configures the point 14 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
12pub type GAMMA_B_X0E_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
13#[doc = "Field `GAMMA_B_X0D` reader - this field configures the point 13 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
14pub type GAMMA_B_X0D_R = crate::FieldReader;
15#[doc = "Field `GAMMA_B_X0D` writer - this field configures the point 13 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
16pub type GAMMA_B_X0D_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
17#[doc = "Field `GAMMA_B_X0C` reader - this field configures the point 12 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
18pub type GAMMA_B_X0C_R = crate::FieldReader;
19#[doc = "Field `GAMMA_B_X0C` writer - this field configures the point 12 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
20pub type GAMMA_B_X0C_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
21#[doc = "Field `GAMMA_B_X0B` reader - this field configures the point 11 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
22pub type GAMMA_B_X0B_R = crate::FieldReader;
23#[doc = "Field `GAMMA_B_X0B` writer - this field configures the point 11 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
24pub type GAMMA_B_X0B_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
25#[doc = "Field `GAMMA_B_X0A` reader - this field configures the point 10 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
26pub type GAMMA_B_X0A_R = crate::FieldReader;
27#[doc = "Field `GAMMA_B_X0A` writer - this field configures the point 10 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
28pub type GAMMA_B_X0A_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
29#[doc = "Field `GAMMA_B_X09` reader - this field configures the point 9 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
30pub type GAMMA_B_X09_R = crate::FieldReader;
31#[doc = "Field `GAMMA_B_X09` writer - this field configures the point 9 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
32pub type GAMMA_B_X09_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
33#[doc = "Field `GAMMA_B_X08` reader - this field configures the point 8 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
34pub type GAMMA_B_X08_R = crate::FieldReader;
35#[doc = "Field `GAMMA_B_X08` writer - this field configures the point 8 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
36pub type GAMMA_B_X08_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
37impl R {
38    #[doc = "Bits 0:2 - this field configures the point 15 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
39    #[inline(always)]
40    pub fn gamma_b_x0f(&self) -> GAMMA_B_X0F_R {
41        GAMMA_B_X0F_R::new((self.bits & 7) as u8)
42    }
43    #[doc = "Bits 3:5 - this field configures the point 14 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
44    #[inline(always)]
45    pub fn gamma_b_x0e(&self) -> GAMMA_B_X0E_R {
46        GAMMA_B_X0E_R::new(((self.bits >> 3) & 7) as u8)
47    }
48    #[doc = "Bits 6:8 - this field configures the point 13 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
49    #[inline(always)]
50    pub fn gamma_b_x0d(&self) -> GAMMA_B_X0D_R {
51        GAMMA_B_X0D_R::new(((self.bits >> 6) & 7) as u8)
52    }
53    #[doc = "Bits 9:11 - this field configures the point 12 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
54    #[inline(always)]
55    pub fn gamma_b_x0c(&self) -> GAMMA_B_X0C_R {
56        GAMMA_B_X0C_R::new(((self.bits >> 9) & 7) as u8)
57    }
58    #[doc = "Bits 12:14 - this field configures the point 11 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
59    #[inline(always)]
60    pub fn gamma_b_x0b(&self) -> GAMMA_B_X0B_R {
61        GAMMA_B_X0B_R::new(((self.bits >> 12) & 7) as u8)
62    }
63    #[doc = "Bits 15:17 - this field configures the point 10 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
64    #[inline(always)]
65    pub fn gamma_b_x0a(&self) -> GAMMA_B_X0A_R {
66        GAMMA_B_X0A_R::new(((self.bits >> 15) & 7) as u8)
67    }
68    #[doc = "Bits 18:20 - this field configures the point 9 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
69    #[inline(always)]
70    pub fn gamma_b_x09(&self) -> GAMMA_B_X09_R {
71        GAMMA_B_X09_R::new(((self.bits >> 18) & 7) as u8)
72    }
73    #[doc = "Bits 21:23 - this field configures the point 8 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
74    #[inline(always)]
75    pub fn gamma_b_x08(&self) -> GAMMA_B_X08_R {
76        GAMMA_B_X08_R::new(((self.bits >> 21) & 7) as u8)
77    }
78}
79#[cfg(feature = "impl-register-debug")]
80impl core::fmt::Debug for R {
81    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
82        f.debug_struct("GAMMA_BX2")
83            .field(
84                "gamma_b_x0f",
85                &format_args!("{}", self.gamma_b_x0f().bits()),
86            )
87            .field(
88                "gamma_b_x0e",
89                &format_args!("{}", self.gamma_b_x0e().bits()),
90            )
91            .field(
92                "gamma_b_x0d",
93                &format_args!("{}", self.gamma_b_x0d().bits()),
94            )
95            .field(
96                "gamma_b_x0c",
97                &format_args!("{}", self.gamma_b_x0c().bits()),
98            )
99            .field(
100                "gamma_b_x0b",
101                &format_args!("{}", self.gamma_b_x0b().bits()),
102            )
103            .field(
104                "gamma_b_x0a",
105                &format_args!("{}", self.gamma_b_x0a().bits()),
106            )
107            .field(
108                "gamma_b_x09",
109                &format_args!("{}", self.gamma_b_x09().bits()),
110            )
111            .field(
112                "gamma_b_x08",
113                &format_args!("{}", self.gamma_b_x08().bits()),
114            )
115            .finish()
116    }
117}
118#[cfg(feature = "impl-register-debug")]
119impl core::fmt::Debug for crate::generic::Reg<GAMMA_BX2_SPEC> {
120    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
121        core::fmt::Debug::fmt(&self.read(), f)
122    }
123}
124impl W {
125    #[doc = "Bits 0:2 - this field configures the point 15 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
126    #[inline(always)]
127    #[must_use]
128    pub fn gamma_b_x0f(&mut self) -> GAMMA_B_X0F_W<GAMMA_BX2_SPEC> {
129        GAMMA_B_X0F_W::new(self, 0)
130    }
131    #[doc = "Bits 3:5 - this field configures the point 14 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
132    #[inline(always)]
133    #[must_use]
134    pub fn gamma_b_x0e(&mut self) -> GAMMA_B_X0E_W<GAMMA_BX2_SPEC> {
135        GAMMA_B_X0E_W::new(self, 3)
136    }
137    #[doc = "Bits 6:8 - this field configures the point 13 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
138    #[inline(always)]
139    #[must_use]
140    pub fn gamma_b_x0d(&mut self) -> GAMMA_B_X0D_W<GAMMA_BX2_SPEC> {
141        GAMMA_B_X0D_W::new(self, 6)
142    }
143    #[doc = "Bits 9:11 - this field configures the point 12 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
144    #[inline(always)]
145    #[must_use]
146    pub fn gamma_b_x0c(&mut self) -> GAMMA_B_X0C_W<GAMMA_BX2_SPEC> {
147        GAMMA_B_X0C_W::new(self, 9)
148    }
149    #[doc = "Bits 12:14 - this field configures the point 11 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
150    #[inline(always)]
151    #[must_use]
152    pub fn gamma_b_x0b(&mut self) -> GAMMA_B_X0B_W<GAMMA_BX2_SPEC> {
153        GAMMA_B_X0B_W::new(self, 12)
154    }
155    #[doc = "Bits 15:17 - this field configures the point 10 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
156    #[inline(always)]
157    #[must_use]
158    pub fn gamma_b_x0a(&mut self) -> GAMMA_B_X0A_W<GAMMA_BX2_SPEC> {
159        GAMMA_B_X0A_W::new(self, 15)
160    }
161    #[doc = "Bits 18:20 - this field configures the point 9 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
162    #[inline(always)]
163    #[must_use]
164    pub fn gamma_b_x09(&mut self) -> GAMMA_B_X09_W<GAMMA_BX2_SPEC> {
165        GAMMA_B_X09_W::new(self, 18)
166    }
167    #[doc = "Bits 21:23 - this field configures the point 8 of X-axis of b channel gamma curve, it represents the power of the distance from the previous point"]
168    #[inline(always)]
169    #[must_use]
170    pub fn gamma_b_x08(&mut self) -> GAMMA_B_X08_W<GAMMA_BX2_SPEC> {
171        GAMMA_B_X08_W::new(self, 21)
172    }
173}
174#[doc = "point of X-axis of b channel gamma curve register 2\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`gamma_bx2::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 [`gamma_bx2::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
175pub struct GAMMA_BX2_SPEC;
176impl crate::RegisterSpec for GAMMA_BX2_SPEC {
177    type Ux = u32;
178}
179#[doc = "`read()` method returns [`gamma_bx2::R`](R) reader structure"]
180impl crate::Readable for GAMMA_BX2_SPEC {}
181#[doc = "`write(|w| ..)` method takes [`gamma_bx2::W`](W) writer structure"]
182impl crate::Writable for GAMMA_BX2_SPEC {
183    type Safety = crate::Unsafe;
184    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
185    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
186}
187#[doc = "`reset()` method sets GAMMA_BX2 to value 0x0092_4924"]
188impl crate::Resettable for GAMMA_BX2_SPEC {
189    const RESET_VALUE: u32 = 0x0092_4924;
190}