esp32s2/extmem/
pro_cache_wrap_around_ctrl.rs1#[doc = "Register `PRO_CACHE_WRAP_AROUND_CTRL` reader"]
2pub type R = crate::R<PRO_CACHE_WRAP_AROUND_CTRL_SPEC>;
3#[doc = "Register `PRO_CACHE_WRAP_AROUND_CTRL` writer"]
4pub type W = crate::W<PRO_CACHE_WRAP_AROUND_CTRL_SPEC>;
5#[doc = "Field `PRO_CACHE_FLASH_WRAP_AROUND` reader - The bit is used to enable wrap around mode when read data from flash."]
6pub type PRO_CACHE_FLASH_WRAP_AROUND_R = crate::BitReader;
7#[doc = "Field `PRO_CACHE_FLASH_WRAP_AROUND` writer - The bit is used to enable wrap around mode when read data from flash."]
8pub type PRO_CACHE_FLASH_WRAP_AROUND_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `PRO_CACHE_SRAM_RD_WRAP_AROUND` reader - The bit is used to enable wrap around mode when read data from spiram."]
10pub type PRO_CACHE_SRAM_RD_WRAP_AROUND_R = crate::BitReader;
11#[doc = "Field `PRO_CACHE_SRAM_RD_WRAP_AROUND` writer - The bit is used to enable wrap around mode when read data from spiram."]
12pub type PRO_CACHE_SRAM_RD_WRAP_AROUND_W<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14 #[doc = "Bit 0 - The bit is used to enable wrap around mode when read data from flash."]
15 #[inline(always)]
16 pub fn pro_cache_flash_wrap_around(&self) -> PRO_CACHE_FLASH_WRAP_AROUND_R {
17 PRO_CACHE_FLASH_WRAP_AROUND_R::new((self.bits & 1) != 0)
18 }
19 #[doc = "Bit 1 - The bit is used to enable wrap around mode when read data from spiram."]
20 #[inline(always)]
21 pub fn pro_cache_sram_rd_wrap_around(&self) -> PRO_CACHE_SRAM_RD_WRAP_AROUND_R {
22 PRO_CACHE_SRAM_RD_WRAP_AROUND_R::new(((self.bits >> 1) & 1) != 0)
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("PRO_CACHE_WRAP_AROUND_CTRL")
29 .field(
30 "pro_cache_flash_wrap_around",
31 &self.pro_cache_flash_wrap_around(),
32 )
33 .field(
34 "pro_cache_sram_rd_wrap_around",
35 &self.pro_cache_sram_rd_wrap_around(),
36 )
37 .finish()
38 }
39}
40impl W {
41 #[doc = "Bit 0 - The bit is used to enable wrap around mode when read data from flash."]
42 #[inline(always)]
43 pub fn pro_cache_flash_wrap_around(
44 &mut self,
45 ) -> PRO_CACHE_FLASH_WRAP_AROUND_W<PRO_CACHE_WRAP_AROUND_CTRL_SPEC> {
46 PRO_CACHE_FLASH_WRAP_AROUND_W::new(self, 0)
47 }
48 #[doc = "Bit 1 - The bit is used to enable wrap around mode when read data from spiram."]
49 #[inline(always)]
50 pub fn pro_cache_sram_rd_wrap_around(
51 &mut self,
52 ) -> PRO_CACHE_SRAM_RD_WRAP_AROUND_W<PRO_CACHE_WRAP_AROUND_CTRL_SPEC> {
53 PRO_CACHE_SRAM_RD_WRAP_AROUND_W::new(self, 1)
54 }
55}
56#[doc = "register description\n\nYou can [`read`](crate::Reg::read) this register and get [`pro_cache_wrap_around_ctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pro_cache_wrap_around_ctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
57pub struct PRO_CACHE_WRAP_AROUND_CTRL_SPEC;
58impl crate::RegisterSpec for PRO_CACHE_WRAP_AROUND_CTRL_SPEC {
59 type Ux = u32;
60}
61#[doc = "`read()` method returns [`pro_cache_wrap_around_ctrl::R`](R) reader structure"]
62impl crate::Readable for PRO_CACHE_WRAP_AROUND_CTRL_SPEC {}
63#[doc = "`write(|w| ..)` method takes [`pro_cache_wrap_around_ctrl::W`](W) writer structure"]
64impl crate::Writable for PRO_CACHE_WRAP_AROUND_CTRL_SPEC {
65 type Safety = crate::Unsafe;
66}
67#[doc = "`reset()` method sets PRO_CACHE_WRAP_AROUND_CTRL to value 0"]
68impl crate::Resettable for PRO_CACHE_WRAP_AROUND_CTRL_SPEC {}