esp32/slchost/
host_slc0host_token_wdata.rs1#[doc = "Register `HOST_SLC0HOST_TOKEN_WDATA` reader"]
2pub type R = crate::R<HOST_SLC0HOST_TOKEN_WDATA_SPEC>;
3#[doc = "Register `HOST_SLC0HOST_TOKEN_WDATA` writer"]
4pub type W = crate::W<HOST_SLC0HOST_TOKEN_WDATA_SPEC>;
5#[doc = "Field `HOST_SLC0HOST_TOKEN0_WD` reader - "]
6pub type HOST_SLC0HOST_TOKEN0_WD_R = crate::FieldReader<u16>;
7#[doc = "Field `HOST_SLC0HOST_TOKEN0_WD` writer - "]
8pub type HOST_SLC0HOST_TOKEN0_WD_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
9#[doc = "Field `HOST_SLC0HOST_TOKEN1_WD` reader - "]
10pub type HOST_SLC0HOST_TOKEN1_WD_R = crate::FieldReader<u16>;
11#[doc = "Field `HOST_SLC0HOST_TOKEN1_WD` writer - "]
12pub type HOST_SLC0HOST_TOKEN1_WD_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
13impl R {
14 #[doc = "Bits 0:11"]
15 #[inline(always)]
16 pub fn host_slc0host_token0_wd(&self) -> HOST_SLC0HOST_TOKEN0_WD_R {
17 HOST_SLC0HOST_TOKEN0_WD_R::new((self.bits & 0x0fff) as u16)
18 }
19 #[doc = "Bits 16:27"]
20 #[inline(always)]
21 pub fn host_slc0host_token1_wd(&self) -> HOST_SLC0HOST_TOKEN1_WD_R {
22 HOST_SLC0HOST_TOKEN1_WD_R::new(((self.bits >> 16) & 0x0fff) as u16)
23 }
24}
25#[cfg(feature = "impl-register-debug")]
26impl core::fmt::Debug for R {
27 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
28 f.debug_struct("HOST_SLC0HOST_TOKEN_WDATA")
29 .field("host_slc0host_token0_wd", &self.host_slc0host_token0_wd())
30 .field("host_slc0host_token1_wd", &self.host_slc0host_token1_wd())
31 .finish()
32 }
33}
34impl W {
35 #[doc = "Bits 0:11"]
36 #[inline(always)]
37 pub fn host_slc0host_token0_wd(
38 &mut self,
39 ) -> HOST_SLC0HOST_TOKEN0_WD_W<HOST_SLC0HOST_TOKEN_WDATA_SPEC> {
40 HOST_SLC0HOST_TOKEN0_WD_W::new(self, 0)
41 }
42 #[doc = "Bits 16:27"]
43 #[inline(always)]
44 pub fn host_slc0host_token1_wd(
45 &mut self,
46 ) -> HOST_SLC0HOST_TOKEN1_WD_W<HOST_SLC0HOST_TOKEN_WDATA_SPEC> {
47 HOST_SLC0HOST_TOKEN1_WD_W::new(self, 16)
48 }
49}
50#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`host_slc0host_token_wdata::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`host_slc0host_token_wdata::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
51pub struct HOST_SLC0HOST_TOKEN_WDATA_SPEC;
52impl crate::RegisterSpec for HOST_SLC0HOST_TOKEN_WDATA_SPEC {
53 type Ux = u32;
54}
55#[doc = "`read()` method returns [`host_slc0host_token_wdata::R`](R) reader structure"]
56impl crate::Readable for HOST_SLC0HOST_TOKEN_WDATA_SPEC {}
57#[doc = "`write(|w| ..)` method takes [`host_slc0host_token_wdata::W`](W) writer structure"]
58impl crate::Writable for HOST_SLC0HOST_TOKEN_WDATA_SPEC {
59 type Safety = crate::Unsafe;
60 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
61 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
62}
63#[doc = "`reset()` method sets HOST_SLC0HOST_TOKEN_WDATA to value 0"]
64impl crate::Resettable for HOST_SLC0HOST_TOKEN_WDATA_SPEC {
65 const RESET_VALUE: u32 = 0;
66}