1#[doc = "Register `STAT` reader"]
2pub struct R(crate::R<STAT_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<STAT_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<STAT_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<STAT_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `STAT` writer"]
17pub struct W(crate::W<STAT_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<STAT_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<STAT_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<STAT_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `RXRDY` reader - Receiver Ready flag. When 1, indicates that data is available to be read from the receiver buffer. Cleared after a read of the RXDAT or RXDATSTAT registers."]
38pub struct RXRDY_R(crate::FieldReader<bool, bool>);
39impl RXRDY_R {
40 pub(crate) fn new(bits: bool) -> Self {
41 RXRDY_R(crate::FieldReader::new(bits))
42 }
43}
44impl core::ops::Deref for RXRDY_R {
45 type Target = crate::FieldReader<bool, bool>;
46 #[inline(always)]
47 fn deref(&self) -> &Self::Target {
48 &self.0
49 }
50}
51#[doc = "Field `RXIDLE` reader - Receiver Idle. When 0, indicates that the receiver is currently in the process of receiving data. When 1, indicates that the receiver is not currently in the process of receiving data."]
52pub struct RXIDLE_R(crate::FieldReader<bool, bool>);
53impl RXIDLE_R {
54 pub(crate) fn new(bits: bool) -> Self {
55 RXIDLE_R(crate::FieldReader::new(bits))
56 }
57}
58impl core::ops::Deref for RXIDLE_R {
59 type Target = crate::FieldReader<bool, bool>;
60 #[inline(always)]
61 fn deref(&self) -> &Self::Target {
62 &self.0
63 }
64}
65#[doc = "Field `TXRDY` reader - Transmitter Ready flag. When 1, this bit indicates that data may be written to the transmit buffer. Previous data may still be in the process of being transmitted. Cleared when data is written to TXDAT. Set when the data is moved from the transmit buffer to the transmit shift register."]
66pub struct TXRDY_R(crate::FieldReader<bool, bool>);
67impl TXRDY_R {
68 pub(crate) fn new(bits: bool) -> Self {
69 TXRDY_R(crate::FieldReader::new(bits))
70 }
71}
72impl core::ops::Deref for TXRDY_R {
73 type Target = crate::FieldReader<bool, bool>;
74 #[inline(always)]
75 fn deref(&self) -> &Self::Target {
76 &self.0
77 }
78}
79#[doc = "Field `TXIDLE` reader - Transmitter Idle. When 0, indicates that the transmitter is currently in the process of sending data.When 1, indicate that the transmitter is not currently in the process of sending data."]
80pub struct TXIDLE_R(crate::FieldReader<bool, bool>);
81impl TXIDLE_R {
82 pub(crate) fn new(bits: bool) -> Self {
83 TXIDLE_R(crate::FieldReader::new(bits))
84 }
85}
86impl core::ops::Deref for TXIDLE_R {
87 type Target = crate::FieldReader<bool, bool>;
88 #[inline(always)]
89 fn deref(&self) -> &Self::Target {
90 &self.0
91 }
92}
93#[doc = "Field `CTS` reader - This bit reflects the current state of the CTS signal, regardless of the setting of the CTSEN bit in the CFG register. This will be the value of the CTS input pin unless loopback mode is enabled."]
94pub struct CTS_R(crate::FieldReader<bool, bool>);
95impl CTS_R {
96 pub(crate) fn new(bits: bool) -> Self {
97 CTS_R(crate::FieldReader::new(bits))
98 }
99}
100impl core::ops::Deref for CTS_R {
101 type Target = crate::FieldReader<bool, bool>;
102 #[inline(always)]
103 fn deref(&self) -> &Self::Target {
104 &self.0
105 }
106}
107#[doc = "Field `DELTACTS` reader - This bit is set when a change in the state is detected for the CTS flag above. This bit is cleared by software."]
108pub struct DELTACTS_R(crate::FieldReader<bool, bool>);
109impl DELTACTS_R {
110 pub(crate) fn new(bits: bool) -> Self {
111 DELTACTS_R(crate::FieldReader::new(bits))
112 }
113}
114impl core::ops::Deref for DELTACTS_R {
115 type Target = crate::FieldReader<bool, bool>;
116 #[inline(always)]
117 fn deref(&self) -> &Self::Target {
118 &self.0
119 }
120}
121#[doc = "Field `DELTACTS` writer - This bit is set when a change in the state is detected for the CTS flag above. This bit is cleared by software."]
122pub struct DELTACTS_W<'a> {
123 w: &'a mut W,
124}
125impl<'a> DELTACTS_W<'a> {
126 #[doc = r"Sets the field bit"]
127 #[inline(always)]
128 pub fn set_bit(self) -> &'a mut W {
129 self.bit(true)
130 }
131 #[doc = r"Clears the field bit"]
132 #[inline(always)]
133 pub fn clear_bit(self) -> &'a mut W {
134 self.bit(false)
135 }
136 #[doc = r"Writes raw bits to the field"]
137 #[inline(always)]
138 pub fn bit(self, value: bool) -> &'a mut W {
139 self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
140 self.w
141 }
142}
143#[doc = "Field `TXDISSTAT` reader - Transmitter Disabled Interrupt flag. When 1, this bit indicates that the USART transmitter is fully idle after being disabled via the TXDIS in the CTL register (TXDIS = 1)."]
144pub struct TXDISSTAT_R(crate::FieldReader<bool, bool>);
145impl TXDISSTAT_R {
146 pub(crate) fn new(bits: bool) -> Self {
147 TXDISSTAT_R(crate::FieldReader::new(bits))
148 }
149}
150impl core::ops::Deref for TXDISSTAT_R {
151 type Target = crate::FieldReader<bool, bool>;
152 #[inline(always)]
153 fn deref(&self) -> &Self::Target {
154 &self.0
155 }
156}
157#[doc = "Field `OVERRUNINT` reader - Overrun Error interrupt flag. This flag is set when a new character is received while the receiver buffer is still in use. If this occurs, the newly received character in the shift register is lost."]
158pub struct OVERRUNINT_R(crate::FieldReader<bool, bool>);
159impl OVERRUNINT_R {
160 pub(crate) fn new(bits: bool) -> Self {
161 OVERRUNINT_R(crate::FieldReader::new(bits))
162 }
163}
164impl core::ops::Deref for OVERRUNINT_R {
165 type Target = crate::FieldReader<bool, bool>;
166 #[inline(always)]
167 fn deref(&self) -> &Self::Target {
168 &self.0
169 }
170}
171#[doc = "Field `OVERRUNINT` writer - Overrun Error interrupt flag. This flag is set when a new character is received while the receiver buffer is still in use. If this occurs, the newly received character in the shift register is lost."]
172pub struct OVERRUNINT_W<'a> {
173 w: &'a mut W,
174}
175impl<'a> OVERRUNINT_W<'a> {
176 #[doc = r"Sets the field bit"]
177 #[inline(always)]
178 pub fn set_bit(self) -> &'a mut W {
179 self.bit(true)
180 }
181 #[doc = r"Clears the field bit"]
182 #[inline(always)]
183 pub fn clear_bit(self) -> &'a mut W {
184 self.bit(false)
185 }
186 #[doc = r"Writes raw bits to the field"]
187 #[inline(always)]
188 pub fn bit(self, value: bool) -> &'a mut W {
189 self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
190 self.w
191 }
192}
193#[doc = "Field `RXBRK` reader - Received Break. This bit reflects the current state of the receiver break detection logic. It is set when the Un_RXD pin remains low for 16 bit times. Note that FRAMERRINT will also be set when this condition occurs because the stop bit(s) for the character would be missing. RXBRK is cleared when the Un_RXD pin goes high."]
194pub struct RXBRK_R(crate::FieldReader<bool, bool>);
195impl RXBRK_R {
196 pub(crate) fn new(bits: bool) -> Self {
197 RXBRK_R(crate::FieldReader::new(bits))
198 }
199}
200impl core::ops::Deref for RXBRK_R {
201 type Target = crate::FieldReader<bool, bool>;
202 #[inline(always)]
203 fn deref(&self) -> &Self::Target {
204 &self.0
205 }
206}
207#[doc = "Field `DELTARXBRK` reader - This bit is set when a change in the state of receiver break detection occurs.Cleared by software."]
208pub struct DELTARXBRK_R(crate::FieldReader<bool, bool>);
209impl DELTARXBRK_R {
210 pub(crate) fn new(bits: bool) -> Self {
211 DELTARXBRK_R(crate::FieldReader::new(bits))
212 }
213}
214impl core::ops::Deref for DELTARXBRK_R {
215 type Target = crate::FieldReader<bool, bool>;
216 #[inline(always)]
217 fn deref(&self) -> &Self::Target {
218 &self.0
219 }
220}
221#[doc = "Field `DELTARXBRK` writer - This bit is set when a change in the state of receiver break detection occurs.Cleared by software."]
222pub struct DELTARXBRK_W<'a> {
223 w: &'a mut W,
224}
225impl<'a> DELTARXBRK_W<'a> {
226 #[doc = r"Sets the field bit"]
227 #[inline(always)]
228 pub fn set_bit(self) -> &'a mut W {
229 self.bit(true)
230 }
231 #[doc = r"Clears the field bit"]
232 #[inline(always)]
233 pub fn clear_bit(self) -> &'a mut W {
234 self.bit(false)
235 }
236 #[doc = r"Writes raw bits to the field"]
237 #[inline(always)]
238 pub fn bit(self, value: bool) -> &'a mut W {
239 self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
240 self.w
241 }
242}
243#[doc = "Field `START` reader - This bit is set when a start is detected on the receiver input. Its purpose is primarily to allow wake-up from Deep-sleep or Power-down mode immediately when a start is detected. Cleared by software."]
244pub struct START_R(crate::FieldReader<bool, bool>);
245impl START_R {
246 pub(crate) fn new(bits: bool) -> Self {
247 START_R(crate::FieldReader::new(bits))
248 }
249}
250impl core::ops::Deref for START_R {
251 type Target = crate::FieldReader<bool, bool>;
252 #[inline(always)]
253 fn deref(&self) -> &Self::Target {
254 &self.0
255 }
256}
257#[doc = "Field `START` writer - This bit is set when a start is detected on the receiver input. Its purpose is primarily to allow wake-up from Deep-sleep or Power-down mode immediately when a start is detected. Cleared by software."]
258pub struct START_W<'a> {
259 w: &'a mut W,
260}
261impl<'a> START_W<'a> {
262 #[doc = r"Sets the field bit"]
263 #[inline(always)]
264 pub fn set_bit(self) -> &'a mut W {
265 self.bit(true)
266 }
267 #[doc = r"Clears the field bit"]
268 #[inline(always)]
269 pub fn clear_bit(self) -> &'a mut W {
270 self.bit(false)
271 }
272 #[doc = r"Writes raw bits to the field"]
273 #[inline(always)]
274 pub fn bit(self, value: bool) -> &'a mut W {
275 self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12);
276 self.w
277 }
278}
279#[doc = "Field `FRAMERRINT` reader - Framing Error interrupt flag. This flag is set when a character is received with a missing stop bit at the expected location. This could be an indication of a baud rate or configuration mismatch with the transmitting source."]
280pub struct FRAMERRINT_R(crate::FieldReader<bool, bool>);
281impl FRAMERRINT_R {
282 pub(crate) fn new(bits: bool) -> Self {
283 FRAMERRINT_R(crate::FieldReader::new(bits))
284 }
285}
286impl core::ops::Deref for FRAMERRINT_R {
287 type Target = crate::FieldReader<bool, bool>;
288 #[inline(always)]
289 fn deref(&self) -> &Self::Target {
290 &self.0
291 }
292}
293#[doc = "Field `FRAMERRINT` writer - Framing Error interrupt flag. This flag is set when a character is received with a missing stop bit at the expected location. This could be an indication of a baud rate or configuration mismatch with the transmitting source."]
294pub struct FRAMERRINT_W<'a> {
295 w: &'a mut W,
296}
297impl<'a> FRAMERRINT_W<'a> {
298 #[doc = r"Sets the field bit"]
299 #[inline(always)]
300 pub fn set_bit(self) -> &'a mut W {
301 self.bit(true)
302 }
303 #[doc = r"Clears the field bit"]
304 #[inline(always)]
305 pub fn clear_bit(self) -> &'a mut W {
306 self.bit(false)
307 }
308 #[doc = r"Writes raw bits to the field"]
309 #[inline(always)]
310 pub fn bit(self, value: bool) -> &'a mut W {
311 self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13);
312 self.w
313 }
314}
315#[doc = "Field `PARITYERRINT` reader - Parity Error interrupt flag. This flag is set when a parity error is detected in a received character."]
316pub struct PARITYERRINT_R(crate::FieldReader<bool, bool>);
317impl PARITYERRINT_R {
318 pub(crate) fn new(bits: bool) -> Self {
319 PARITYERRINT_R(crate::FieldReader::new(bits))
320 }
321}
322impl core::ops::Deref for PARITYERRINT_R {
323 type Target = crate::FieldReader<bool, bool>;
324 #[inline(always)]
325 fn deref(&self) -> &Self::Target {
326 &self.0
327 }
328}
329#[doc = "Field `PARITYERRINT` writer - Parity Error interrupt flag. This flag is set when a parity error is detected in a received character."]
330pub struct PARITYERRINT_W<'a> {
331 w: &'a mut W,
332}
333impl<'a> PARITYERRINT_W<'a> {
334 #[doc = r"Sets the field bit"]
335 #[inline(always)]
336 pub fn set_bit(self) -> &'a mut W {
337 self.bit(true)
338 }
339 #[doc = r"Clears the field bit"]
340 #[inline(always)]
341 pub fn clear_bit(self) -> &'a mut W {
342 self.bit(false)
343 }
344 #[doc = r"Writes raw bits to the field"]
345 #[inline(always)]
346 pub fn bit(self, value: bool) -> &'a mut W {
347 self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14);
348 self.w
349 }
350}
351#[doc = "Field `RXNOISEINT` reader - Received Noise interrupt flag. Three samples of received data are taken in order to determine the value of each received data bit, except in synchronous mode. This acts as a noise filter if one sample disagrees. This flag is set when a received data bit contains one disagreeing sample. This could indicate line noise, a baud rate or character format mismatch, or loss of synchronization during data reception."]
352pub struct RXNOISEINT_R(crate::FieldReader<bool, bool>);
353impl RXNOISEINT_R {
354 pub(crate) fn new(bits: bool) -> Self {
355 RXNOISEINT_R(crate::FieldReader::new(bits))
356 }
357}
358impl core::ops::Deref for RXNOISEINT_R {
359 type Target = crate::FieldReader<bool, bool>;
360 #[inline(always)]
361 fn deref(&self) -> &Self::Target {
362 &self.0
363 }
364}
365#[doc = "Field `RXNOISEINT` writer - Received Noise interrupt flag. Three samples of received data are taken in order to determine the value of each received data bit, except in synchronous mode. This acts as a noise filter if one sample disagrees. This flag is set when a received data bit contains one disagreeing sample. This could indicate line noise, a baud rate or character format mismatch, or loss of synchronization during data reception."]
366pub struct RXNOISEINT_W<'a> {
367 w: &'a mut W,
368}
369impl<'a> RXNOISEINT_W<'a> {
370 #[doc = r"Sets the field bit"]
371 #[inline(always)]
372 pub fn set_bit(self) -> &'a mut W {
373 self.bit(true)
374 }
375 #[doc = r"Clears the field bit"]
376 #[inline(always)]
377 pub fn clear_bit(self) -> &'a mut W {
378 self.bit(false)
379 }
380 #[doc = r"Writes raw bits to the field"]
381 #[inline(always)]
382 pub fn bit(self, value: bool) -> &'a mut W {
383 self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15);
384 self.w
385 }
386}
387#[doc = "Field `ABERR` reader - Autobaud Error. An autobaud error can occur if the BRG counts to its limit before the end of the start bit that is being measured, essentially an autobaud time-out."]
388pub struct ABERR_R(crate::FieldReader<bool, bool>);
389impl ABERR_R {
390 pub(crate) fn new(bits: bool) -> Self {
391 ABERR_R(crate::FieldReader::new(bits))
392 }
393}
394impl core::ops::Deref for ABERR_R {
395 type Target = crate::FieldReader<bool, bool>;
396 #[inline(always)]
397 fn deref(&self) -> &Self::Target {
398 &self.0
399 }
400}
401#[doc = "Field `ABERR` writer - Autobaud Error. An autobaud error can occur if the BRG counts to its limit before the end of the start bit that is being measured, essentially an autobaud time-out."]
402pub struct ABERR_W<'a> {
403 w: &'a mut W,
404}
405impl<'a> ABERR_W<'a> {
406 #[doc = r"Sets the field bit"]
407 #[inline(always)]
408 pub fn set_bit(self) -> &'a mut W {
409 self.bit(true)
410 }
411 #[doc = r"Clears the field bit"]
412 #[inline(always)]
413 pub fn clear_bit(self) -> &'a mut W {
414 self.bit(false)
415 }
416 #[doc = r"Writes raw bits to the field"]
417 #[inline(always)]
418 pub fn bit(self, value: bool) -> &'a mut W {
419 self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16);
420 self.w
421 }
422}
423impl R {
424 #[doc = "Bit 0 - Receiver Ready flag. When 1, indicates that data is available to be read from the receiver buffer. Cleared after a read of the RXDAT or RXDATSTAT registers."]
425 #[inline(always)]
426 pub fn rxrdy(&self) -> RXRDY_R {
427 RXRDY_R::new((self.bits & 0x01) != 0)
428 }
429 #[doc = "Bit 1 - Receiver Idle. When 0, indicates that the receiver is currently in the process of receiving data. When 1, indicates that the receiver is not currently in the process of receiving data."]
430 #[inline(always)]
431 pub fn rxidle(&self) -> RXIDLE_R {
432 RXIDLE_R::new(((self.bits >> 1) & 0x01) != 0)
433 }
434 #[doc = "Bit 2 - Transmitter Ready flag. When 1, this bit indicates that data may be written to the transmit buffer. Previous data may still be in the process of being transmitted. Cleared when data is written to TXDAT. Set when the data is moved from the transmit buffer to the transmit shift register."]
435 #[inline(always)]
436 pub fn txrdy(&self) -> TXRDY_R {
437 TXRDY_R::new(((self.bits >> 2) & 0x01) != 0)
438 }
439 #[doc = "Bit 3 - Transmitter Idle. When 0, indicates that the transmitter is currently in the process of sending data.When 1, indicate that the transmitter is not currently in the process of sending data."]
440 #[inline(always)]
441 pub fn txidle(&self) -> TXIDLE_R {
442 TXIDLE_R::new(((self.bits >> 3) & 0x01) != 0)
443 }
444 #[doc = "Bit 4 - This bit reflects the current state of the CTS signal, regardless of the setting of the CTSEN bit in the CFG register. This will be the value of the CTS input pin unless loopback mode is enabled."]
445 #[inline(always)]
446 pub fn cts(&self) -> CTS_R {
447 CTS_R::new(((self.bits >> 4) & 0x01) != 0)
448 }
449 #[doc = "Bit 5 - This bit is set when a change in the state is detected for the CTS flag above. This bit is cleared by software."]
450 #[inline(always)]
451 pub fn deltacts(&self) -> DELTACTS_R {
452 DELTACTS_R::new(((self.bits >> 5) & 0x01) != 0)
453 }
454 #[doc = "Bit 6 - Transmitter Disabled Interrupt flag. When 1, this bit indicates that the USART transmitter is fully idle after being disabled via the TXDIS in the CTL register (TXDIS = 1)."]
455 #[inline(always)]
456 pub fn txdisstat(&self) -> TXDISSTAT_R {
457 TXDISSTAT_R::new(((self.bits >> 6) & 0x01) != 0)
458 }
459 #[doc = "Bit 8 - Overrun Error interrupt flag. This flag is set when a new character is received while the receiver buffer is still in use. If this occurs, the newly received character in the shift register is lost."]
460 #[inline(always)]
461 pub fn overrunint(&self) -> OVERRUNINT_R {
462 OVERRUNINT_R::new(((self.bits >> 8) & 0x01) != 0)
463 }
464 #[doc = "Bit 10 - Received Break. This bit reflects the current state of the receiver break detection logic. It is set when the Un_RXD pin remains low for 16 bit times. Note that FRAMERRINT will also be set when this condition occurs because the stop bit(s) for the character would be missing. RXBRK is cleared when the Un_RXD pin goes high."]
465 #[inline(always)]
466 pub fn rxbrk(&self) -> RXBRK_R {
467 RXBRK_R::new(((self.bits >> 10) & 0x01) != 0)
468 }
469 #[doc = "Bit 11 - This bit is set when a change in the state of receiver break detection occurs.Cleared by software."]
470 #[inline(always)]
471 pub fn deltarxbrk(&self) -> DELTARXBRK_R {
472 DELTARXBRK_R::new(((self.bits >> 11) & 0x01) != 0)
473 }
474 #[doc = "Bit 12 - This bit is set when a start is detected on the receiver input. Its purpose is primarily to allow wake-up from Deep-sleep or Power-down mode immediately when a start is detected. Cleared by software."]
475 #[inline(always)]
476 pub fn start(&self) -> START_R {
477 START_R::new(((self.bits >> 12) & 0x01) != 0)
478 }
479 #[doc = "Bit 13 - Framing Error interrupt flag. This flag is set when a character is received with a missing stop bit at the expected location. This could be an indication of a baud rate or configuration mismatch with the transmitting source."]
480 #[inline(always)]
481 pub fn framerrint(&self) -> FRAMERRINT_R {
482 FRAMERRINT_R::new(((self.bits >> 13) & 0x01) != 0)
483 }
484 #[doc = "Bit 14 - Parity Error interrupt flag. This flag is set when a parity error is detected in a received character."]
485 #[inline(always)]
486 pub fn parityerrint(&self) -> PARITYERRINT_R {
487 PARITYERRINT_R::new(((self.bits >> 14) & 0x01) != 0)
488 }
489 #[doc = "Bit 15 - Received Noise interrupt flag. Three samples of received data are taken in order to determine the value of each received data bit, except in synchronous mode. This acts as a noise filter if one sample disagrees. This flag is set when a received data bit contains one disagreeing sample. This could indicate line noise, a baud rate or character format mismatch, or loss of synchronization during data reception."]
490 #[inline(always)]
491 pub fn rxnoiseint(&self) -> RXNOISEINT_R {
492 RXNOISEINT_R::new(((self.bits >> 15) & 0x01) != 0)
493 }
494 #[doc = "Bit 16 - Autobaud Error. An autobaud error can occur if the BRG counts to its limit before the end of the start bit that is being measured, essentially an autobaud time-out."]
495 #[inline(always)]
496 pub fn aberr(&self) -> ABERR_R {
497 ABERR_R::new(((self.bits >> 16) & 0x01) != 0)
498 }
499}
500impl W {
501 #[doc = "Bit 5 - This bit is set when a change in the state is detected for the CTS flag above. This bit is cleared by software."]
502 #[inline(always)]
503 pub fn deltacts(&mut self) -> DELTACTS_W {
504 DELTACTS_W { w: self }
505 }
506 #[doc = "Bit 8 - Overrun Error interrupt flag. This flag is set when a new character is received while the receiver buffer is still in use. If this occurs, the newly received character in the shift register is lost."]
507 #[inline(always)]
508 pub fn overrunint(&mut self) -> OVERRUNINT_W {
509 OVERRUNINT_W { w: self }
510 }
511 #[doc = "Bit 11 - This bit is set when a change in the state of receiver break detection occurs.Cleared by software."]
512 #[inline(always)]
513 pub fn deltarxbrk(&mut self) -> DELTARXBRK_W {
514 DELTARXBRK_W { w: self }
515 }
516 #[doc = "Bit 12 - This bit is set when a start is detected on the receiver input. Its purpose is primarily to allow wake-up from Deep-sleep or Power-down mode immediately when a start is detected. Cleared by software."]
517 #[inline(always)]
518 pub fn start(&mut self) -> START_W {
519 START_W { w: self }
520 }
521 #[doc = "Bit 13 - Framing Error interrupt flag. This flag is set when a character is received with a missing stop bit at the expected location. This could be an indication of a baud rate or configuration mismatch with the transmitting source."]
522 #[inline(always)]
523 pub fn framerrint(&mut self) -> FRAMERRINT_W {
524 FRAMERRINT_W { w: self }
525 }
526 #[doc = "Bit 14 - Parity Error interrupt flag. This flag is set when a parity error is detected in a received character."]
527 #[inline(always)]
528 pub fn parityerrint(&mut self) -> PARITYERRINT_W {
529 PARITYERRINT_W { w: self }
530 }
531 #[doc = "Bit 15 - Received Noise interrupt flag. Three samples of received data are taken in order to determine the value of each received data bit, except in synchronous mode. This acts as a noise filter if one sample disagrees. This flag is set when a received data bit contains one disagreeing sample. This could indicate line noise, a baud rate or character format mismatch, or loss of synchronization during data reception."]
532 #[inline(always)]
533 pub fn rxnoiseint(&mut self) -> RXNOISEINT_W {
534 RXNOISEINT_W { w: self }
535 }
536 #[doc = "Bit 16 - Autobaud Error. An autobaud error can occur if the BRG counts to its limit before the end of the start bit that is being measured, essentially an autobaud time-out."]
537 #[inline(always)]
538 pub fn aberr(&mut self) -> ABERR_W {
539 ABERR_W { w: self }
540 }
541 #[doc = "Writes raw bits to the register."]
542 #[inline(always)]
543 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
544 self.0.bits(bits);
545 self
546 }
547}
548#[doc = "USART Status register. The complete status value can be read here. Writing ones clears some bits in the register. Some bits can be cleared by writing a 1 to them.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [stat](index.html) module"]
549pub struct STAT_SPEC;
550impl crate::RegisterSpec for STAT_SPEC {
551 type Ux = u32;
552}
553#[doc = "`read()` method returns [stat::R](R) reader structure"]
554impl crate::Readable for STAT_SPEC {
555 type Reader = R;
556}
557#[doc = "`write(|w| ..)` method takes [stat::W](W) writer structure"]
558impl crate::Writable for STAT_SPEC {
559 type Writer = W;
560}
561#[doc = "`reset()` method sets STAT to value 0x0e"]
562impl crate::Resettable for STAT_SPEC {
563 #[inline(always)]
564 fn reset_value() -> Self::Ux {
565 0x0e
566 }
567}