esp32c6_lp/lp_uart/
afifo_status.rs1#[doc = "Register `AFIFO_STATUS` reader"]
2pub type R = crate::R<AFIFO_STATUS_SPEC>;
3#[doc = "Field `TX_AFIFO_FULL` reader - Full signal of APB TX AFIFO."]
4pub type TX_AFIFO_FULL_R = crate::BitReader;
5#[doc = "Field `TX_AFIFO_EMPTY` reader - Empty signal of APB TX AFIFO."]
6pub type TX_AFIFO_EMPTY_R = crate::BitReader;
7#[doc = "Field `RX_AFIFO_FULL` reader - Full signal of APB RX AFIFO."]
8pub type RX_AFIFO_FULL_R = crate::BitReader;
9#[doc = "Field `RX_AFIFO_EMPTY` reader - Empty signal of APB RX AFIFO."]
10pub type RX_AFIFO_EMPTY_R = crate::BitReader;
11impl R {
12 #[doc = "Bit 0 - Full signal of APB TX AFIFO."]
13 #[inline(always)]
14 pub fn tx_afifo_full(&self) -> TX_AFIFO_FULL_R {
15 TX_AFIFO_FULL_R::new((self.bits & 1) != 0)
16 }
17 #[doc = "Bit 1 - Empty signal of APB TX AFIFO."]
18 #[inline(always)]
19 pub fn tx_afifo_empty(&self) -> TX_AFIFO_EMPTY_R {
20 TX_AFIFO_EMPTY_R::new(((self.bits >> 1) & 1) != 0)
21 }
22 #[doc = "Bit 2 - Full signal of APB RX AFIFO."]
23 #[inline(always)]
24 pub fn rx_afifo_full(&self) -> RX_AFIFO_FULL_R {
25 RX_AFIFO_FULL_R::new(((self.bits >> 2) & 1) != 0)
26 }
27 #[doc = "Bit 3 - Empty signal of APB RX AFIFO."]
28 #[inline(always)]
29 pub fn rx_afifo_empty(&self) -> RX_AFIFO_EMPTY_R {
30 RX_AFIFO_EMPTY_R::new(((self.bits >> 3) & 1) != 0)
31 }
32}
33#[cfg(feature = "impl-register-debug")]
34impl core::fmt::Debug for R {
35 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
36 f.debug_struct("AFIFO_STATUS")
37 .field("tx_afifo_full", &self.tx_afifo_full())
38 .field("tx_afifo_empty", &self.tx_afifo_empty())
39 .field("rx_afifo_full", &self.rx_afifo_full())
40 .field("rx_afifo_empty", &self.rx_afifo_empty())
41 .finish()
42 }
43}
44#[doc = "UART AFIFO Status\n\nYou can [`read`](crate::Reg::read) this register and get [`afifo_status::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
45pub struct AFIFO_STATUS_SPEC;
46impl crate::RegisterSpec for AFIFO_STATUS_SPEC {
47 type Ux = u32;
48}
49#[doc = "`read()` method returns [`afifo_status::R`](R) reader structure"]
50impl crate::Readable for AFIFO_STATUS_SPEC {}
51#[doc = "`reset()` method sets AFIFO_STATUS to value 0x0a"]
52impl crate::Resettable for AFIFO_STATUS_SPEC {
53 const RESET_VALUE: u32 = 0x0a;
54}