efm32g230_pac/leuart1/
rxdatax.rs1#[doc = "Register `RXDATAX` reader"]
2pub struct R(crate::R<RXDATAX_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<RXDATAX_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<RXDATAX_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<RXDATAX_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `RXDATA` reader - RX Data"]
17pub type RXDATA_R = crate::FieldReader<u16, u16>;
18#[doc = "Field `PERR` reader - Receive Data Parity Error"]
19pub type PERR_R = crate::BitReader<bool>;
20#[doc = "Field `FERR` reader - Receive Data Framing Error"]
21pub type FERR_R = crate::BitReader<bool>;
22impl R {
23 #[doc = "Bits 0:8 - RX Data"]
24 #[inline(always)]
25 pub fn rxdata(&self) -> RXDATA_R {
26 RXDATA_R::new((self.bits & 0x01ff) as u16)
27 }
28 #[doc = "Bit 14 - Receive Data Parity Error"]
29 #[inline(always)]
30 pub fn perr(&self) -> PERR_R {
31 PERR_R::new(((self.bits >> 14) & 1) != 0)
32 }
33 #[doc = "Bit 15 - Receive Data Framing Error"]
34 #[inline(always)]
35 pub fn ferr(&self) -> FERR_R {
36 FERR_R::new(((self.bits >> 15) & 1) != 0)
37 }
38}
39#[doc = "Receive Buffer Data Extended Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rxdatax](index.html) module\n\nOne or more dependent resources other than the current register are immediately affected by a read operation."]
40pub struct RXDATAX_SPEC;
41impl crate::RegisterSpec for RXDATAX_SPEC {
42 type Ux = u32;
43}
44#[doc = "`read()` method returns [rxdatax::R](R) reader structure"]
45impl crate::Readable for RXDATAX_SPEC {
46 type Reader = R;
47}
48#[doc = "`reset()` method sets RXDATAX to value 0"]
49impl crate::Resettable for RXDATAX_SPEC {
50 #[inline(always)]
51 fn reset_value() -> Self::Ux {
52 0
53 }
54}