esp32p4/mipi_dsi_bridge/
dpi_lcd_ctl.rs

1#[doc = "Register `DPI_LCD_CTL` reader"]
2pub type R = crate::R<DPI_LCD_CTL_SPEC>;
3#[doc = "Register `DPI_LCD_CTL` writer"]
4pub type W = crate::W<DPI_LCD_CTL_SPEC>;
5#[doc = "Field `DPISHUTDN` reader - this bit configures dpishutdn signal in dpi interface"]
6pub type DPISHUTDN_R = crate::BitReader;
7#[doc = "Field `DPISHUTDN` writer - this bit configures dpishutdn signal in dpi interface"]
8pub type DPISHUTDN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `DPICOLORM` reader - this bit configures dpicolorm signal in dpi interface"]
10pub type DPICOLORM_R = crate::BitReader;
11#[doc = "Field `DPICOLORM` writer - this bit configures dpicolorm signal in dpi interface"]
12pub type DPICOLORM_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `DPIUPDATECFG` reader - this bit configures dpiupdatecfg signal in dpi interface"]
14pub type DPIUPDATECFG_R = crate::BitReader;
15#[doc = "Field `DPIUPDATECFG` writer - this bit configures dpiupdatecfg signal in dpi interface"]
16pub type DPIUPDATECFG_W<'a, REG> = crate::BitWriter<'a, REG>;
17impl R {
18    #[doc = "Bit 0 - this bit configures dpishutdn signal in dpi interface"]
19    #[inline(always)]
20    pub fn dpishutdn(&self) -> DPISHUTDN_R {
21        DPISHUTDN_R::new((self.bits & 1) != 0)
22    }
23    #[doc = "Bit 1 - this bit configures dpicolorm signal in dpi interface"]
24    #[inline(always)]
25    pub fn dpicolorm(&self) -> DPICOLORM_R {
26        DPICOLORM_R::new(((self.bits >> 1) & 1) != 0)
27    }
28    #[doc = "Bit 2 - this bit configures dpiupdatecfg signal in dpi interface"]
29    #[inline(always)]
30    pub fn dpiupdatecfg(&self) -> DPIUPDATECFG_R {
31        DPIUPDATECFG_R::new(((self.bits >> 2) & 1) != 0)
32    }
33}
34#[cfg(feature = "impl-register-debug")]
35impl core::fmt::Debug for R {
36    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
37        f.debug_struct("DPI_LCD_CTL")
38            .field("dpishutdn", &format_args!("{}", self.dpishutdn().bit()))
39            .field("dpicolorm", &format_args!("{}", self.dpicolorm().bit()))
40            .field(
41                "dpiupdatecfg",
42                &format_args!("{}", self.dpiupdatecfg().bit()),
43            )
44            .finish()
45    }
46}
47#[cfg(feature = "impl-register-debug")]
48impl core::fmt::Debug for crate::generic::Reg<DPI_LCD_CTL_SPEC> {
49    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
50        core::fmt::Debug::fmt(&self.read(), f)
51    }
52}
53impl W {
54    #[doc = "Bit 0 - this bit configures dpishutdn signal in dpi interface"]
55    #[inline(always)]
56    #[must_use]
57    pub fn dpishutdn(&mut self) -> DPISHUTDN_W<DPI_LCD_CTL_SPEC> {
58        DPISHUTDN_W::new(self, 0)
59    }
60    #[doc = "Bit 1 - this bit configures dpicolorm signal in dpi interface"]
61    #[inline(always)]
62    #[must_use]
63    pub fn dpicolorm(&mut self) -> DPICOLORM_W<DPI_LCD_CTL_SPEC> {
64        DPICOLORM_W::new(self, 1)
65    }
66    #[doc = "Bit 2 - this bit configures dpiupdatecfg signal in dpi interface"]
67    #[inline(always)]
68    #[must_use]
69    pub fn dpiupdatecfg(&mut self) -> DPIUPDATECFG_W<DPI_LCD_CTL_SPEC> {
70        DPIUPDATECFG_W::new(self, 2)
71    }
72}
73#[doc = "dsi bridge dpi signal control register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`dpi_lcd_ctl::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 [`dpi_lcd_ctl::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
74pub struct DPI_LCD_CTL_SPEC;
75impl crate::RegisterSpec for DPI_LCD_CTL_SPEC {
76    type Ux = u32;
77}
78#[doc = "`read()` method returns [`dpi_lcd_ctl::R`](R) reader structure"]
79impl crate::Readable for DPI_LCD_CTL_SPEC {}
80#[doc = "`write(|w| ..)` method takes [`dpi_lcd_ctl::W`](W) writer structure"]
81impl crate::Writable for DPI_LCD_CTL_SPEC {
82    type Safety = crate::Unsafe;
83    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
84    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
85}
86#[doc = "`reset()` method sets DPI_LCD_CTL to value 0"]
87impl crate::Resettable for DPI_LCD_CTL_SPEC {
88    const RESET_VALUE: u32 = 0;
89}