esp32p4/cache/
l2_cache_blocksize_conf.rs1#[doc = "Register `L2_CACHE_BLOCKSIZE_CONF` reader"]
2pub type R = crate::R<L2_CACHE_BLOCKSIZE_CONF_SPEC>;
3#[doc = "Register `L2_CACHE_BLOCKSIZE_CONF` writer"]
4pub type W = crate::W<L2_CACHE_BLOCKSIZE_CONF_SPEC>;
5#[doc = "Field `L2_CACHE_BLOCKSIZE_8` reader - The field is used to configureblocksize of L2-Cache as 8 bytes. This field and all other fields within this register is onehot."]
6pub type L2_CACHE_BLOCKSIZE_8_R = crate::BitReader;
7#[doc = "Field `L2_CACHE_BLOCKSIZE_16` reader - The field is used to configureblocksize of L2-Cache as 16 bytes. This field and all other fields within this register is onehot."]
8pub type L2_CACHE_BLOCKSIZE_16_R = crate::BitReader;
9#[doc = "Field `L2_CACHE_BLOCKSIZE_32` reader - The field is used to configureblocksize of L2-Cache as 32 bytes. This field and all other fields within this register is onehot."]
10pub type L2_CACHE_BLOCKSIZE_32_R = crate::BitReader;
11#[doc = "Field `L2_CACHE_BLOCKSIZE_64` reader - The field is used to configureblocksize of L2-Cache as 64 bytes. This field and all other fields within this register is onehot."]
12pub type L2_CACHE_BLOCKSIZE_64_R = crate::BitReader;
13#[doc = "Field `L2_CACHE_BLOCKSIZE_64` writer - The field is used to configureblocksize of L2-Cache as 64 bytes. This field and all other fields within this register is onehot."]
14pub type L2_CACHE_BLOCKSIZE_64_W<'a, REG> = crate::BitWriter<'a, REG>;
15#[doc = "Field `L2_CACHE_BLOCKSIZE_128` reader - The field is used to configureblocksize of L2-Cache as 128 bytes. This field and all other fields within this register is onehot."]
16pub type L2_CACHE_BLOCKSIZE_128_R = crate::BitReader;
17#[doc = "Field `L2_CACHE_BLOCKSIZE_128` writer - The field is used to configureblocksize of L2-Cache as 128 bytes. This field and all other fields within this register is onehot."]
18pub type L2_CACHE_BLOCKSIZE_128_W<'a, REG> = crate::BitWriter<'a, REG>;
19#[doc = "Field `L2_CACHE_BLOCKSIZE_256` reader - The field is used to configureblocksize of L2-Cache as 256 bytes. This field and all other fields within this register is onehot."]
20pub type L2_CACHE_BLOCKSIZE_256_R = crate::BitReader;
21impl R {
22 #[doc = "Bit 0 - The field is used to configureblocksize of L2-Cache as 8 bytes. This field and all other fields within this register is onehot."]
23 #[inline(always)]
24 pub fn l2_cache_blocksize_8(&self) -> L2_CACHE_BLOCKSIZE_8_R {
25 L2_CACHE_BLOCKSIZE_8_R::new((self.bits & 1) != 0)
26 }
27 #[doc = "Bit 1 - The field is used to configureblocksize of L2-Cache as 16 bytes. This field and all other fields within this register is onehot."]
28 #[inline(always)]
29 pub fn l2_cache_blocksize_16(&self) -> L2_CACHE_BLOCKSIZE_16_R {
30 L2_CACHE_BLOCKSIZE_16_R::new(((self.bits >> 1) & 1) != 0)
31 }
32 #[doc = "Bit 2 - The field is used to configureblocksize of L2-Cache as 32 bytes. This field and all other fields within this register is onehot."]
33 #[inline(always)]
34 pub fn l2_cache_blocksize_32(&self) -> L2_CACHE_BLOCKSIZE_32_R {
35 L2_CACHE_BLOCKSIZE_32_R::new(((self.bits >> 2) & 1) != 0)
36 }
37 #[doc = "Bit 3 - The field is used to configureblocksize of L2-Cache as 64 bytes. This field and all other fields within this register is onehot."]
38 #[inline(always)]
39 pub fn l2_cache_blocksize_64(&self) -> L2_CACHE_BLOCKSIZE_64_R {
40 L2_CACHE_BLOCKSIZE_64_R::new(((self.bits >> 3) & 1) != 0)
41 }
42 #[doc = "Bit 4 - The field is used to configureblocksize of L2-Cache as 128 bytes. This field and all other fields within this register is onehot."]
43 #[inline(always)]
44 pub fn l2_cache_blocksize_128(&self) -> L2_CACHE_BLOCKSIZE_128_R {
45 L2_CACHE_BLOCKSIZE_128_R::new(((self.bits >> 4) & 1) != 0)
46 }
47 #[doc = "Bit 5 - The field is used to configureblocksize of L2-Cache as 256 bytes. This field and all other fields within this register is onehot."]
48 #[inline(always)]
49 pub fn l2_cache_blocksize_256(&self) -> L2_CACHE_BLOCKSIZE_256_R {
50 L2_CACHE_BLOCKSIZE_256_R::new(((self.bits >> 5) & 1) != 0)
51 }
52}
53#[cfg(feature = "impl-register-debug")]
54impl core::fmt::Debug for R {
55 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
56 f.debug_struct("L2_CACHE_BLOCKSIZE_CONF")
57 .field(
58 "l2_cache_blocksize_8",
59 &format_args!("{}", self.l2_cache_blocksize_8().bit()),
60 )
61 .field(
62 "l2_cache_blocksize_16",
63 &format_args!("{}", self.l2_cache_blocksize_16().bit()),
64 )
65 .field(
66 "l2_cache_blocksize_32",
67 &format_args!("{}", self.l2_cache_blocksize_32().bit()),
68 )
69 .field(
70 "l2_cache_blocksize_64",
71 &format_args!("{}", self.l2_cache_blocksize_64().bit()),
72 )
73 .field(
74 "l2_cache_blocksize_128",
75 &format_args!("{}", self.l2_cache_blocksize_128().bit()),
76 )
77 .field(
78 "l2_cache_blocksize_256",
79 &format_args!("{}", self.l2_cache_blocksize_256().bit()),
80 )
81 .finish()
82 }
83}
84#[cfg(feature = "impl-register-debug")]
85impl core::fmt::Debug for crate::generic::Reg<L2_CACHE_BLOCKSIZE_CONF_SPEC> {
86 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
87 core::fmt::Debug::fmt(&self.read(), f)
88 }
89}
90impl W {
91 #[doc = "Bit 3 - The field is used to configureblocksize of L2-Cache as 64 bytes. This field and all other fields within this register is onehot."]
92 #[inline(always)]
93 #[must_use]
94 pub fn l2_cache_blocksize_64(
95 &mut self,
96 ) -> L2_CACHE_BLOCKSIZE_64_W<L2_CACHE_BLOCKSIZE_CONF_SPEC> {
97 L2_CACHE_BLOCKSIZE_64_W::new(self, 3)
98 }
99 #[doc = "Bit 4 - The field is used to configureblocksize of L2-Cache as 128 bytes. This field and all other fields within this register is onehot."]
100 #[inline(always)]
101 #[must_use]
102 pub fn l2_cache_blocksize_128(
103 &mut self,
104 ) -> L2_CACHE_BLOCKSIZE_128_W<L2_CACHE_BLOCKSIZE_CONF_SPEC> {
105 L2_CACHE_BLOCKSIZE_128_W::new(self, 4)
106 }
107}
108#[doc = "L2 Cache BlockSize mode configure register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`l2_cache_blocksize_conf::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 [`l2_cache_blocksize_conf::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
109pub struct L2_CACHE_BLOCKSIZE_CONF_SPEC;
110impl crate::RegisterSpec for L2_CACHE_BLOCKSIZE_CONF_SPEC {
111 type Ux = u32;
112}
113#[doc = "`read()` method returns [`l2_cache_blocksize_conf::R`](R) reader structure"]
114impl crate::Readable for L2_CACHE_BLOCKSIZE_CONF_SPEC {}
115#[doc = "`write(|w| ..)` method takes [`l2_cache_blocksize_conf::W`](W) writer structure"]
116impl crate::Writable for L2_CACHE_BLOCKSIZE_CONF_SPEC {
117 type Safety = crate::Unsafe;
118 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
119 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
120}
121#[doc = "`reset()` method sets L2_CACHE_BLOCKSIZE_CONF to value 0x08"]
122impl crate::Resettable for L2_CACHE_BLOCKSIZE_CONF_SPEC {
123 const RESET_VALUE: u32 = 0x08;
124}