esp32p4/lp_i2s0/
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 `RX_DONE_INT_ENA` reader - The interrupt enable bit for the i2s_rx_done_int interrupt"]
6pub type RX_DONE_INT_ENA_R = crate::BitReader;
7#[doc = "Field `RX_DONE_INT_ENA` writer - The interrupt enable bit for the i2s_rx_done_int interrupt"]
8pub type RX_DONE_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `RX_HUNG_INT_ENA` reader - The interrupt enable bit for the i2s_rx_hung_int interrupt"]
10pub type RX_HUNG_INT_ENA_R = crate::BitReader;
11#[doc = "Field `RX_HUNG_INT_ENA` writer - The interrupt enable bit for the i2s_rx_hung_int interrupt"]
12pub type RX_HUNG_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `RX_FIFOMEM_UDF_INT_ENA` reader - The interrupt enable bit for the i2s_rx_fifomem_udf_int interrupt"]
14pub type RX_FIFOMEM_UDF_INT_ENA_R = crate::BitReader;
15#[doc = "Field `RX_FIFOMEM_UDF_INT_ENA` writer - The interrupt enable bit for the i2s_rx_fifomem_udf_int interrupt"]
16pub type RX_FIFOMEM_UDF_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `LP_VAD_DONE_INT_ENA` reader - The interrupt enable bit for the vad_done_int interrupt"]
18pub type LP_VAD_DONE_INT_ENA_R = crate::BitReader;
19#[doc = "Field `LP_VAD_DONE_INT_ENA` writer - The interrupt enable bit for the vad_done_int interrupt"]
20pub type LP_VAD_DONE_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `LP_VAD_RESET_DONE_INT_ENA` reader - The interrupt enable bit for the vad_reset_done_int interrupt"]
22pub type LP_VAD_RESET_DONE_INT_ENA_R = crate::BitReader;
23#[doc = "Field `LP_VAD_RESET_DONE_INT_ENA` writer - The interrupt enable bit for the vad_reset_done_int interrupt"]
24pub type LP_VAD_RESET_DONE_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `RX_MEM_THRESHOLD_INT_ENA` reader - The interrupt enable bit for the rx_mem_threshold_int interrupt"]
26pub type RX_MEM_THRESHOLD_INT_ENA_R = crate::BitReader;
27#[doc = "Field `RX_MEM_THRESHOLD_INT_ENA` writer - The interrupt enable bit for the rx_mem_threshold_int interrupt"]
28pub type RX_MEM_THRESHOLD_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
29impl R {
30 #[doc = "Bit 0 - The interrupt enable bit for the i2s_rx_done_int interrupt"]
31 #[inline(always)]
32 pub fn rx_done_int_ena(&self) -> RX_DONE_INT_ENA_R {
33 RX_DONE_INT_ENA_R::new((self.bits & 1) != 0)
34 }
35 #[doc = "Bit 1 - The interrupt enable bit for the i2s_rx_hung_int interrupt"]
36 #[inline(always)]
37 pub fn rx_hung_int_ena(&self) -> RX_HUNG_INT_ENA_R {
38 RX_HUNG_INT_ENA_R::new(((self.bits >> 1) & 1) != 0)
39 }
40 #[doc = "Bit 2 - The interrupt enable bit for the i2s_rx_fifomem_udf_int interrupt"]
41 #[inline(always)]
42 pub fn rx_fifomem_udf_int_ena(&self) -> RX_FIFOMEM_UDF_INT_ENA_R {
43 RX_FIFOMEM_UDF_INT_ENA_R::new(((self.bits >> 2) & 1) != 0)
44 }
45 #[doc = "Bit 3 - The interrupt enable bit for the vad_done_int interrupt"]
46 #[inline(always)]
47 pub fn lp_vad_done_int_ena(&self) -> LP_VAD_DONE_INT_ENA_R {
48 LP_VAD_DONE_INT_ENA_R::new(((self.bits >> 3) & 1) != 0)
49 }
50 #[doc = "Bit 4 - The interrupt enable bit for the vad_reset_done_int interrupt"]
51 #[inline(always)]
52 pub fn lp_vad_reset_done_int_ena(&self) -> LP_VAD_RESET_DONE_INT_ENA_R {
53 LP_VAD_RESET_DONE_INT_ENA_R::new(((self.bits >> 4) & 1) != 0)
54 }
55 #[doc = "Bit 5 - The interrupt enable bit for the rx_mem_threshold_int interrupt"]
56 #[inline(always)]
57 pub fn rx_mem_threshold_int_ena(&self) -> RX_MEM_THRESHOLD_INT_ENA_R {
58 RX_MEM_THRESHOLD_INT_ENA_R::new(((self.bits >> 5) & 1) != 0)
59 }
60}
61#[cfg(feature = "impl-register-debug")]
62impl core::fmt::Debug for R {
63 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
64 f.debug_struct("INT_ENA")
65 .field(
66 "rx_done_int_ena",
67 &format_args!("{}", self.rx_done_int_ena().bit()),
68 )
69 .field(
70 "rx_hung_int_ena",
71 &format_args!("{}", self.rx_hung_int_ena().bit()),
72 )
73 .field(
74 "rx_fifomem_udf_int_ena",
75 &format_args!("{}", self.rx_fifomem_udf_int_ena().bit()),
76 )
77 .field(
78 "lp_vad_done_int_ena",
79 &format_args!("{}", self.lp_vad_done_int_ena().bit()),
80 )
81 .field(
82 "lp_vad_reset_done_int_ena",
83 &format_args!("{}", self.lp_vad_reset_done_int_ena().bit()),
84 )
85 .field(
86 "rx_mem_threshold_int_ena",
87 &format_args!("{}", self.rx_mem_threshold_int_ena().bit()),
88 )
89 .finish()
90 }
91}
92#[cfg(feature = "impl-register-debug")]
93impl core::fmt::Debug for crate::generic::Reg<INT_ENA_SPEC> {
94 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
95 core::fmt::Debug::fmt(&self.read(), f)
96 }
97}
98impl W {
99 #[doc = "Bit 0 - The interrupt enable bit for the i2s_rx_done_int interrupt"]
100 #[inline(always)]
101 #[must_use]
102 pub fn rx_done_int_ena(&mut self) -> RX_DONE_INT_ENA_W<INT_ENA_SPEC> {
103 RX_DONE_INT_ENA_W::new(self, 0)
104 }
105 #[doc = "Bit 1 - The interrupt enable bit for the i2s_rx_hung_int interrupt"]
106 #[inline(always)]
107 #[must_use]
108 pub fn rx_hung_int_ena(&mut self) -> RX_HUNG_INT_ENA_W<INT_ENA_SPEC> {
109 RX_HUNG_INT_ENA_W::new(self, 1)
110 }
111 #[doc = "Bit 2 - The interrupt enable bit for the i2s_rx_fifomem_udf_int interrupt"]
112 #[inline(always)]
113 #[must_use]
114 pub fn rx_fifomem_udf_int_ena(&mut self) -> RX_FIFOMEM_UDF_INT_ENA_W<INT_ENA_SPEC> {
115 RX_FIFOMEM_UDF_INT_ENA_W::new(self, 2)
116 }
117 #[doc = "Bit 3 - The interrupt enable bit for the vad_done_int interrupt"]
118 #[inline(always)]
119 #[must_use]
120 pub fn lp_vad_done_int_ena(&mut self) -> LP_VAD_DONE_INT_ENA_W<INT_ENA_SPEC> {
121 LP_VAD_DONE_INT_ENA_W::new(self, 3)
122 }
123 #[doc = "Bit 4 - The interrupt enable bit for the vad_reset_done_int interrupt"]
124 #[inline(always)]
125 #[must_use]
126 pub fn lp_vad_reset_done_int_ena(&mut self) -> LP_VAD_RESET_DONE_INT_ENA_W<INT_ENA_SPEC> {
127 LP_VAD_RESET_DONE_INT_ENA_W::new(self, 4)
128 }
129 #[doc = "Bit 5 - The interrupt enable bit for the rx_mem_threshold_int interrupt"]
130 #[inline(always)]
131 #[must_use]
132 pub fn rx_mem_threshold_int_ena(&mut self) -> RX_MEM_THRESHOLD_INT_ENA_W<INT_ENA_SPEC> {
133 RX_MEM_THRESHOLD_INT_ENA_W::new(self, 5)
134 }
135}
136#[doc = "I2S 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)."]
137pub struct INT_ENA_SPEC;
138impl crate::RegisterSpec for INT_ENA_SPEC {
139 type Ux = u32;
140}
141#[doc = "`read()` method returns [`int_ena::R`](R) reader structure"]
142impl crate::Readable for INT_ENA_SPEC {}
143#[doc = "`write(|w| ..)` method takes [`int_ena::W`](W) writer structure"]
144impl crate::Writable for INT_ENA_SPEC {
145 type Safety = crate::Unsafe;
146 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
147 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
148}
149#[doc = "`reset()` method sets INT_ENA to value 0"]
150impl crate::Resettable for INT_ENA_SPEC {
151 const RESET_VALUE: u32 = 0;
152}