esp32c3/dma/ch/
infifo_status.rs1#[doc = "Register `INFIFO_STATUS` reader"]
2pub type R = crate::R<INFIFO_STATUS_SPEC>;
3#[doc = "Field `INFIFO_FULL` reader - L1 Rx FIFO full signal for Rx channel 0."]
4pub type INFIFO_FULL_R = crate::BitReader;
5#[doc = "Field `INFIFO_EMPTY` reader - L1 Rx FIFO empty signal for Rx channel 0."]
6pub type INFIFO_EMPTY_R = crate::BitReader;
7#[doc = "Field `INFIFO_CNT` reader - The register stores the byte number of the data in L1 Rx FIFO for Rx channel 0."]
8pub type INFIFO_CNT_R = crate::FieldReader;
9#[doc = "Field `IN_REMAIN_UNDER_1B` reader - reserved"]
10pub type IN_REMAIN_UNDER_1B_R = crate::BitReader;
11#[doc = "Field `IN_REMAIN_UNDER_2B` reader - reserved"]
12pub type IN_REMAIN_UNDER_2B_R = crate::BitReader;
13#[doc = "Field `IN_REMAIN_UNDER_3B` reader - reserved"]
14pub type IN_REMAIN_UNDER_3B_R = crate::BitReader;
15#[doc = "Field `IN_REMAIN_UNDER_4B` reader - reserved"]
16pub type IN_REMAIN_UNDER_4B_R = crate::BitReader;
17#[doc = "Field `IN_BUF_HUNGRY` reader - reserved"]
18pub type IN_BUF_HUNGRY_R = crate::BitReader;
19impl R {
20 #[doc = "Bit 0 - L1 Rx FIFO full signal for Rx channel 0."]
21 #[inline(always)]
22 pub fn infifo_full(&self) -> INFIFO_FULL_R {
23 INFIFO_FULL_R::new((self.bits & 1) != 0)
24 }
25 #[doc = "Bit 1 - L1 Rx FIFO empty signal for Rx channel 0."]
26 #[inline(always)]
27 pub fn infifo_empty(&self) -> INFIFO_EMPTY_R {
28 INFIFO_EMPTY_R::new(((self.bits >> 1) & 1) != 0)
29 }
30 #[doc = "Bits 2:7 - The register stores the byte number of the data in L1 Rx FIFO for Rx channel 0."]
31 #[inline(always)]
32 pub fn infifo_cnt(&self) -> INFIFO_CNT_R {
33 INFIFO_CNT_R::new(((self.bits >> 2) & 0x3f) as u8)
34 }
35 #[doc = "Bit 23 - reserved"]
36 #[inline(always)]
37 pub fn in_remain_under_1b(&self) -> IN_REMAIN_UNDER_1B_R {
38 IN_REMAIN_UNDER_1B_R::new(((self.bits >> 23) & 1) != 0)
39 }
40 #[doc = "Bit 24 - reserved"]
41 #[inline(always)]
42 pub fn in_remain_under_2b(&self) -> IN_REMAIN_UNDER_2B_R {
43 IN_REMAIN_UNDER_2B_R::new(((self.bits >> 24) & 1) != 0)
44 }
45 #[doc = "Bit 25 - reserved"]
46 #[inline(always)]
47 pub fn in_remain_under_3b(&self) -> IN_REMAIN_UNDER_3B_R {
48 IN_REMAIN_UNDER_3B_R::new(((self.bits >> 25) & 1) != 0)
49 }
50 #[doc = "Bit 26 - reserved"]
51 #[inline(always)]
52 pub fn in_remain_under_4b(&self) -> IN_REMAIN_UNDER_4B_R {
53 IN_REMAIN_UNDER_4B_R::new(((self.bits >> 26) & 1) != 0)
54 }
55 #[doc = "Bit 27 - reserved"]
56 #[inline(always)]
57 pub fn in_buf_hungry(&self) -> IN_BUF_HUNGRY_R {
58 IN_BUF_HUNGRY_R::new(((self.bits >> 27) & 1) != 0)
59 }
60}
61#[cfg(feature = "impl-register-debug")]
62impl core::fmt::Debug for R {
63 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
64 f.debug_struct("INFIFO_STATUS")
65 .field("infifo_full", &self.infifo_full())
66 .field("infifo_empty", &self.infifo_empty())
67 .field("infifo_cnt", &self.infifo_cnt())
68 .field("in_remain_under_1b", &self.in_remain_under_1b())
69 .field("in_remain_under_2b", &self.in_remain_under_2b())
70 .field("in_remain_under_3b", &self.in_remain_under_3b())
71 .field("in_remain_under_4b", &self.in_remain_under_4b())
72 .field("in_buf_hungry", &self.in_buf_hungry())
73 .finish()
74 }
75}
76#[doc = "DMA_INFIFO_STATUS_CH0_REG.\n\nYou can [`read`](crate::Reg::read) this register and get [`infifo_status::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
77pub struct INFIFO_STATUS_SPEC;
78impl crate::RegisterSpec for INFIFO_STATUS_SPEC {
79 type Ux = u32;
80}
81#[doc = "`read()` method returns [`infifo_status::R`](R) reader structure"]
82impl crate::Readable for INFIFO_STATUS_SPEC {}
83#[doc = "`reset()` method sets INFIFO_STATUS to value 0x0780_0003"]
84impl crate::Resettable for INFIFO_STATUS_SPEC {
85 const RESET_VALUE: u32 = 0x0780_0003;
86}