esp32/slchost/
host_slchost_conf_w3.rs

1#[doc = "Register `HOST_SLCHOST_CONF_W3` reader"]
2pub type R = crate::R<HOST_SLCHOST_CONF_W3_SPEC>;
3#[doc = "Register `HOST_SLCHOST_CONF_W3` writer"]
4pub type W = crate::W<HOST_SLCHOST_CONF_W3_SPEC>;
5#[doc = "Field `HOST_SLCHOST_CONF12` reader - "]
6pub type HOST_SLCHOST_CONF12_R = crate::FieldReader;
7#[doc = "Field `HOST_SLCHOST_CONF12` writer - "]
8pub type HOST_SLCHOST_CONF12_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `HOST_SLCHOST_CONF13` reader - "]
10pub type HOST_SLCHOST_CONF13_R = crate::FieldReader;
11#[doc = "Field `HOST_SLCHOST_CONF13` writer - "]
12pub type HOST_SLCHOST_CONF13_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13#[doc = "Field `HOST_SLCHOST_CONF14` reader - "]
14pub type HOST_SLCHOST_CONF14_R = crate::FieldReader;
15#[doc = "Field `HOST_SLCHOST_CONF14` writer - "]
16pub type HOST_SLCHOST_CONF14_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
17#[doc = "Field `HOST_SLCHOST_CONF15` reader - "]
18pub type HOST_SLCHOST_CONF15_R = crate::FieldReader;
19#[doc = "Field `HOST_SLCHOST_CONF15` writer - "]
20pub type HOST_SLCHOST_CONF15_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
21impl R {
22    #[doc = "Bits 0:7"]
23    #[inline(always)]
24    pub fn host_slchost_conf12(&self) -> HOST_SLCHOST_CONF12_R {
25        HOST_SLCHOST_CONF12_R::new((self.bits & 0xff) as u8)
26    }
27    #[doc = "Bits 8:15"]
28    #[inline(always)]
29    pub fn host_slchost_conf13(&self) -> HOST_SLCHOST_CONF13_R {
30        HOST_SLCHOST_CONF13_R::new(((self.bits >> 8) & 0xff) as u8)
31    }
32    #[doc = "Bits 16:23"]
33    #[inline(always)]
34    pub fn host_slchost_conf14(&self) -> HOST_SLCHOST_CONF14_R {
35        HOST_SLCHOST_CONF14_R::new(((self.bits >> 16) & 0xff) as u8)
36    }
37    #[doc = "Bits 24:31"]
38    #[inline(always)]
39    pub fn host_slchost_conf15(&self) -> HOST_SLCHOST_CONF15_R {
40        HOST_SLCHOST_CONF15_R::new(((self.bits >> 24) & 0xff) as u8)
41    }
42}
43#[cfg(feature = "impl-register-debug")]
44impl core::fmt::Debug for R {
45    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
46        f.debug_struct("HOST_SLCHOST_CONF_W3")
47            .field("host_slchost_conf12", &self.host_slchost_conf12())
48            .field("host_slchost_conf13", &self.host_slchost_conf13())
49            .field("host_slchost_conf14", &self.host_slchost_conf14())
50            .field("host_slchost_conf15", &self.host_slchost_conf15())
51            .finish()
52    }
53}
54impl W {
55    #[doc = "Bits 0:7"]
56    #[inline(always)]
57    pub fn host_slchost_conf12(&mut self) -> HOST_SLCHOST_CONF12_W<HOST_SLCHOST_CONF_W3_SPEC> {
58        HOST_SLCHOST_CONF12_W::new(self, 0)
59    }
60    #[doc = "Bits 8:15"]
61    #[inline(always)]
62    pub fn host_slchost_conf13(&mut self) -> HOST_SLCHOST_CONF13_W<HOST_SLCHOST_CONF_W3_SPEC> {
63        HOST_SLCHOST_CONF13_W::new(self, 8)
64    }
65    #[doc = "Bits 16:23"]
66    #[inline(always)]
67    pub fn host_slchost_conf14(&mut self) -> HOST_SLCHOST_CONF14_W<HOST_SLCHOST_CONF_W3_SPEC> {
68        HOST_SLCHOST_CONF14_W::new(self, 16)
69    }
70    #[doc = "Bits 24:31"]
71    #[inline(always)]
72    pub fn host_slchost_conf15(&mut self) -> HOST_SLCHOST_CONF15_W<HOST_SLCHOST_CONF_W3_SPEC> {
73        HOST_SLCHOST_CONF15_W::new(self, 24)
74    }
75}
76#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`host_slchost_conf_w3::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`host_slchost_conf_w3::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
77pub struct HOST_SLCHOST_CONF_W3_SPEC;
78impl crate::RegisterSpec for HOST_SLCHOST_CONF_W3_SPEC {
79    type Ux = u32;
80}
81#[doc = "`read()` method returns [`host_slchost_conf_w3::R`](R) reader structure"]
82impl crate::Readable for HOST_SLCHOST_CONF_W3_SPEC {}
83#[doc = "`write(|w| ..)` method takes [`host_slchost_conf_w3::W`](W) writer structure"]
84impl crate::Writable for HOST_SLCHOST_CONF_W3_SPEC {
85    type Safety = crate::Unsafe;
86    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
87    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
88}
89#[doc = "`reset()` method sets HOST_SLCHOST_CONF_W3 to value 0xc0"]
90impl crate::Resettable for HOST_SLCHOST_CONF_W3_SPEC {
91    const RESET_VALUE: u32 = 0xc0;
92}