esp32/uart0/
mem_cnt_status.rs1#[doc = "Register `MEM_CNT_STATUS` reader"]
2pub type R = crate::R<MEM_CNT_STATUS_SPEC>;
3#[doc = "Field `RX_MEM_CNT` reader - Refer to the rxfifo_cnt's description."]
4pub type RX_MEM_CNT_R = crate::FieldReader;
5#[doc = "Field `TX_MEM_CNT` reader - Refer to the txfifo_cnt's description."]
6pub type TX_MEM_CNT_R = crate::FieldReader;
7impl R {
8 #[doc = "Bits 0:2 - Refer to the rxfifo_cnt's description."]
9 #[inline(always)]
10 pub fn rx_mem_cnt(&self) -> RX_MEM_CNT_R {
11 RX_MEM_CNT_R::new((self.bits & 7) as u8)
12 }
13 #[doc = "Bits 3:5 - Refer to the txfifo_cnt's description."]
14 #[inline(always)]
15 pub fn tx_mem_cnt(&self) -> TX_MEM_CNT_R {
16 TX_MEM_CNT_R::new(((self.bits >> 3) & 7) as u8)
17 }
18}
19#[cfg(feature = "impl-register-debug")]
20impl core::fmt::Debug for R {
21 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
22 f.debug_struct("MEM_CNT_STATUS")
23 .field("rx_mem_cnt", &self.rx_mem_cnt())
24 .field("tx_mem_cnt", &self.tx_mem_cnt())
25 .finish()
26 }
27}
28#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`mem_cnt_status::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
29pub struct MEM_CNT_STATUS_SPEC;
30impl crate::RegisterSpec for MEM_CNT_STATUS_SPEC {
31 type Ux = u32;
32}
33#[doc = "`read()` method returns [`mem_cnt_status::R`](R) reader structure"]
34impl crate::Readable for MEM_CNT_STATUS_SPEC {}
35#[doc = "`reset()` method sets MEM_CNT_STATUS to value 0"]
36impl crate::Resettable for MEM_CNT_STATUS_SPEC {}