esp32/spi0/
dma_status.rs

1#[doc = "Register `DMA_STATUS` reader"]
2pub type R = crate::R<DMA_STATUS_SPEC>;
3#[doc = "Field `DMA_RX_EN` reader - spi dma read data status bit."]
4pub type DMA_RX_EN_R = crate::BitReader;
5#[doc = "Field `DMA_TX_EN` reader - spi dma write data status bit."]
6pub type DMA_TX_EN_R = crate::BitReader;
7impl R {
8    #[doc = "Bit 0 - spi dma read data status bit."]
9    #[inline(always)]
10    pub fn dma_rx_en(&self) -> DMA_RX_EN_R {
11        DMA_RX_EN_R::new((self.bits & 1) != 0)
12    }
13    #[doc = "Bit 1 - spi dma write data status bit."]
14    #[inline(always)]
15    pub fn dma_tx_en(&self) -> DMA_TX_EN_R {
16        DMA_TX_EN_R::new(((self.bits >> 1) & 1) != 0)
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("DMA_STATUS")
23            .field("dma_rx_en", &self.dma_rx_en())
24            .field("dma_tx_en", &self.dma_tx_en())
25            .finish()
26    }
27}
28#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`dma_status::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
29pub struct DMA_STATUS_SPEC;
30impl crate::RegisterSpec for DMA_STATUS_SPEC {
31    type Ux = u32;
32}
33#[doc = "`read()` method returns [`dma_status::R`](R) reader structure"]
34impl crate::Readable for DMA_STATUS_SPEC {}
35#[doc = "`reset()` method sets DMA_STATUS to value 0"]
36impl crate::Resettable for DMA_STATUS_SPEC {
37    const RESET_VALUE: u32 = 0;
38}