efm32pg12_pac/leuart0/
status.rs

1#[doc = "Reader of register STATUS"]
2pub type R = crate::R<u32, super::STATUS>;
3#[doc = "Reader of field `RXENS`"]
4pub type RXENS_R = crate::R<bool, bool>;
5#[doc = "Reader of field `TXENS`"]
6pub type TXENS_R = crate::R<bool, bool>;
7#[doc = "Reader of field `RXBLOCK`"]
8pub type RXBLOCK_R = crate::R<bool, bool>;
9#[doc = "Reader of field `TXC`"]
10pub type TXC_R = crate::R<bool, bool>;
11#[doc = "Reader of field `TXBL`"]
12pub type TXBL_R = crate::R<bool, bool>;
13#[doc = "Reader of field `RXDATAV`"]
14pub type RXDATAV_R = crate::R<bool, bool>;
15#[doc = "Reader of field `TXIDLE`"]
16pub type TXIDLE_R = crate::R<bool, bool>;
17impl R {
18    #[doc = "Bit 0 - Receiver Enable Status"]
19    #[inline(always)]
20    pub fn rxens(&self) -> RXENS_R {
21        RXENS_R::new((self.bits & 0x01) != 0)
22    }
23    #[doc = "Bit 1 - Transmitter Enable Status"]
24    #[inline(always)]
25    pub fn txens(&self) -> TXENS_R {
26        TXENS_R::new(((self.bits >> 1) & 0x01) != 0)
27    }
28    #[doc = "Bit 2 - Block Incoming Data"]
29    #[inline(always)]
30    pub fn rxblock(&self) -> RXBLOCK_R {
31        RXBLOCK_R::new(((self.bits >> 2) & 0x01) != 0)
32    }
33    #[doc = "Bit 3 - TX Complete"]
34    #[inline(always)]
35    pub fn txc(&self) -> TXC_R {
36        TXC_R::new(((self.bits >> 3) & 0x01) != 0)
37    }
38    #[doc = "Bit 4 - TX Buffer Level"]
39    #[inline(always)]
40    pub fn txbl(&self) -> TXBL_R {
41        TXBL_R::new(((self.bits >> 4) & 0x01) != 0)
42    }
43    #[doc = "Bit 5 - RX Data Valid"]
44    #[inline(always)]
45    pub fn rxdatav(&self) -> RXDATAV_R {
46        RXDATAV_R::new(((self.bits >> 5) & 0x01) != 0)
47    }
48    #[doc = "Bit 6 - TX Idle"]
49    #[inline(always)]
50    pub fn txidle(&self) -> TXIDLE_R {
51        TXIDLE_R::new(((self.bits >> 6) & 0x01) != 0)
52    }
53}