esp32p4/mipi_dsi_host/
dbi_cfg.rs1#[doc = "Register `DBI_CFG` reader"]
2pub type R = crate::R<DBI_CFG_SPEC>;
3#[doc = "Register `DBI_CFG` writer"]
4pub type W = crate::W<DBI_CFG_SPEC>;
5#[doc = "Field `IN_DBI_CONF` reader - NA"]
6pub type IN_DBI_CONF_R = crate::FieldReader;
7#[doc = "Field `IN_DBI_CONF` writer - NA"]
8pub type IN_DBI_CONF_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9#[doc = "Field `OUT_DBI_CONF` reader - NA"]
10pub type OUT_DBI_CONF_R = crate::FieldReader;
11#[doc = "Field `OUT_DBI_CONF` writer - NA"]
12pub type OUT_DBI_CONF_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
13#[doc = "Field `LUT_SIZE_CONF` reader - NA"]
14pub type LUT_SIZE_CONF_R = crate::FieldReader;
15#[doc = "Field `LUT_SIZE_CONF` writer - NA"]
16pub type LUT_SIZE_CONF_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
17impl R {
18 #[doc = "Bits 0:3 - NA"]
19 #[inline(always)]
20 pub fn in_dbi_conf(&self) -> IN_DBI_CONF_R {
21 IN_DBI_CONF_R::new((self.bits & 0x0f) as u8)
22 }
23 #[doc = "Bits 8:11 - NA"]
24 #[inline(always)]
25 pub fn out_dbi_conf(&self) -> OUT_DBI_CONF_R {
26 OUT_DBI_CONF_R::new(((self.bits >> 8) & 0x0f) as u8)
27 }
28 #[doc = "Bits 16:17 - NA"]
29 #[inline(always)]
30 pub fn lut_size_conf(&self) -> LUT_SIZE_CONF_R {
31 LUT_SIZE_CONF_R::new(((self.bits >> 16) & 3) as u8)
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("DBI_CFG")
38 .field(
39 "in_dbi_conf",
40 &format_args!("{}", self.in_dbi_conf().bits()),
41 )
42 .field(
43 "out_dbi_conf",
44 &format_args!("{}", self.out_dbi_conf().bits()),
45 )
46 .field(
47 "lut_size_conf",
48 &format_args!("{}", self.lut_size_conf().bits()),
49 )
50 .finish()
51 }
52}
53#[cfg(feature = "impl-register-debug")]
54impl core::fmt::Debug for crate::generic::Reg<DBI_CFG_SPEC> {
55 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
56 core::fmt::Debug::fmt(&self.read(), f)
57 }
58}
59impl W {
60 #[doc = "Bits 0:3 - NA"]
61 #[inline(always)]
62 #[must_use]
63 pub fn in_dbi_conf(&mut self) -> IN_DBI_CONF_W<DBI_CFG_SPEC> {
64 IN_DBI_CONF_W::new(self, 0)
65 }
66 #[doc = "Bits 8:11 - NA"]
67 #[inline(always)]
68 #[must_use]
69 pub fn out_dbi_conf(&mut self) -> OUT_DBI_CONF_W<DBI_CFG_SPEC> {
70 OUT_DBI_CONF_W::new(self, 8)
71 }
72 #[doc = "Bits 16:17 - NA"]
73 #[inline(always)]
74 #[must_use]
75 pub fn lut_size_conf(&mut self) -> LUT_SIZE_CONF_W<DBI_CFG_SPEC> {
76 LUT_SIZE_CONF_W::new(self, 16)
77 }
78}
79#[doc = "NA\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`dbi_cfg::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 [`dbi_cfg::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
80pub struct DBI_CFG_SPEC;
81impl crate::RegisterSpec for DBI_CFG_SPEC {
82 type Ux = u32;
83}
84#[doc = "`read()` method returns [`dbi_cfg::R`](R) reader structure"]
85impl crate::Readable for DBI_CFG_SPEC {}
86#[doc = "`write(|w| ..)` method takes [`dbi_cfg::W`](W) writer structure"]
87impl crate::Writable for DBI_CFG_SPEC {
88 type Safety = crate::Unsafe;
89 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
90 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
91}
92#[doc = "`reset()` method sets DBI_CFG to value 0"]
93impl crate::Resettable for DBI_CFG_SPEC {
94 const RESET_VALUE: u32 = 0;
95}