esp32p4/lp_huk/
int_ena.rs1#[doc = "Register `INT_ENA` reader"]
2pub type R = crate::R<INT_ENA_SPEC>;
3#[doc = "Register `INT_ENA` writer"]
4pub type W = crate::W<INT_ENA_SPEC>;
5#[doc = "Field `PREP_DONE_INT_ENA` reader - The interrupt enable bit for the huk_prep_done_int interrupt"]
6pub type PREP_DONE_INT_ENA_R = crate::BitReader;
7#[doc = "Field `PREP_DONE_INT_ENA` writer - The interrupt enable bit for the huk_prep_done_int interrupt"]
8pub type PREP_DONE_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `PROC_DONE_INT_ENA` reader - The interrupt enable bit for the huk_proc_done_int interrupt"]
10pub type PROC_DONE_INT_ENA_R = crate::BitReader;
11#[doc = "Field `PROC_DONE_INT_ENA` writer - The interrupt enable bit for the huk_proc_done_int interrupt"]
12pub type PROC_DONE_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `POST_DONE_INT_ENA` reader - The interrupt enable bit for the huk_post_done_int interrupt"]
14pub type POST_DONE_INT_ENA_R = crate::BitReader;
15#[doc = "Field `POST_DONE_INT_ENA` writer - The interrupt enable bit for the huk_post_done_int interrupt"]
16pub type POST_DONE_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
17impl R {
18 #[doc = "Bit 0 - The interrupt enable bit for the huk_prep_done_int interrupt"]
19 #[inline(always)]
20 pub fn prep_done_int_ena(&self) -> PREP_DONE_INT_ENA_R {
21 PREP_DONE_INT_ENA_R::new((self.bits & 1) != 0)
22 }
23 #[doc = "Bit 1 - The interrupt enable bit for the huk_proc_done_int interrupt"]
24 #[inline(always)]
25 pub fn proc_done_int_ena(&self) -> PROC_DONE_INT_ENA_R {
26 PROC_DONE_INT_ENA_R::new(((self.bits >> 1) & 1) != 0)
27 }
28 #[doc = "Bit 2 - The interrupt enable bit for the huk_post_done_int interrupt"]
29 #[inline(always)]
30 pub fn post_done_int_ena(&self) -> POST_DONE_INT_ENA_R {
31 POST_DONE_INT_ENA_R::new(((self.bits >> 2) & 1) != 0)
32 }
33}
34#[cfg(feature = "impl-register-debug")]
35impl core::fmt::Debug for R {
36 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
37 f.debug_struct("INT_ENA")
38 .field(
39 "prep_done_int_ena",
40 &format_args!("{}", self.prep_done_int_ena().bit()),
41 )
42 .field(
43 "proc_done_int_ena",
44 &format_args!("{}", self.proc_done_int_ena().bit()),
45 )
46 .field(
47 "post_done_int_ena",
48 &format_args!("{}", self.post_done_int_ena().bit()),
49 )
50 .finish()
51 }
52}
53#[cfg(feature = "impl-register-debug")]
54impl core::fmt::Debug for crate::generic::Reg<INT_ENA_SPEC> {
55 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
56 core::fmt::Debug::fmt(&self.read(), f)
57 }
58}
59impl W {
60 #[doc = "Bit 0 - The interrupt enable bit for the huk_prep_done_int interrupt"]
61 #[inline(always)]
62 #[must_use]
63 pub fn prep_done_int_ena(&mut self) -> PREP_DONE_INT_ENA_W<INT_ENA_SPEC> {
64 PREP_DONE_INT_ENA_W::new(self, 0)
65 }
66 #[doc = "Bit 1 - The interrupt enable bit for the huk_proc_done_int interrupt"]
67 #[inline(always)]
68 #[must_use]
69 pub fn proc_done_int_ena(&mut self) -> PROC_DONE_INT_ENA_W<INT_ENA_SPEC> {
70 PROC_DONE_INT_ENA_W::new(self, 1)
71 }
72 #[doc = "Bit 2 - The interrupt enable bit for the huk_post_done_int interrupt"]
73 #[inline(always)]
74 #[must_use]
75 pub fn post_done_int_ena(&mut self) -> POST_DONE_INT_ENA_W<INT_ENA_SPEC> {
76 POST_DONE_INT_ENA_W::new(self, 2)
77 }
78}
79#[doc = "HUK Generator interrupt enable register.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`int_ena::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 [`int_ena::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
80pub struct INT_ENA_SPEC;
81impl crate::RegisterSpec for INT_ENA_SPEC {
82 type Ux = u32;
83}
84#[doc = "`read()` method returns [`int_ena::R`](R) reader structure"]
85impl crate::Readable for INT_ENA_SPEC {}
86#[doc = "`write(|w| ..)` method takes [`int_ena::W`](W) writer structure"]
87impl crate::Writable for INT_ENA_SPEC {
88 type Safety = crate::Unsafe;
89 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
90 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
91}
92#[doc = "`reset()` method sets INT_ENA to value 0"]
93impl crate::Resettable for INT_ENA_SPEC {
94 const RESET_VALUE: u32 = 0;
95}