esp32c6/slc/
slc0token1.rs1#[doc = "Register `SLC0TOKEN1` reader"]
2pub type R = crate::R<SLC0TOKEN1_SPEC>;
3#[doc = "Register `SLC0TOKEN1` writer"]
4pub type W = crate::W<SLC0TOKEN1_SPEC>;
5#[doc = "Field `SDIO_SLC0_TOKEN1_WDATA` writer - Configures SLC0 token 1 value."]
6pub type SDIO_SLC0_TOKEN1_WDATA_W<'a, REG> = crate::FieldWriter<'a, REG, 11, u16>;
7#[doc = "Field `SDIO_SLC0_TOKEN1_WR` writer - Configures this bit to 1 to write SDIO_SLC0_TOKEN1_WDATA into SDIO_SLC0_TOKEN1."]
8pub type SDIO_SLC0_TOKEN1_WR_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `SDIO_SLC0_TOKEN1_INC` writer - Configures this bit to 1 to add 1 to SDIO_SLC0_TOKEN1."]
10pub type SDIO_SLC0_TOKEN1_INC_W<'a, REG> = crate::BitWriter<'a, REG>;
11#[doc = "Field `SDIO_SLC0_TOKEN1_INC_MORE` writer - Configures this bit to 1 to add the value of SDIO_SLC0_TOKEN1_WDATA to SDIO_SLC0_TOKEN1."]
12pub type SDIO_SLC0_TOKEN1_INC_MORE_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SDIO_SLC0_TOKEN1` reader - Represents the SLC0 accumulated number of buffers for receiving packets."]
14pub type SDIO_SLC0_TOKEN1_R = crate::FieldReader<u16>;
15impl R {
16 #[doc = "Bits 16:27 - Represents the SLC0 accumulated number of buffers for receiving packets."]
17 #[inline(always)]
18 pub fn sdio_slc0_token1(&self) -> SDIO_SLC0_TOKEN1_R {
19 SDIO_SLC0_TOKEN1_R::new(((self.bits >> 16) & 0x0fff) as u16)
20 }
21}
22#[cfg(feature = "impl-register-debug")]
23impl core::fmt::Debug for R {
24 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
25 f.debug_struct("SLC0TOKEN1")
26 .field("sdio_slc0_token1", &self.sdio_slc0_token1())
27 .finish()
28 }
29}
30impl W {
31 #[doc = "Bits 0:10 - Configures SLC0 token 1 value."]
32 #[inline(always)]
33 pub fn sdio_slc0_token1_wdata(&mut self) -> SDIO_SLC0_TOKEN1_WDATA_W<SLC0TOKEN1_SPEC> {
34 SDIO_SLC0_TOKEN1_WDATA_W::new(self, 0)
35 }
36 #[doc = "Bit 12 - Configures this bit to 1 to write SDIO_SLC0_TOKEN1_WDATA into SDIO_SLC0_TOKEN1."]
37 #[inline(always)]
38 pub fn sdio_slc0_token1_wr(&mut self) -> SDIO_SLC0_TOKEN1_WR_W<SLC0TOKEN1_SPEC> {
39 SDIO_SLC0_TOKEN1_WR_W::new(self, 12)
40 }
41 #[doc = "Bit 13 - Configures this bit to 1 to add 1 to SDIO_SLC0_TOKEN1."]
42 #[inline(always)]
43 pub fn sdio_slc0_token1_inc(&mut self) -> SDIO_SLC0_TOKEN1_INC_W<SLC0TOKEN1_SPEC> {
44 SDIO_SLC0_TOKEN1_INC_W::new(self, 13)
45 }
46 #[doc = "Bit 14 - Configures this bit to 1 to add the value of SDIO_SLC0_TOKEN1_WDATA to SDIO_SLC0_TOKEN1."]
47 #[inline(always)]
48 pub fn sdio_slc0_token1_inc_more(&mut self) -> SDIO_SLC0_TOKEN1_INC_MORE_W<SLC0TOKEN1_SPEC> {
49 SDIO_SLC0_TOKEN1_INC_MORE_W::new(self, 14)
50 }
51}
52#[doc = "SLC0 receiving buffer configuration\n\nYou can [`read`](crate::Reg::read) this register and get [`slc0token1::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`slc0token1::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
53pub struct SLC0TOKEN1_SPEC;
54impl crate::RegisterSpec for SLC0TOKEN1_SPEC {
55 type Ux = u32;
56}
57#[doc = "`read()` method returns [`slc0token1::R`](R) reader structure"]
58impl crate::Readable for SLC0TOKEN1_SPEC {}
59#[doc = "`write(|w| ..)` method takes [`slc0token1::W`](W) writer structure"]
60impl crate::Writable for SLC0TOKEN1_SPEC {
61 type Safety = crate::Unsafe;
62 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
63 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
64}
65#[doc = "`reset()` method sets SLC0TOKEN1 to value 0"]
66impl crate::Resettable for SLC0TOKEN1_SPEC {
67 const RESET_VALUE: u32 = 0;
68}