esp32c6/extmem/
l2_cache_blocksize_conf.rs

1#[doc = "Register `L2_CACHE_BLOCKSIZE_CONF` reader"]
2pub type R = crate::R<L2_CACHE_BLOCKSIZE_CONF_SPEC>;
3#[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."]
4pub type L2_CACHE_BLOCKSIZE_8_R = crate::BitReader;
5#[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."]
6pub type L2_CACHE_BLOCKSIZE_16_R = crate::BitReader;
7#[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."]
8pub type L2_CACHE_BLOCKSIZE_32_R = crate::BitReader;
9#[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."]
10pub type L2_CACHE_BLOCKSIZE_64_R = crate::BitReader;
11#[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."]
12pub type L2_CACHE_BLOCKSIZE_128_R = crate::BitReader;
13#[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."]
14pub type L2_CACHE_BLOCKSIZE_256_R = crate::BitReader;
15impl R {
16    #[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."]
17    #[inline(always)]
18    pub fn l2_cache_blocksize_8(&self) -> L2_CACHE_BLOCKSIZE_8_R {
19        L2_CACHE_BLOCKSIZE_8_R::new((self.bits & 1) != 0)
20    }
21    #[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."]
22    #[inline(always)]
23    pub fn l2_cache_blocksize_16(&self) -> L2_CACHE_BLOCKSIZE_16_R {
24        L2_CACHE_BLOCKSIZE_16_R::new(((self.bits >> 1) & 1) != 0)
25    }
26    #[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."]
27    #[inline(always)]
28    pub fn l2_cache_blocksize_32(&self) -> L2_CACHE_BLOCKSIZE_32_R {
29        L2_CACHE_BLOCKSIZE_32_R::new(((self.bits >> 2) & 1) != 0)
30    }
31    #[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."]
32    #[inline(always)]
33    pub fn l2_cache_blocksize_64(&self) -> L2_CACHE_BLOCKSIZE_64_R {
34        L2_CACHE_BLOCKSIZE_64_R::new(((self.bits >> 3) & 1) != 0)
35    }
36    #[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."]
37    #[inline(always)]
38    pub fn l2_cache_blocksize_128(&self) -> L2_CACHE_BLOCKSIZE_128_R {
39        L2_CACHE_BLOCKSIZE_128_R::new(((self.bits >> 4) & 1) != 0)
40    }
41    #[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."]
42    #[inline(always)]
43    pub fn l2_cache_blocksize_256(&self) -> L2_CACHE_BLOCKSIZE_256_R {
44        L2_CACHE_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("L2_CACHE_BLOCKSIZE_CONF")
51            .field("l2_cache_blocksize_8", &self.l2_cache_blocksize_8())
52            .field("l2_cache_blocksize_16", &self.l2_cache_blocksize_16())
53            .field("l2_cache_blocksize_32", &self.l2_cache_blocksize_32())
54            .field("l2_cache_blocksize_64", &self.l2_cache_blocksize_64())
55            .field("l2_cache_blocksize_128", &self.l2_cache_blocksize_128())
56            .field("l2_cache_blocksize_256", &self.l2_cache_blocksize_256())
57            .finish()
58    }
59}
60#[doc = "L2 Cache BlockSize mode configure register\n\nYou can [`read`](crate::Reg::read) this register and get [`l2_cache_blocksize_conf::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
61pub struct L2_CACHE_BLOCKSIZE_CONF_SPEC;
62impl crate::RegisterSpec for L2_CACHE_BLOCKSIZE_CONF_SPEC {
63    type Ux = u32;
64}
65#[doc = "`read()` method returns [`l2_cache_blocksize_conf::R`](R) reader structure"]
66impl crate::Readable for L2_CACHE_BLOCKSIZE_CONF_SPEC {}
67#[doc = "`reset()` method sets L2_CACHE_BLOCKSIZE_CONF to value 0"]
68impl crate::Resettable for L2_CACHE_BLOCKSIZE_CONF_SPEC {}