esp32p4/ahb_dma/ch/
outfifo_status.rs

1#[doc = "Register `OUTFIFO_STATUS` reader"]
2pub type R = crate::R<OUTFIFO_STATUS_SPEC>;
3#[doc = "Field `OUTFIFO_FULL` reader - L1 Tx FIFO full signal for Tx channel 0."]
4pub type OUTFIFO_FULL_R = crate::BitReader;
5#[doc = "Field `OUTFIFO_EMPTY` reader - L1 Tx FIFO empty signal for Tx channel 0."]
6pub type OUTFIFO_EMPTY_R = crate::BitReader;
7#[doc = "Field `OUTFIFO_CNT` reader - The register stores the byte number of the data in L1 Tx FIFO for Tx channel 0."]
8pub type OUTFIFO_CNT_R = crate::FieldReader;
9#[doc = "Field `OUT_REMAIN_UNDER_1B` reader - reserved"]
10pub type OUT_REMAIN_UNDER_1B_R = crate::BitReader;
11#[doc = "Field `OUT_REMAIN_UNDER_2B` reader - reserved"]
12pub type OUT_REMAIN_UNDER_2B_R = crate::BitReader;
13#[doc = "Field `OUT_REMAIN_UNDER_3B` reader - reserved"]
14pub type OUT_REMAIN_UNDER_3B_R = crate::BitReader;
15#[doc = "Field `OUT_REMAIN_UNDER_4B` reader - reserved"]
16pub type OUT_REMAIN_UNDER_4B_R = crate::BitReader;
17impl R {
18    #[doc = "Bit 0 - L1 Tx FIFO full signal for Tx channel 0."]
19    #[inline(always)]
20    pub fn outfifo_full(&self) -> OUTFIFO_FULL_R {
21        OUTFIFO_FULL_R::new((self.bits & 1) != 0)
22    }
23    #[doc = "Bit 1 - L1 Tx FIFO empty signal for Tx channel 0."]
24    #[inline(always)]
25    pub fn outfifo_empty(&self) -> OUTFIFO_EMPTY_R {
26        OUTFIFO_EMPTY_R::new(((self.bits >> 1) & 1) != 0)
27    }
28    #[doc = "Bits 2:7 - The register stores the byte number of the data in L1 Tx FIFO for Tx channel 0."]
29    #[inline(always)]
30    pub fn outfifo_cnt(&self) -> OUTFIFO_CNT_R {
31        OUTFIFO_CNT_R::new(((self.bits >> 2) & 0x3f) as u8)
32    }
33    #[doc = "Bit 23 - reserved"]
34    #[inline(always)]
35    pub fn out_remain_under_1b(&self) -> OUT_REMAIN_UNDER_1B_R {
36        OUT_REMAIN_UNDER_1B_R::new(((self.bits >> 23) & 1) != 0)
37    }
38    #[doc = "Bit 24 - reserved"]
39    #[inline(always)]
40    pub fn out_remain_under_2b(&self) -> OUT_REMAIN_UNDER_2B_R {
41        OUT_REMAIN_UNDER_2B_R::new(((self.bits >> 24) & 1) != 0)
42    }
43    #[doc = "Bit 25 - reserved"]
44    #[inline(always)]
45    pub fn out_remain_under_3b(&self) -> OUT_REMAIN_UNDER_3B_R {
46        OUT_REMAIN_UNDER_3B_R::new(((self.bits >> 25) & 1) != 0)
47    }
48    #[doc = "Bit 26 - reserved"]
49    #[inline(always)]
50    pub fn out_remain_under_4b(&self) -> OUT_REMAIN_UNDER_4B_R {
51        OUT_REMAIN_UNDER_4B_R::new(((self.bits >> 26) & 1) != 0)
52    }
53}
54#[cfg(feature = "impl-register-debug")]
55impl core::fmt::Debug for R {
56    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
57        f.debug_struct("OUTFIFO_STATUS")
58            .field(
59                "outfifo_full",
60                &format_args!("{}", self.outfifo_full().bit()),
61            )
62            .field(
63                "outfifo_empty",
64                &format_args!("{}", self.outfifo_empty().bit()),
65            )
66            .field(
67                "outfifo_cnt",
68                &format_args!("{}", self.outfifo_cnt().bits()),
69            )
70            .field(
71                "out_remain_under_1b",
72                &format_args!("{}", self.out_remain_under_1b().bit()),
73            )
74            .field(
75                "out_remain_under_2b",
76                &format_args!("{}", self.out_remain_under_2b().bit()),
77            )
78            .field(
79                "out_remain_under_3b",
80                &format_args!("{}", self.out_remain_under_3b().bit()),
81            )
82            .field(
83                "out_remain_under_4b",
84                &format_args!("{}", self.out_remain_under_4b().bit()),
85            )
86            .finish()
87    }
88}
89#[cfg(feature = "impl-register-debug")]
90impl core::fmt::Debug for crate::generic::Reg<OUTFIFO_STATUS_SPEC> {
91    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
92        core::fmt::Debug::fmt(&self.read(), f)
93    }
94}
95#[doc = "Transmit FIFO status of Tx channel 0\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`outfifo_status::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
96pub struct OUTFIFO_STATUS_SPEC;
97impl crate::RegisterSpec for OUTFIFO_STATUS_SPEC {
98    type Ux = u32;
99}
100#[doc = "`read()` method returns [`outfifo_status::R`](R) reader structure"]
101impl crate::Readable for OUTFIFO_STATUS_SPEC {}
102#[doc = "`reset()` method sets OUTFIFO_STATUS to value 0x0780_0002"]
103impl crate::Resettable for OUTFIFO_STATUS_SPEC {
104    const RESET_VALUE: u32 = 0x0780_0002;
105}