1#[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 `RXFIFO_FULL` reader - This is the enable bit for rxfifo_full_int_st register."]
6pub type RXFIFO_FULL_R = crate::BitReader;
7#[doc = "Field `RXFIFO_FULL` writer - This is the enable bit for rxfifo_full_int_st register."]
8pub type RXFIFO_FULL_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `TXFIFO_EMPTY` reader - This is the enable bit for txfifo_empty_int_st register."]
10pub type TXFIFO_EMPTY_R = crate::BitReader;
11#[doc = "Field `TXFIFO_EMPTY` writer - This is the enable bit for txfifo_empty_int_st register."]
12pub type TXFIFO_EMPTY_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `PARITY_ERR` reader - This is the enable bit for parity_err_int_st register."]
14pub type PARITY_ERR_R = crate::BitReader;
15#[doc = "Field `PARITY_ERR` writer - This is the enable bit for parity_err_int_st register."]
16pub type PARITY_ERR_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `FRM_ERR` reader - This is the enable bit for frm_err_int_st register."]
18pub type FRM_ERR_R = crate::BitReader;
19#[doc = "Field `FRM_ERR` writer - This is the enable bit for frm_err_int_st register."]
20pub type FRM_ERR_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `RXFIFO_OVF` reader - This is the enable bit for rxfifo_ovf_int_st register."]
22pub type RXFIFO_OVF_R = crate::BitReader;
23#[doc = "Field `RXFIFO_OVF` writer - This is the enable bit for rxfifo_ovf_int_st register."]
24pub type RXFIFO_OVF_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `DSR_CHG` reader - This is the enable bit for dsr_chg_int_st register."]
26pub type DSR_CHG_R = crate::BitReader;
27#[doc = "Field `DSR_CHG` writer - This is the enable bit for dsr_chg_int_st register."]
28pub type DSR_CHG_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `CTS_CHG` reader - This is the enable bit for cts_chg_int_st register."]
30pub type CTS_CHG_R = crate::BitReader;
31#[doc = "Field `CTS_CHG` writer - This is the enable bit for cts_chg_int_st register."]
32pub type CTS_CHG_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `BRK_DET` reader - This is the enable bit for brk_det_int_st register."]
34pub type BRK_DET_R = crate::BitReader;
35#[doc = "Field `BRK_DET` writer - This is the enable bit for brk_det_int_st register."]
36pub type BRK_DET_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `RXFIFO_TOUT` reader - This is the enable bit for rxfifo_tout_int_st register."]
38pub type RXFIFO_TOUT_R = crate::BitReader;
39#[doc = "Field `RXFIFO_TOUT` writer - This is the enable bit for rxfifo_tout_int_st register."]
40pub type RXFIFO_TOUT_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `SW_XON` reader - This is the enable bit for sw_xon_int_st register."]
42pub type SW_XON_R = crate::BitReader;
43#[doc = "Field `SW_XON` writer - This is the enable bit for sw_xon_int_st register."]
44pub type SW_XON_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `SW_XOFF` reader - This is the enable bit for sw_xoff_int_st register."]
46pub type SW_XOFF_R = crate::BitReader;
47#[doc = "Field `SW_XOFF` writer - This is the enable bit for sw_xoff_int_st register."]
48pub type SW_XOFF_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `GLITCH_DET` reader - This is the enable bit for glitch_det_int_st register."]
50pub type GLITCH_DET_R = crate::BitReader;
51#[doc = "Field `GLITCH_DET` writer - This is the enable bit for glitch_det_int_st register."]
52pub type GLITCH_DET_W<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `TX_BRK_DONE` reader - This is the enable bit for tx_brk_done_int_st register."]
54pub type TX_BRK_DONE_R = crate::BitReader;
55#[doc = "Field `TX_BRK_DONE` writer - This is the enable bit for tx_brk_done_int_st register."]
56pub type TX_BRK_DONE_W<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `TX_BRK_IDLE_DONE` reader - This is the enable bit for tx_brk_idle_done_int_st register."]
58pub type TX_BRK_IDLE_DONE_R = crate::BitReader;
59#[doc = "Field `TX_BRK_IDLE_DONE` writer - This is the enable bit for tx_brk_idle_done_int_st register."]
60pub type TX_BRK_IDLE_DONE_W<'a, REG> = crate::BitWriter<'a, REG>;
61#[doc = "Field `TX_DONE` reader - This is the enable bit for tx_done_int_st register."]
62pub type TX_DONE_R = crate::BitReader;
63#[doc = "Field `TX_DONE` writer - This is the enable bit for tx_done_int_st register."]
64pub type TX_DONE_W<'a, REG> = crate::BitWriter<'a, REG>;
65#[doc = "Field `RS485_PARITY_ERR` reader - This is the enable bit for rs485_parity_err_int_st register."]
66pub type RS485_PARITY_ERR_R = crate::BitReader;
67#[doc = "Field `RS485_PARITY_ERR` writer - This is the enable bit for rs485_parity_err_int_st register."]
68pub type RS485_PARITY_ERR_W<'a, REG> = crate::BitWriter<'a, REG>;
69#[doc = "Field `RS485_FRM_ERR` reader - This is the enable bit for rs485_parity_err_int_st register."]
70pub type RS485_FRM_ERR_R = crate::BitReader;
71#[doc = "Field `RS485_FRM_ERR` writer - This is the enable bit for rs485_parity_err_int_st register."]
72pub type RS485_FRM_ERR_W<'a, REG> = crate::BitWriter<'a, REG>;
73#[doc = "Field `RS485_CLASH` reader - This is the enable bit for rs485_clash_int_st register."]
74pub type RS485_CLASH_R = crate::BitReader;
75#[doc = "Field `RS485_CLASH` writer - This is the enable bit for rs485_clash_int_st register."]
76pub type RS485_CLASH_W<'a, REG> = crate::BitWriter<'a, REG>;
77#[doc = "Field `AT_CMD_CHAR_DET` reader - This is the enable bit for at_cmd_char_det_int_st register."]
78pub type AT_CMD_CHAR_DET_R = crate::BitReader;
79#[doc = "Field `AT_CMD_CHAR_DET` writer - This is the enable bit for at_cmd_char_det_int_st register."]
80pub type AT_CMD_CHAR_DET_W<'a, REG> = crate::BitWriter<'a, REG>;
81#[doc = "Field `WAKEUP` reader - This is the enable bit for uart_wakeup_int_st register."]
82pub type WAKEUP_R = crate::BitReader;
83#[doc = "Field `WAKEUP` writer - This is the enable bit for uart_wakeup_int_st register."]
84pub type WAKEUP_W<'a, REG> = crate::BitWriter<'a, REG>;
85impl R {
86 #[doc = "Bit 0 - This is the enable bit for rxfifo_full_int_st register."]
87 #[inline(always)]
88 pub fn rxfifo_full(&self) -> RXFIFO_FULL_R {
89 RXFIFO_FULL_R::new((self.bits & 1) != 0)
90 }
91 #[doc = "Bit 1 - This is the enable bit for txfifo_empty_int_st register."]
92 #[inline(always)]
93 pub fn txfifo_empty(&self) -> TXFIFO_EMPTY_R {
94 TXFIFO_EMPTY_R::new(((self.bits >> 1) & 1) != 0)
95 }
96 #[doc = "Bit 2 - This is the enable bit for parity_err_int_st register."]
97 #[inline(always)]
98 pub fn parity_err(&self) -> PARITY_ERR_R {
99 PARITY_ERR_R::new(((self.bits >> 2) & 1) != 0)
100 }
101 #[doc = "Bit 3 - This is the enable bit for frm_err_int_st register."]
102 #[inline(always)]
103 pub fn frm_err(&self) -> FRM_ERR_R {
104 FRM_ERR_R::new(((self.bits >> 3) & 1) != 0)
105 }
106 #[doc = "Bit 4 - This is the enable bit for rxfifo_ovf_int_st register."]
107 #[inline(always)]
108 pub fn rxfifo_ovf(&self) -> RXFIFO_OVF_R {
109 RXFIFO_OVF_R::new(((self.bits >> 4) & 1) != 0)
110 }
111 #[doc = "Bit 5 - This is the enable bit for dsr_chg_int_st register."]
112 #[inline(always)]
113 pub fn dsr_chg(&self) -> DSR_CHG_R {
114 DSR_CHG_R::new(((self.bits >> 5) & 1) != 0)
115 }
116 #[doc = "Bit 6 - This is the enable bit for cts_chg_int_st register."]
117 #[inline(always)]
118 pub fn cts_chg(&self) -> CTS_CHG_R {
119 CTS_CHG_R::new(((self.bits >> 6) & 1) != 0)
120 }
121 #[doc = "Bit 7 - This is the enable bit for brk_det_int_st register."]
122 #[inline(always)]
123 pub fn brk_det(&self) -> BRK_DET_R {
124 BRK_DET_R::new(((self.bits >> 7) & 1) != 0)
125 }
126 #[doc = "Bit 8 - This is the enable bit for rxfifo_tout_int_st register."]
127 #[inline(always)]
128 pub fn rxfifo_tout(&self) -> RXFIFO_TOUT_R {
129 RXFIFO_TOUT_R::new(((self.bits >> 8) & 1) != 0)
130 }
131 #[doc = "Bit 9 - This is the enable bit for sw_xon_int_st register."]
132 #[inline(always)]
133 pub fn sw_xon(&self) -> SW_XON_R {
134 SW_XON_R::new(((self.bits >> 9) & 1) != 0)
135 }
136 #[doc = "Bit 10 - This is the enable bit for sw_xoff_int_st register."]
137 #[inline(always)]
138 pub fn sw_xoff(&self) -> SW_XOFF_R {
139 SW_XOFF_R::new(((self.bits >> 10) & 1) != 0)
140 }
141 #[doc = "Bit 11 - This is the enable bit for glitch_det_int_st register."]
142 #[inline(always)]
143 pub fn glitch_det(&self) -> GLITCH_DET_R {
144 GLITCH_DET_R::new(((self.bits >> 11) & 1) != 0)
145 }
146 #[doc = "Bit 12 - This is the enable bit for tx_brk_done_int_st register."]
147 #[inline(always)]
148 pub fn tx_brk_done(&self) -> TX_BRK_DONE_R {
149 TX_BRK_DONE_R::new(((self.bits >> 12) & 1) != 0)
150 }
151 #[doc = "Bit 13 - This is the enable bit for tx_brk_idle_done_int_st register."]
152 #[inline(always)]
153 pub fn tx_brk_idle_done(&self) -> TX_BRK_IDLE_DONE_R {
154 TX_BRK_IDLE_DONE_R::new(((self.bits >> 13) & 1) != 0)
155 }
156 #[doc = "Bit 14 - This is the enable bit for tx_done_int_st register."]
157 #[inline(always)]
158 pub fn tx_done(&self) -> TX_DONE_R {
159 TX_DONE_R::new(((self.bits >> 14) & 1) != 0)
160 }
161 #[doc = "Bit 15 - This is the enable bit for rs485_parity_err_int_st register."]
162 #[inline(always)]
163 pub fn rs485_parity_err(&self) -> RS485_PARITY_ERR_R {
164 RS485_PARITY_ERR_R::new(((self.bits >> 15) & 1) != 0)
165 }
166 #[doc = "Bit 16 - This is the enable bit for rs485_parity_err_int_st register."]
167 #[inline(always)]
168 pub fn rs485_frm_err(&self) -> RS485_FRM_ERR_R {
169 RS485_FRM_ERR_R::new(((self.bits >> 16) & 1) != 0)
170 }
171 #[doc = "Bit 17 - This is the enable bit for rs485_clash_int_st register."]
172 #[inline(always)]
173 pub fn rs485_clash(&self) -> RS485_CLASH_R {
174 RS485_CLASH_R::new(((self.bits >> 17) & 1) != 0)
175 }
176 #[doc = "Bit 18 - This is the enable bit for at_cmd_char_det_int_st register."]
177 #[inline(always)]
178 pub fn at_cmd_char_det(&self) -> AT_CMD_CHAR_DET_R {
179 AT_CMD_CHAR_DET_R::new(((self.bits >> 18) & 1) != 0)
180 }
181 #[doc = "Bit 19 - This is the enable bit for uart_wakeup_int_st register."]
182 #[inline(always)]
183 pub fn wakeup(&self) -> WAKEUP_R {
184 WAKEUP_R::new(((self.bits >> 19) & 1) != 0)
185 }
186}
187#[cfg(feature = "impl-register-debug")]
188impl core::fmt::Debug for R {
189 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
190 f.debug_struct("INT_ENA")
191 .field("rxfifo_full", &self.rxfifo_full())
192 .field("txfifo_empty", &self.txfifo_empty())
193 .field("parity_err", &self.parity_err())
194 .field("frm_err", &self.frm_err())
195 .field("rxfifo_ovf", &self.rxfifo_ovf())
196 .field("dsr_chg", &self.dsr_chg())
197 .field("cts_chg", &self.cts_chg())
198 .field("brk_det", &self.brk_det())
199 .field("rxfifo_tout", &self.rxfifo_tout())
200 .field("sw_xon", &self.sw_xon())
201 .field("sw_xoff", &self.sw_xoff())
202 .field("glitch_det", &self.glitch_det())
203 .field("tx_brk_done", &self.tx_brk_done())
204 .field("tx_brk_idle_done", &self.tx_brk_idle_done())
205 .field("tx_done", &self.tx_done())
206 .field("rs485_parity_err", &self.rs485_parity_err())
207 .field("rs485_frm_err", &self.rs485_frm_err())
208 .field("rs485_clash", &self.rs485_clash())
209 .field("at_cmd_char_det", &self.at_cmd_char_det())
210 .field("wakeup", &self.wakeup())
211 .finish()
212 }
213}
214impl W {
215 #[doc = "Bit 0 - This is the enable bit for rxfifo_full_int_st register."]
216 #[inline(always)]
217 pub fn rxfifo_full(&mut self) -> RXFIFO_FULL_W<INT_ENA_SPEC> {
218 RXFIFO_FULL_W::new(self, 0)
219 }
220 #[doc = "Bit 1 - This is the enable bit for txfifo_empty_int_st register."]
221 #[inline(always)]
222 pub fn txfifo_empty(&mut self) -> TXFIFO_EMPTY_W<INT_ENA_SPEC> {
223 TXFIFO_EMPTY_W::new(self, 1)
224 }
225 #[doc = "Bit 2 - This is the enable bit for parity_err_int_st register."]
226 #[inline(always)]
227 pub fn parity_err(&mut self) -> PARITY_ERR_W<INT_ENA_SPEC> {
228 PARITY_ERR_W::new(self, 2)
229 }
230 #[doc = "Bit 3 - This is the enable bit for frm_err_int_st register."]
231 #[inline(always)]
232 pub fn frm_err(&mut self) -> FRM_ERR_W<INT_ENA_SPEC> {
233 FRM_ERR_W::new(self, 3)
234 }
235 #[doc = "Bit 4 - This is the enable bit for rxfifo_ovf_int_st register."]
236 #[inline(always)]
237 pub fn rxfifo_ovf(&mut self) -> RXFIFO_OVF_W<INT_ENA_SPEC> {
238 RXFIFO_OVF_W::new(self, 4)
239 }
240 #[doc = "Bit 5 - This is the enable bit for dsr_chg_int_st register."]
241 #[inline(always)]
242 pub fn dsr_chg(&mut self) -> DSR_CHG_W<INT_ENA_SPEC> {
243 DSR_CHG_W::new(self, 5)
244 }
245 #[doc = "Bit 6 - This is the enable bit for cts_chg_int_st register."]
246 #[inline(always)]
247 pub fn cts_chg(&mut self) -> CTS_CHG_W<INT_ENA_SPEC> {
248 CTS_CHG_W::new(self, 6)
249 }
250 #[doc = "Bit 7 - This is the enable bit for brk_det_int_st register."]
251 #[inline(always)]
252 pub fn brk_det(&mut self) -> BRK_DET_W<INT_ENA_SPEC> {
253 BRK_DET_W::new(self, 7)
254 }
255 #[doc = "Bit 8 - This is the enable bit for rxfifo_tout_int_st register."]
256 #[inline(always)]
257 pub fn rxfifo_tout(&mut self) -> RXFIFO_TOUT_W<INT_ENA_SPEC> {
258 RXFIFO_TOUT_W::new(self, 8)
259 }
260 #[doc = "Bit 9 - This is the enable bit for sw_xon_int_st register."]
261 #[inline(always)]
262 pub fn sw_xon(&mut self) -> SW_XON_W<INT_ENA_SPEC> {
263 SW_XON_W::new(self, 9)
264 }
265 #[doc = "Bit 10 - This is the enable bit for sw_xoff_int_st register."]
266 #[inline(always)]
267 pub fn sw_xoff(&mut self) -> SW_XOFF_W<INT_ENA_SPEC> {
268 SW_XOFF_W::new(self, 10)
269 }
270 #[doc = "Bit 11 - This is the enable bit for glitch_det_int_st register."]
271 #[inline(always)]
272 pub fn glitch_det(&mut self) -> GLITCH_DET_W<INT_ENA_SPEC> {
273 GLITCH_DET_W::new(self, 11)
274 }
275 #[doc = "Bit 12 - This is the enable bit for tx_brk_done_int_st register."]
276 #[inline(always)]
277 pub fn tx_brk_done(&mut self) -> TX_BRK_DONE_W<INT_ENA_SPEC> {
278 TX_BRK_DONE_W::new(self, 12)
279 }
280 #[doc = "Bit 13 - This is the enable bit for tx_brk_idle_done_int_st register."]
281 #[inline(always)]
282 pub fn tx_brk_idle_done(&mut self) -> TX_BRK_IDLE_DONE_W<INT_ENA_SPEC> {
283 TX_BRK_IDLE_DONE_W::new(self, 13)
284 }
285 #[doc = "Bit 14 - This is the enable bit for tx_done_int_st register."]
286 #[inline(always)]
287 pub fn tx_done(&mut self) -> TX_DONE_W<INT_ENA_SPEC> {
288 TX_DONE_W::new(self, 14)
289 }
290 #[doc = "Bit 15 - This is the enable bit for rs485_parity_err_int_st register."]
291 #[inline(always)]
292 pub fn rs485_parity_err(&mut self) -> RS485_PARITY_ERR_W<INT_ENA_SPEC> {
293 RS485_PARITY_ERR_W::new(self, 15)
294 }
295 #[doc = "Bit 16 - This is the enable bit for rs485_parity_err_int_st register."]
296 #[inline(always)]
297 pub fn rs485_frm_err(&mut self) -> RS485_FRM_ERR_W<INT_ENA_SPEC> {
298 RS485_FRM_ERR_W::new(self, 16)
299 }
300 #[doc = "Bit 17 - This is the enable bit for rs485_clash_int_st register."]
301 #[inline(always)]
302 pub fn rs485_clash(&mut self) -> RS485_CLASH_W<INT_ENA_SPEC> {
303 RS485_CLASH_W::new(self, 17)
304 }
305 #[doc = "Bit 18 - This is the enable bit for at_cmd_char_det_int_st register."]
306 #[inline(always)]
307 pub fn at_cmd_char_det(&mut self) -> AT_CMD_CHAR_DET_W<INT_ENA_SPEC> {
308 AT_CMD_CHAR_DET_W::new(self, 18)
309 }
310 #[doc = "Bit 19 - This is the enable bit for uart_wakeup_int_st register."]
311 #[inline(always)]
312 pub fn wakeup(&mut self) -> WAKEUP_W<INT_ENA_SPEC> {
313 WAKEUP_W::new(self, 19)
314 }
315}
316#[doc = "Interrupt enable bits\n\nYou can [`read`](crate::Reg::read) this register and get [`int_ena::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_ena::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
317pub struct INT_ENA_SPEC;
318impl crate::RegisterSpec for INT_ENA_SPEC {
319 type Ux = u32;
320}
321#[doc = "`read()` method returns [`int_ena::R`](R) reader structure"]
322impl crate::Readable for INT_ENA_SPEC {}
323#[doc = "`write(|w| ..)` method takes [`int_ena::W`](W) writer structure"]
324impl crate::Writable for INT_ENA_SPEC {
325 type Safety = crate::Unsafe;
326 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
327 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
328}
329#[doc = "`reset()` method sets INT_ENA to value 0"]
330impl crate::Resettable for INT_ENA_SPEC {
331 const RESET_VALUE: u32 = 0;
332}