esp32s2/extmem/
cache_encrypt_decrypt_clk_force_on.rs1#[doc = "Register `CACHE_ENCRYPT_DECRYPT_CLK_FORCE_ON` reader"]
2pub type R = crate::R<CACHE_ENCRYPT_DECRYPT_CLK_FORCE_ON_SPEC>;
3#[doc = "Register `CACHE_ENCRYPT_DECRYPT_CLK_FORCE_ON` writer"]
4pub type W = crate::W<CACHE_ENCRYPT_DECRYPT_CLK_FORCE_ON_SPEC>;
5#[doc = "Field `CLK_FORCE_ON_DB_ENCRYPT` reader - The bit is used to close clock gating of encrypt clock. 1: close gating, 0: open clock gating."]
6pub type CLK_FORCE_ON_DB_ENCRYPT_R = crate::BitReader;
7#[doc = "Field `CLK_FORCE_ON_DB_ENCRYPT` writer - The bit is used to close clock gating of encrypt clock. 1: close gating, 0: open clock gating."]
8pub type CLK_FORCE_ON_DB_ENCRYPT_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `CLK_FORCE_ON_G0CB_DECRYPT` reader - The bit is used to close clock gating of decrypt clock. 1: close gating, 0: open clock gating."]
10pub type CLK_FORCE_ON_G0CB_DECRYPT_R = crate::BitReader;
11#[doc = "Field `CLK_FORCE_ON_G0CB_DECRYPT` writer - The bit is used to close clock gating of decrypt clock. 1: close gating, 0: open clock gating."]
12pub type CLK_FORCE_ON_G0CB_DECRYPT_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `CLK_FORCE_ON_AUTOMATIC_ENCRYPT_DECRYPT` reader - The bit is used to close clock gating of encrypt and decrypt clock. 1: close gating, 0: open clock gating."]
14pub type CLK_FORCE_ON_AUTOMATIC_ENCRYPT_DECRYPT_R = crate::BitReader;
15#[doc = "Field `CLK_FORCE_ON_AUTOMATIC_ENCRYPT_DECRYPT` writer - The bit is used to close clock gating of encrypt and decrypt clock. 1: close gating, 0: open clock gating."]
16pub type CLK_FORCE_ON_AUTOMATIC_ENCRYPT_DECRYPT_W<'a, REG> = crate::BitWriter<'a, REG>;
17impl R {
18 #[doc = "Bit 0 - The bit is used to close clock gating of encrypt clock. 1: close gating, 0: open clock gating."]
19 #[inline(always)]
20 pub fn clk_force_on_db_encrypt(&self) -> CLK_FORCE_ON_DB_ENCRYPT_R {
21 CLK_FORCE_ON_DB_ENCRYPT_R::new((self.bits & 1) != 0)
22 }
23 #[doc = "Bit 1 - The bit is used to close clock gating of decrypt clock. 1: close gating, 0: open clock gating."]
24 #[inline(always)]
25 pub fn clk_force_on_g0cb_decrypt(&self) -> CLK_FORCE_ON_G0CB_DECRYPT_R {
26 CLK_FORCE_ON_G0CB_DECRYPT_R::new(((self.bits >> 1) & 1) != 0)
27 }
28 #[doc = "Bit 2 - The bit is used to close clock gating of encrypt and decrypt clock. 1: close gating, 0: open clock gating."]
29 #[inline(always)]
30 pub fn clk_force_on_automatic_encrypt_decrypt(
31 &self,
32 ) -> CLK_FORCE_ON_AUTOMATIC_ENCRYPT_DECRYPT_R {
33 CLK_FORCE_ON_AUTOMATIC_ENCRYPT_DECRYPT_R::new(((self.bits >> 2) & 1) != 0)
34 }
35}
36#[cfg(feature = "impl-register-debug")]
37impl core::fmt::Debug for R {
38 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
39 f.debug_struct("CACHE_ENCRYPT_DECRYPT_CLK_FORCE_ON")
40 .field("clk_force_on_db_encrypt", &self.clk_force_on_db_encrypt())
41 .field(
42 "clk_force_on_g0cb_decrypt",
43 &self.clk_force_on_g0cb_decrypt(),
44 )
45 .field(
46 "clk_force_on_automatic_encrypt_decrypt",
47 &self.clk_force_on_automatic_encrypt_decrypt(),
48 )
49 .finish()
50 }
51}
52impl W {
53 #[doc = "Bit 0 - The bit is used to close clock gating of encrypt clock. 1: close gating, 0: open clock gating."]
54 #[inline(always)]
55 pub fn clk_force_on_db_encrypt(
56 &mut self,
57 ) -> CLK_FORCE_ON_DB_ENCRYPT_W<CACHE_ENCRYPT_DECRYPT_CLK_FORCE_ON_SPEC> {
58 CLK_FORCE_ON_DB_ENCRYPT_W::new(self, 0)
59 }
60 #[doc = "Bit 1 - The bit is used to close clock gating of decrypt clock. 1: close gating, 0: open clock gating."]
61 #[inline(always)]
62 pub fn clk_force_on_g0cb_decrypt(
63 &mut self,
64 ) -> CLK_FORCE_ON_G0CB_DECRYPT_W<CACHE_ENCRYPT_DECRYPT_CLK_FORCE_ON_SPEC> {
65 CLK_FORCE_ON_G0CB_DECRYPT_W::new(self, 1)
66 }
67 #[doc = "Bit 2 - The bit is used to close clock gating of encrypt and decrypt clock. 1: close gating, 0: open clock gating."]
68 #[inline(always)]
69 pub fn clk_force_on_automatic_encrypt_decrypt(
70 &mut self,
71 ) -> CLK_FORCE_ON_AUTOMATIC_ENCRYPT_DECRYPT_W<CACHE_ENCRYPT_DECRYPT_CLK_FORCE_ON_SPEC> {
72 CLK_FORCE_ON_AUTOMATIC_ENCRYPT_DECRYPT_W::new(self, 2)
73 }
74}
75#[doc = "register description\n\nYou can [`read`](crate::Reg::read) this register and get [`cache_encrypt_decrypt_clk_force_on::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cache_encrypt_decrypt_clk_force_on::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
76pub struct CACHE_ENCRYPT_DECRYPT_CLK_FORCE_ON_SPEC;
77impl crate::RegisterSpec for CACHE_ENCRYPT_DECRYPT_CLK_FORCE_ON_SPEC {
78 type Ux = u32;
79}
80#[doc = "`read()` method returns [`cache_encrypt_decrypt_clk_force_on::R`](R) reader structure"]
81impl crate::Readable for CACHE_ENCRYPT_DECRYPT_CLK_FORCE_ON_SPEC {}
82#[doc = "`write(|w| ..)` method takes [`cache_encrypt_decrypt_clk_force_on::W`](W) writer structure"]
83impl crate::Writable for CACHE_ENCRYPT_DECRYPT_CLK_FORCE_ON_SPEC {
84 type Safety = crate::Unsafe;
85}
86#[doc = "`reset()` method sets CACHE_ENCRYPT_DECRYPT_CLK_FORCE_ON to value 0x07"]
87impl crate::Resettable for CACHE_ENCRYPT_DECRYPT_CLK_FORCE_ON_SPEC {
88 const RESET_VALUE: u32 = 0x07;
89}