esp32p4/isp/
lut_cmd.rs

1#[doc = "Register `LUT_CMD` writer"]
2pub type W = crate::W<LUT_CMD_SPEC>;
3#[doc = "Field `LUT_ADDR` writer - this field configures the lut access addr, when select lsc lut, \\[11:10\\]:00 sel gb_b lut, 01 sel r_gr lut"]
4pub type LUT_ADDR_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
5#[doc = "Field `LUT_NUM` writer - this field configures the lut selection. 0000:LSC LUT 0001:DPC LUT"]
6pub type LUT_NUM_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
7#[doc = "Field `LUT_CMD` writer - this bit configures the access event of lut. 0:rd 1: wr"]
8pub type LUT_CMD_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[cfg(feature = "impl-register-debug")]
10impl core::fmt::Debug for crate::generic::Reg<LUT_CMD_SPEC> {
11    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
12        write!(f, "(not readable)")
13    }
14}
15impl W {
16    #[doc = "Bits 0:11 - this field configures the lut access addr, when select lsc lut, \\[11:10\\]:00 sel gb_b lut, 01 sel r_gr lut"]
17    #[inline(always)]
18    #[must_use]
19    pub fn lut_addr(&mut self) -> LUT_ADDR_W<LUT_CMD_SPEC> {
20        LUT_ADDR_W::new(self, 0)
21    }
22    #[doc = "Bits 12:15 - this field configures the lut selection. 0000:LSC LUT 0001:DPC LUT"]
23    #[inline(always)]
24    #[must_use]
25    pub fn lut_num(&mut self) -> LUT_NUM_W<LUT_CMD_SPEC> {
26        LUT_NUM_W::new(self, 12)
27    }
28    #[doc = "Bit 16 - this bit configures the access event of lut. 0:rd 1: wr"]
29    #[inline(always)]
30    #[must_use]
31    pub fn lut_cmd(&mut self) -> LUT_CMD_W<LUT_CMD_SPEC> {
32        LUT_CMD_W::new(self, 16)
33    }
34}
35#[doc = "LUT command register\n\nYou can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`lut_cmd::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
36pub struct LUT_CMD_SPEC;
37impl crate::RegisterSpec for LUT_CMD_SPEC {
38    type Ux = u32;
39}
40#[doc = "`write(|w| ..)` method takes [`lut_cmd::W`](W) writer structure"]
41impl crate::Writable for LUT_CMD_SPEC {
42    type Safety = crate::Unsafe;
43    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
44    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
45}
46#[doc = "`reset()` method sets LUT_CMD to value 0"]
47impl crate::Resettable for LUT_CMD_SPEC {
48    const RESET_VALUE: u32 = 0;
49}