esp32/spi0/
dma_out_link.rs

1#[doc = "Register `DMA_OUT_LINK` reader"]
2pub type R = crate::R<DMA_OUT_LINK_SPEC>;
3#[doc = "Register `DMA_OUT_LINK` writer"]
4pub type W = crate::W<DMA_OUT_LINK_SPEC>;
5#[doc = "Field `OUTLINK_ADDR` reader - The address of the first outlink descriptor."]
6pub type OUTLINK_ADDR_R = crate::FieldReader<u32>;
7#[doc = "Field `OUTLINK_ADDR` writer - The address of the first outlink descriptor."]
8pub type OUTLINK_ADDR_W<'a, REG> = crate::FieldWriter<'a, REG, 20, u32>;
9#[doc = "Field `OUTLINK_STOP` reader - Set the bit to stop to use outlink descriptor."]
10pub type OUTLINK_STOP_R = crate::BitReader;
11#[doc = "Field `OUTLINK_STOP` writer - Set the bit to stop to use outlink descriptor."]
12pub type OUTLINK_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `OUTLINK_START` reader - Set the bit to start to use outlink descriptor."]
14pub type OUTLINK_START_R = crate::BitReader;
15#[doc = "Field `OUTLINK_START` writer - Set the bit to start to use outlink descriptor."]
16pub type OUTLINK_START_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `OUTLINK_RESTART` reader - Set the bit to mount on new outlink descriptors."]
18pub type OUTLINK_RESTART_R = crate::BitReader;
19#[doc = "Field `OUTLINK_RESTART` writer - Set the bit to mount on new outlink descriptors."]
20pub type OUTLINK_RESTART_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22    #[doc = "Bits 0:19 - The address of the first outlink descriptor."]
23    #[inline(always)]
24    pub fn outlink_addr(&self) -> OUTLINK_ADDR_R {
25        OUTLINK_ADDR_R::new(self.bits & 0x000f_ffff)
26    }
27    #[doc = "Bit 28 - Set the bit to stop to use outlink descriptor."]
28    #[inline(always)]
29    pub fn outlink_stop(&self) -> OUTLINK_STOP_R {
30        OUTLINK_STOP_R::new(((self.bits >> 28) & 1) != 0)
31    }
32    #[doc = "Bit 29 - Set the bit to start to use outlink descriptor."]
33    #[inline(always)]
34    pub fn outlink_start(&self) -> OUTLINK_START_R {
35        OUTLINK_START_R::new(((self.bits >> 29) & 1) != 0)
36    }
37    #[doc = "Bit 30 - Set the bit to mount on new outlink descriptors."]
38    #[inline(always)]
39    pub fn outlink_restart(&self) -> OUTLINK_RESTART_R {
40        OUTLINK_RESTART_R::new(((self.bits >> 30) & 1) != 0)
41    }
42}
43#[cfg(feature = "impl-register-debug")]
44impl core::fmt::Debug for R {
45    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
46        f.debug_struct("DMA_OUT_LINK")
47            .field("outlink_addr", &self.outlink_addr())
48            .field("outlink_stop", &self.outlink_stop())
49            .field("outlink_start", &self.outlink_start())
50            .field("outlink_restart", &self.outlink_restart())
51            .finish()
52    }
53}
54impl W {
55    #[doc = "Bits 0:19 - The address of the first outlink descriptor."]
56    #[inline(always)]
57    pub fn outlink_addr(&mut self) -> OUTLINK_ADDR_W<DMA_OUT_LINK_SPEC> {
58        OUTLINK_ADDR_W::new(self, 0)
59    }
60    #[doc = "Bit 28 - Set the bit to stop to use outlink descriptor."]
61    #[inline(always)]
62    pub fn outlink_stop(&mut self) -> OUTLINK_STOP_W<DMA_OUT_LINK_SPEC> {
63        OUTLINK_STOP_W::new(self, 28)
64    }
65    #[doc = "Bit 29 - Set the bit to start to use outlink descriptor."]
66    #[inline(always)]
67    pub fn outlink_start(&mut self) -> OUTLINK_START_W<DMA_OUT_LINK_SPEC> {
68        OUTLINK_START_W::new(self, 29)
69    }
70    #[doc = "Bit 30 - Set the bit to mount on new outlink descriptors."]
71    #[inline(always)]
72    pub fn outlink_restart(&mut self) -> OUTLINK_RESTART_W<DMA_OUT_LINK_SPEC> {
73        OUTLINK_RESTART_W::new(self, 30)
74    }
75}
76#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`dma_out_link::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dma_out_link::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
77pub struct DMA_OUT_LINK_SPEC;
78impl crate::RegisterSpec for DMA_OUT_LINK_SPEC {
79    type Ux = u32;
80}
81#[doc = "`read()` method returns [`dma_out_link::R`](R) reader structure"]
82impl crate::Readable for DMA_OUT_LINK_SPEC {}
83#[doc = "`write(|w| ..)` method takes [`dma_out_link::W`](W) writer structure"]
84impl crate::Writable for DMA_OUT_LINK_SPEC {
85    type Safety = crate::Unsafe;
86    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
87    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
88}
89#[doc = "`reset()` method sets DMA_OUT_LINK to value 0"]
90impl crate::Resettable for DMA_OUT_LINK_SPEC {
91    const RESET_VALUE: u32 = 0;
92}