esp32c6_lp/lp_uart/
int_raw.rs1#[doc = "Register `INT_RAW` reader"]
2pub type R = crate::R<INT_RAW_SPEC>;
3#[doc = "Register `INT_RAW` writer"]
4pub type W = crate::W<INT_RAW_SPEC>;
5#[doc = "Field `RXFIFO_FULL` reader - This interrupt raw bit turns to high level when receiver receives more data than what rxfifo_full_thrhd specifies."]
6pub type RXFIFO_FULL_R = crate::BitReader;
7#[doc = "Field `RXFIFO_FULL` writer - This interrupt raw bit turns to high level when receiver receives more data than what rxfifo_full_thrhd specifies."]
8pub type RXFIFO_FULL_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `TXFIFO_EMPTY` reader - This interrupt raw bit turns to high level when the amount of data in Tx-FIFO is less than what txfifo_empty_thrhd specifies ."]
10pub type TXFIFO_EMPTY_R = crate::BitReader;
11#[doc = "Field `TXFIFO_EMPTY` writer - This interrupt raw bit turns to high level when the amount of data in Tx-FIFO is less than what txfifo_empty_thrhd specifies ."]
12pub type TXFIFO_EMPTY_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `PARITY_ERR` reader - This interrupt raw bit turns to high level when receiver detects a parity error in the data."]
14pub type PARITY_ERR_R = crate::BitReader;
15#[doc = "Field `PARITY_ERR` writer - This interrupt raw bit turns to high level when receiver detects a parity error in the data."]
16pub type PARITY_ERR_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `FRM_ERR` reader - This interrupt raw bit turns to high level when receiver detects a data frame error ."]
18pub type FRM_ERR_R = crate::BitReader;
19#[doc = "Field `FRM_ERR` writer - This interrupt raw bit turns to high level when receiver detects a data frame error ."]
20pub type FRM_ERR_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `RXFIFO_OVF` reader - This interrupt raw bit turns to high level when receiver receives more data than the FIFO can store."]
22pub type RXFIFO_OVF_R = crate::BitReader;
23#[doc = "Field `RXFIFO_OVF` writer - This interrupt raw bit turns to high level when receiver receives more data than the FIFO can store."]
24pub type RXFIFO_OVF_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `DSR_CHG` reader - This interrupt raw bit turns to high level when receiver detects the edge change of DSRn signal."]
26pub type DSR_CHG_R = crate::BitReader;
27#[doc = "Field `DSR_CHG` writer - This interrupt raw bit turns to high level when receiver detects the edge change of DSRn signal."]
28pub type DSR_CHG_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `CTS_CHG` reader - This interrupt raw bit turns to high level when receiver detects the edge change of CTSn signal."]
30pub type CTS_CHG_R = crate::BitReader;
31#[doc = "Field `CTS_CHG` writer - This interrupt raw bit turns to high level when receiver detects the edge change of CTSn signal."]
32pub type CTS_CHG_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `BRK_DET` reader - This interrupt raw bit turns to high level when receiver detects a 0 after the stop bit."]
34pub type BRK_DET_R = crate::BitReader;
35#[doc = "Field `BRK_DET` writer - This interrupt raw bit turns to high level when receiver detects a 0 after the stop bit."]
36pub type BRK_DET_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `RXFIFO_TOUT` reader - This interrupt raw bit turns to high level when receiver takes more time than rx_tout_thrhd to receive a byte."]
38pub type RXFIFO_TOUT_R = crate::BitReader;
39#[doc = "Field `RXFIFO_TOUT` writer - This interrupt raw bit turns to high level when receiver takes more time than rx_tout_thrhd to receive a byte."]
40pub type RXFIFO_TOUT_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `SW_XON` reader - This interrupt raw bit turns to high level when receiver recevies Xon char when uart_sw_flow_con_en is set to 1."]
42pub type SW_XON_R = crate::BitReader;
43#[doc = "Field `SW_XON` writer - This interrupt raw bit turns to high level when receiver recevies Xon char when uart_sw_flow_con_en is set to 1."]
44pub type SW_XON_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `SW_XOFF` reader - This interrupt raw bit turns to high level when receiver receives Xoff char when uart_sw_flow_con_en is set to 1."]
46pub type SW_XOFF_R = crate::BitReader;
47#[doc = "Field `SW_XOFF` writer - This interrupt raw bit turns to high level when receiver receives Xoff char when uart_sw_flow_con_en is set to 1."]
48pub type SW_XOFF_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `GLITCH_DET` reader - This interrupt raw bit turns to high level when receiver detects a glitch in the middle of a start bit."]
50pub type GLITCH_DET_R = crate::BitReader;
51#[doc = "Field `GLITCH_DET` writer - This interrupt raw bit turns to high level when receiver detects a glitch in the middle of a start bit."]
52pub type GLITCH_DET_W<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `TX_BRK_DONE` reader - This interrupt raw bit turns to high level when transmitter completes sending NULL characters after all data in Tx-FIFO are sent."]
54pub type TX_BRK_DONE_R = crate::BitReader;
55#[doc = "Field `TX_BRK_DONE` writer - This interrupt raw bit turns to high level when transmitter completes sending NULL characters after all data in Tx-FIFO are sent."]
56pub type TX_BRK_DONE_W<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `TX_BRK_IDLE_DONE` reader - This interrupt raw bit turns to high level when transmitter has kept the shortest duration after sending the last data."]
58pub type TX_BRK_IDLE_DONE_R = crate::BitReader;
59#[doc = "Field `TX_BRK_IDLE_DONE` writer - This interrupt raw bit turns to high level when transmitter has kept the shortest duration after sending the last data."]
60pub type TX_BRK_IDLE_DONE_W<'a, REG> = crate::BitWriter<'a, REG>;
61#[doc = "Field `TX_DONE` reader - This interrupt raw bit turns to high level when transmitter has send out all data in FIFO."]
62pub type TX_DONE_R = crate::BitReader;
63#[doc = "Field `TX_DONE` writer - This interrupt raw bit turns to high level when transmitter has send out all data in FIFO."]
64pub type TX_DONE_W<'a, REG> = crate::BitWriter<'a, REG>;
65#[doc = "Field `AT_CMD_CHAR_DET` reader - This interrupt raw bit turns to high level when receiver detects the configured at_cmd char."]
66pub type AT_CMD_CHAR_DET_R = crate::BitReader;
67#[doc = "Field `AT_CMD_CHAR_DET` writer - This interrupt raw bit turns to high level when receiver detects the configured at_cmd char."]
68pub type AT_CMD_CHAR_DET_W<'a, REG> = crate::BitWriter<'a, REG>;
69#[doc = "Field `WAKEUP` reader - This interrupt raw bit turns to high level when input rxd edge changes more times than what reg_active_threshold specifies in light sleeping mode."]
70pub type WAKEUP_R = crate::BitReader;
71#[doc = "Field `WAKEUP` writer - This interrupt raw bit turns to high level when input rxd edge changes more times than what reg_active_threshold specifies in light sleeping mode."]
72pub type WAKEUP_W<'a, REG> = crate::BitWriter<'a, REG>;
73impl R {
74 #[doc = "Bit 0 - This interrupt raw bit turns to high level when receiver receives more data than what rxfifo_full_thrhd specifies."]
75 #[inline(always)]
76 pub fn rxfifo_full(&self) -> RXFIFO_FULL_R {
77 RXFIFO_FULL_R::new((self.bits & 1) != 0)
78 }
79 #[doc = "Bit 1 - This interrupt raw bit turns to high level when the amount of data in Tx-FIFO is less than what txfifo_empty_thrhd specifies ."]
80 #[inline(always)]
81 pub fn txfifo_empty(&self) -> TXFIFO_EMPTY_R {
82 TXFIFO_EMPTY_R::new(((self.bits >> 1) & 1) != 0)
83 }
84 #[doc = "Bit 2 - This interrupt raw bit turns to high level when receiver detects a parity error in the data."]
85 #[inline(always)]
86 pub fn parity_err(&self) -> PARITY_ERR_R {
87 PARITY_ERR_R::new(((self.bits >> 2) & 1) != 0)
88 }
89 #[doc = "Bit 3 - This interrupt raw bit turns to high level when receiver detects a data frame error ."]
90 #[inline(always)]
91 pub fn frm_err(&self) -> FRM_ERR_R {
92 FRM_ERR_R::new(((self.bits >> 3) & 1) != 0)
93 }
94 #[doc = "Bit 4 - This interrupt raw bit turns to high level when receiver receives more data than the FIFO can store."]
95 #[inline(always)]
96 pub fn rxfifo_ovf(&self) -> RXFIFO_OVF_R {
97 RXFIFO_OVF_R::new(((self.bits >> 4) & 1) != 0)
98 }
99 #[doc = "Bit 5 - This interrupt raw bit turns to high level when receiver detects the edge change of DSRn signal."]
100 #[inline(always)]
101 pub fn dsr_chg(&self) -> DSR_CHG_R {
102 DSR_CHG_R::new(((self.bits >> 5) & 1) != 0)
103 }
104 #[doc = "Bit 6 - This interrupt raw bit turns to high level when receiver detects the edge change of CTSn signal."]
105 #[inline(always)]
106 pub fn cts_chg(&self) -> CTS_CHG_R {
107 CTS_CHG_R::new(((self.bits >> 6) & 1) != 0)
108 }
109 #[doc = "Bit 7 - This interrupt raw bit turns to high level when receiver detects a 0 after the stop bit."]
110 #[inline(always)]
111 pub fn brk_det(&self) -> BRK_DET_R {
112 BRK_DET_R::new(((self.bits >> 7) & 1) != 0)
113 }
114 #[doc = "Bit 8 - This interrupt raw bit turns to high level when receiver takes more time than rx_tout_thrhd to receive a byte."]
115 #[inline(always)]
116 pub fn rxfifo_tout(&self) -> RXFIFO_TOUT_R {
117 RXFIFO_TOUT_R::new(((self.bits >> 8) & 1) != 0)
118 }
119 #[doc = "Bit 9 - This interrupt raw bit turns to high level when receiver recevies Xon char when uart_sw_flow_con_en is set to 1."]
120 #[inline(always)]
121 pub fn sw_xon(&self) -> SW_XON_R {
122 SW_XON_R::new(((self.bits >> 9) & 1) != 0)
123 }
124 #[doc = "Bit 10 - This interrupt raw bit turns to high level when receiver receives Xoff char when uart_sw_flow_con_en is set to 1."]
125 #[inline(always)]
126 pub fn sw_xoff(&self) -> SW_XOFF_R {
127 SW_XOFF_R::new(((self.bits >> 10) & 1) != 0)
128 }
129 #[doc = "Bit 11 - This interrupt raw bit turns to high level when receiver detects a glitch in the middle of a start bit."]
130 #[inline(always)]
131 pub fn glitch_det(&self) -> GLITCH_DET_R {
132 GLITCH_DET_R::new(((self.bits >> 11) & 1) != 0)
133 }
134 #[doc = "Bit 12 - This interrupt raw bit turns to high level when transmitter completes sending NULL characters after all data in Tx-FIFO are sent."]
135 #[inline(always)]
136 pub fn tx_brk_done(&self) -> TX_BRK_DONE_R {
137 TX_BRK_DONE_R::new(((self.bits >> 12) & 1) != 0)
138 }
139 #[doc = "Bit 13 - This interrupt raw bit turns to high level when transmitter has kept the shortest duration after sending the last data."]
140 #[inline(always)]
141 pub fn tx_brk_idle_done(&self) -> TX_BRK_IDLE_DONE_R {
142 TX_BRK_IDLE_DONE_R::new(((self.bits >> 13) & 1) != 0)
143 }
144 #[doc = "Bit 14 - This interrupt raw bit turns to high level when transmitter has send out all data in FIFO."]
145 #[inline(always)]
146 pub fn tx_done(&self) -> TX_DONE_R {
147 TX_DONE_R::new(((self.bits >> 14) & 1) != 0)
148 }
149 #[doc = "Bit 18 - This interrupt raw bit turns to high level when receiver detects the configured at_cmd char."]
150 #[inline(always)]
151 pub fn at_cmd_char_det(&self) -> AT_CMD_CHAR_DET_R {
152 AT_CMD_CHAR_DET_R::new(((self.bits >> 18) & 1) != 0)
153 }
154 #[doc = "Bit 19 - This interrupt raw bit turns to high level when input rxd edge changes more times than what reg_active_threshold specifies in light sleeping mode."]
155 #[inline(always)]
156 pub fn wakeup(&self) -> WAKEUP_R {
157 WAKEUP_R::new(((self.bits >> 19) & 1) != 0)
158 }
159}
160#[cfg(feature = "impl-register-debug")]
161impl core::fmt::Debug for R {
162 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
163 f.debug_struct("INT_RAW")
164 .field("rxfifo_full", &self.rxfifo_full())
165 .field("txfifo_empty", &self.txfifo_empty())
166 .field("parity_err", &self.parity_err())
167 .field("frm_err", &self.frm_err())
168 .field("rxfifo_ovf", &self.rxfifo_ovf())
169 .field("dsr_chg", &self.dsr_chg())
170 .field("cts_chg", &self.cts_chg())
171 .field("brk_det", &self.brk_det())
172 .field("rxfifo_tout", &self.rxfifo_tout())
173 .field("sw_xon", &self.sw_xon())
174 .field("sw_xoff", &self.sw_xoff())
175 .field("glitch_det", &self.glitch_det())
176 .field("tx_brk_done", &self.tx_brk_done())
177 .field("tx_brk_idle_done", &self.tx_brk_idle_done())
178 .field("tx_done", &self.tx_done())
179 .field("at_cmd_char_det", &self.at_cmd_char_det())
180 .field("wakeup", &self.wakeup())
181 .finish()
182 }
183}
184impl W {
185 #[doc = "Bit 0 - This interrupt raw bit turns to high level when receiver receives more data than what rxfifo_full_thrhd specifies."]
186 #[inline(always)]
187 #[must_use]
188 pub fn rxfifo_full(&mut self) -> RXFIFO_FULL_W<INT_RAW_SPEC> {
189 RXFIFO_FULL_W::new(self, 0)
190 }
191 #[doc = "Bit 1 - This interrupt raw bit turns to high level when the amount of data in Tx-FIFO is less than what txfifo_empty_thrhd specifies ."]
192 #[inline(always)]
193 #[must_use]
194 pub fn txfifo_empty(&mut self) -> TXFIFO_EMPTY_W<INT_RAW_SPEC> {
195 TXFIFO_EMPTY_W::new(self, 1)
196 }
197 #[doc = "Bit 2 - This interrupt raw bit turns to high level when receiver detects a parity error in the data."]
198 #[inline(always)]
199 #[must_use]
200 pub fn parity_err(&mut self) -> PARITY_ERR_W<INT_RAW_SPEC> {
201 PARITY_ERR_W::new(self, 2)
202 }
203 #[doc = "Bit 3 - This interrupt raw bit turns to high level when receiver detects a data frame error ."]
204 #[inline(always)]
205 #[must_use]
206 pub fn frm_err(&mut self) -> FRM_ERR_W<INT_RAW_SPEC> {
207 FRM_ERR_W::new(self, 3)
208 }
209 #[doc = "Bit 4 - This interrupt raw bit turns to high level when receiver receives more data than the FIFO can store."]
210 #[inline(always)]
211 #[must_use]
212 pub fn rxfifo_ovf(&mut self) -> RXFIFO_OVF_W<INT_RAW_SPEC> {
213 RXFIFO_OVF_W::new(self, 4)
214 }
215 #[doc = "Bit 5 - This interrupt raw bit turns to high level when receiver detects the edge change of DSRn signal."]
216 #[inline(always)]
217 #[must_use]
218 pub fn dsr_chg(&mut self) -> DSR_CHG_W<INT_RAW_SPEC> {
219 DSR_CHG_W::new(self, 5)
220 }
221 #[doc = "Bit 6 - This interrupt raw bit turns to high level when receiver detects the edge change of CTSn signal."]
222 #[inline(always)]
223 #[must_use]
224 pub fn cts_chg(&mut self) -> CTS_CHG_W<INT_RAW_SPEC> {
225 CTS_CHG_W::new(self, 6)
226 }
227 #[doc = "Bit 7 - This interrupt raw bit turns to high level when receiver detects a 0 after the stop bit."]
228 #[inline(always)]
229 #[must_use]
230 pub fn brk_det(&mut self) -> BRK_DET_W<INT_RAW_SPEC> {
231 BRK_DET_W::new(self, 7)
232 }
233 #[doc = "Bit 8 - This interrupt raw bit turns to high level when receiver takes more time than rx_tout_thrhd to receive a byte."]
234 #[inline(always)]
235 #[must_use]
236 pub fn rxfifo_tout(&mut self) -> RXFIFO_TOUT_W<INT_RAW_SPEC> {
237 RXFIFO_TOUT_W::new(self, 8)
238 }
239 #[doc = "Bit 9 - This interrupt raw bit turns to high level when receiver recevies Xon char when uart_sw_flow_con_en is set to 1."]
240 #[inline(always)]
241 #[must_use]
242 pub fn sw_xon(&mut self) -> SW_XON_W<INT_RAW_SPEC> {
243 SW_XON_W::new(self, 9)
244 }
245 #[doc = "Bit 10 - This interrupt raw bit turns to high level when receiver receives Xoff char when uart_sw_flow_con_en is set to 1."]
246 #[inline(always)]
247 #[must_use]
248 pub fn sw_xoff(&mut self) -> SW_XOFF_W<INT_RAW_SPEC> {
249 SW_XOFF_W::new(self, 10)
250 }
251 #[doc = "Bit 11 - This interrupt raw bit turns to high level when receiver detects a glitch in the middle of a start bit."]
252 #[inline(always)]
253 #[must_use]
254 pub fn glitch_det(&mut self) -> GLITCH_DET_W<INT_RAW_SPEC> {
255 GLITCH_DET_W::new(self, 11)
256 }
257 #[doc = "Bit 12 - This interrupt raw bit turns to high level when transmitter completes sending NULL characters after all data in Tx-FIFO are sent."]
258 #[inline(always)]
259 #[must_use]
260 pub fn tx_brk_done(&mut self) -> TX_BRK_DONE_W<INT_RAW_SPEC> {
261 TX_BRK_DONE_W::new(self, 12)
262 }
263 #[doc = "Bit 13 - This interrupt raw bit turns to high level when transmitter has kept the shortest duration after sending the last data."]
264 #[inline(always)]
265 #[must_use]
266 pub fn tx_brk_idle_done(&mut self) -> TX_BRK_IDLE_DONE_W<INT_RAW_SPEC> {
267 TX_BRK_IDLE_DONE_W::new(self, 13)
268 }
269 #[doc = "Bit 14 - This interrupt raw bit turns to high level when transmitter has send out all data in FIFO."]
270 #[inline(always)]
271 #[must_use]
272 pub fn tx_done(&mut self) -> TX_DONE_W<INT_RAW_SPEC> {
273 TX_DONE_W::new(self, 14)
274 }
275 #[doc = "Bit 18 - This interrupt raw bit turns to high level when receiver detects the configured at_cmd char."]
276 #[inline(always)]
277 #[must_use]
278 pub fn at_cmd_char_det(&mut self) -> AT_CMD_CHAR_DET_W<INT_RAW_SPEC> {
279 AT_CMD_CHAR_DET_W::new(self, 18)
280 }
281 #[doc = "Bit 19 - This interrupt raw bit turns to high level when input rxd edge changes more times than what reg_active_threshold specifies in light sleeping mode."]
282 #[inline(always)]
283 #[must_use]
284 pub fn wakeup(&mut self) -> WAKEUP_W<INT_RAW_SPEC> {
285 WAKEUP_W::new(self, 19)
286 }
287}
288#[doc = "Raw interrupt status\n\nYou can [`read`](crate::Reg::read) this register and get [`int_raw::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_raw::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
289pub struct INT_RAW_SPEC;
290impl crate::RegisterSpec for INT_RAW_SPEC {
291 type Ux = u32;
292}
293#[doc = "`read()` method returns [`int_raw::R`](R) reader structure"]
294impl crate::Readable for INT_RAW_SPEC {}
295#[doc = "`write(|w| ..)` method takes [`int_raw::W`](W) writer structure"]
296impl crate::Writable for INT_RAW_SPEC {
297 type Safety = crate::Unsafe;
298 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
299 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
300}
301#[doc = "`reset()` method sets INT_RAW to value 0x02"]
302impl crate::Resettable for INT_RAW_SPEC {
303 const RESET_VALUE: u32 = 0x02;
304}