eos_s3/sdma_bridge/
dma_req.rs1#[doc = "Register `DMA_REQ` writer"]
2pub struct W(crate::W<DMA_REQ_SPEC>);
3impl core::ops::Deref for W {
4 type Target = crate::W<DMA_REQ_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl core::ops::DerefMut for W {
11 #[inline(always)]
12 fn deref_mut(&mut self) -> &mut Self::Target {
13 &mut self.0
14 }
15}
16impl From<crate::W<DMA_REQ_SPEC>> for W {
17 #[inline(always)]
18 fn from(writer: crate::W<DMA_REQ_SPEC>) -> Self {
19 W(writer)
20 }
21}
22#[doc = "Field `dma_req` writer - Burst DMA request send to System DMA"]
23pub struct DMA_REQ_W<'a> {
24 w: &'a mut W,
25}
26impl<'a> DMA_REQ_W<'a> {
27 #[doc = r"Writes raw bits to the field"]
28 #[inline(always)]
29 pub unsafe fn bits(self, value: u16) -> &'a mut W {
30 self.w.bits = (self.w.bits & !0x07ff) | (value as u32 & 0x07ff);
31 self.w
32 }
33}
34#[doc = "Field `dma_sreq` writer - Single DMA request send to System DMA"]
35pub struct DMA_SREQ_W<'a> {
36 w: &'a mut W,
37}
38impl<'a> DMA_SREQ_W<'a> {
39 #[doc = r"Writes raw bits to the field"]
40 #[inline(always)]
41 pub unsafe fn bits(self, value: u16) -> &'a mut W {
42 self.w.bits =
43 (self.w.bits & !(0x07ff << 16)) | ((value as u32 & 0x07ff) << 16);
44 self.w
45 }
46}
47impl W {
48 #[doc = "Bits 0:10 - Burst DMA request send to System DMA"]
49 #[inline(always)]
50 pub fn dma_req(&mut self) -> DMA_REQ_W {
51 DMA_REQ_W { w: self }
52 }
53 #[doc = "Bits 16:26 - Single DMA request send to System DMA"]
54 #[inline(always)]
55 pub fn dma_sreq(&mut self) -> DMA_SREQ_W {
56 DMA_SREQ_W { w: self }
57 }
58 #[doc = "Writes raw bits to the register."]
59 #[inline(always)]
60 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
61 self.0.bits(bits);
62 self
63 }
64}
65#[doc = "DMA request\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_req](index.html) module"]
66pub struct DMA_REQ_SPEC;
67impl crate::RegisterSpec for DMA_REQ_SPEC {
68 type Ux = u32;
69}
70#[doc = "`write(|w| ..)` method takes [dma_req::W](W) writer structure"]
71impl crate::Writable for DMA_REQ_SPEC {
72 type Writer = W;
73}
74#[doc = "`reset()` method sets DMA_REQ to value 0"]
75impl crate::Resettable for DMA_REQ_SPEC {
76 #[inline(always)]
77 fn reset_value() -> Self::Ux {
78 0
79 }
80}