esp32p4/cache/
l1_dcache_blocksize_conf.rs1#[doc = "Register `L1_DCACHE_BLOCKSIZE_CONF` reader"]
2pub type R = crate::R<L1_DCACHE_BLOCKSIZE_CONF_SPEC>;
3#[doc = "Field `L1_DCACHE_BLOCKSIZE_8` reader - The field is used to configureblocksize of L1-DCache as 8 bytes. This field and all other fields within this register is onehot."]
4pub type L1_DCACHE_BLOCKSIZE_8_R = crate::BitReader;
5#[doc = "Field `L1_DCACHE_BLOCKSIZE_16` reader - The field is used to configureblocksize of L1-DCache as 16 bytes. This field and all other fields within this register is onehot."]
6pub type L1_DCACHE_BLOCKSIZE_16_R = crate::BitReader;
7#[doc = "Field `L1_DCACHE_BLOCKSIZE_32` reader - The field is used to configureblocksize of L1-DCache as 32 bytes. This field and all other fields within this register is onehot."]
8pub type L1_DCACHE_BLOCKSIZE_32_R = crate::BitReader;
9#[doc = "Field `L1_DCACHE_BLOCKSIZE_64` reader - The field is used to configureblocksize of L1-DCache as 64 bytes. This field and all other fields within this register is onehot."]
10pub type L1_DCACHE_BLOCKSIZE_64_R = crate::BitReader;
11#[doc = "Field `L1_DCACHE_BLOCKSIZE_128` reader - The field is used to configureblocksize of L1-DCache as 128 bytes. This field and all other fields within this register is onehot."]
12pub type L1_DCACHE_BLOCKSIZE_128_R = crate::BitReader;
13#[doc = "Field `L1_DCACHE_BLOCKSIZE_256` reader - The field is used to configureblocksize of L1-DCache as 256 bytes. This field and all other fields within this register is onehot."]
14pub type L1_DCACHE_BLOCKSIZE_256_R = crate::BitReader;
15impl R {
16 #[doc = "Bit 0 - The field is used to configureblocksize of L1-DCache as 8 bytes. This field and all other fields within this register is onehot."]
17 #[inline(always)]
18 pub fn l1_dcache_blocksize_8(&self) -> L1_DCACHE_BLOCKSIZE_8_R {
19 L1_DCACHE_BLOCKSIZE_8_R::new((self.bits & 1) != 0)
20 }
21 #[doc = "Bit 1 - The field is used to configureblocksize of L1-DCache as 16 bytes. This field and all other fields within this register is onehot."]
22 #[inline(always)]
23 pub fn l1_dcache_blocksize_16(&self) -> L1_DCACHE_BLOCKSIZE_16_R {
24 L1_DCACHE_BLOCKSIZE_16_R::new(((self.bits >> 1) & 1) != 0)
25 }
26 #[doc = "Bit 2 - The field is used to configureblocksize of L1-DCache as 32 bytes. This field and all other fields within this register is onehot."]
27 #[inline(always)]
28 pub fn l1_dcache_blocksize_32(&self) -> L1_DCACHE_BLOCKSIZE_32_R {
29 L1_DCACHE_BLOCKSIZE_32_R::new(((self.bits >> 2) & 1) != 0)
30 }
31 #[doc = "Bit 3 - The field is used to configureblocksize of L1-DCache as 64 bytes. This field and all other fields within this register is onehot."]
32 #[inline(always)]
33 pub fn l1_dcache_blocksize_64(&self) -> L1_DCACHE_BLOCKSIZE_64_R {
34 L1_DCACHE_BLOCKSIZE_64_R::new(((self.bits >> 3) & 1) != 0)
35 }
36 #[doc = "Bit 4 - The field is used to configureblocksize of L1-DCache as 128 bytes. This field and all other fields within this register is onehot."]
37 #[inline(always)]
38 pub fn l1_dcache_blocksize_128(&self) -> L1_DCACHE_BLOCKSIZE_128_R {
39 L1_DCACHE_BLOCKSIZE_128_R::new(((self.bits >> 4) & 1) != 0)
40 }
41 #[doc = "Bit 5 - The field is used to configureblocksize of L1-DCache as 256 bytes. This field and all other fields within this register is onehot."]
42 #[inline(always)]
43 pub fn l1_dcache_blocksize_256(&self) -> L1_DCACHE_BLOCKSIZE_256_R {
44 L1_DCACHE_BLOCKSIZE_256_R::new(((self.bits >> 5) & 1) != 0)
45 }
46}
47#[cfg(feature = "impl-register-debug")]
48impl core::fmt::Debug for R {
49 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
50 f.debug_struct("L1_DCACHE_BLOCKSIZE_CONF")
51 .field(
52 "l1_dcache_blocksize_8",
53 &format_args!("{}", self.l1_dcache_blocksize_8().bit()),
54 )
55 .field(
56 "l1_dcache_blocksize_16",
57 &format_args!("{}", self.l1_dcache_blocksize_16().bit()),
58 )
59 .field(
60 "l1_dcache_blocksize_32",
61 &format_args!("{}", self.l1_dcache_blocksize_32().bit()),
62 )
63 .field(
64 "l1_dcache_blocksize_64",
65 &format_args!("{}", self.l1_dcache_blocksize_64().bit()),
66 )
67 .field(
68 "l1_dcache_blocksize_128",
69 &format_args!("{}", self.l1_dcache_blocksize_128().bit()),
70 )
71 .field(
72 "l1_dcache_blocksize_256",
73 &format_args!("{}", self.l1_dcache_blocksize_256().bit()),
74 )
75 .finish()
76 }
77}
78#[cfg(feature = "impl-register-debug")]
79impl core::fmt::Debug for crate::generic::Reg<L1_DCACHE_BLOCKSIZE_CONF_SPEC> {
80 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
81 core::fmt::Debug::fmt(&self.read(), f)
82 }
83}
84#[doc = "L1 data Cache BlockSize mode configure register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`l1_dcache_blocksize_conf::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
85pub struct L1_DCACHE_BLOCKSIZE_CONF_SPEC;
86impl crate::RegisterSpec for L1_DCACHE_BLOCKSIZE_CONF_SPEC {
87 type Ux = u32;
88}
89#[doc = "`read()` method returns [`l1_dcache_blocksize_conf::R`](R) reader structure"]
90impl crate::Readable for L1_DCACHE_BLOCKSIZE_CONF_SPEC {}
91#[doc = "`reset()` method sets L1_DCACHE_BLOCKSIZE_CONF to value 0x08"]
92impl crate::Resettable for L1_DCACHE_BLOCKSIZE_CONF_SPEC {
93 const RESET_VALUE: u32 = 0x08;
94}