eos_s3/sdma/
chnl_sw_req.rs1#[doc = "Register `CHNL_SW_REQ` writer"]
2pub struct W(crate::W<CHNL_SW_REQ_SPEC>);
3impl core::ops::Deref for W {
4 type Target = crate::W<CHNL_SW_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<CHNL_SW_REQ_SPEC>> for W {
17 #[inline(always)]
18 fn from(writer: crate::W<CHNL_SW_REQ_SPEC>) -> Self {
19 W(writer)
20 }
21}
22#[doc = "Field `chnl_sw_request` writer - Set the appropriate bit to generate a software DMA request on the corresponding DMA channel. Write as: \n \n Bit \\[C\\]
23= 0 Does not create a DMA request for channel C. \n \n Bit \\[C\\]
24= 1 Creates a DMA request for channel C. \n \n Writing to a bit where a DMA channel is not implemented does not create a DMA request for that channel."]
25pub struct CHNL_SW_REQUEST_W<'a> {
26 w: &'a mut W,
27}
28impl<'a> CHNL_SW_REQUEST_W<'a> {
29 #[doc = r"Writes raw bits to the field"]
30 #[inline(always)]
31 pub unsafe fn bits(self, value: u16) -> &'a mut W {
32 self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff);
33 self.w
34 }
35}
36impl W {
37 #[doc = "Bits 0:15 - Set the appropriate bit to generate a software DMA request on the corresponding DMA channel. Write as: \n \n Bit \\[C\\]
38= 0 Does not create a DMA request for channel C. \n \n Bit \\[C\\]
39= 1 Creates a DMA request for channel C. \n \n Writing to a bit where a DMA channel is not implemented does not create a DMA request for that channel."]
40 #[inline(always)]
41 pub fn chnl_sw_request(&mut self) -> CHNL_SW_REQUEST_W {
42 CHNL_SW_REQUEST_W { w: self }
43 }
44 #[doc = "Writes raw bits to the register."]
45 #[inline(always)]
46 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
47 self.0.bits(bits);
48 self
49 }
50}
51#[doc = "Registers to generate a software DMA request in one of the 16 DMA channels\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 [chnl_sw_req](index.html) module"]
52pub struct CHNL_SW_REQ_SPEC;
53impl crate::RegisterSpec for CHNL_SW_REQ_SPEC {
54 type Ux = u32;
55}
56#[doc = "`write(|w| ..)` method takes [chnl_sw_req::W](W) writer structure"]
57impl crate::Writable for CHNL_SW_REQ_SPEC {
58 type Writer = W;
59}
60#[doc = "`reset()` method sets CHNL_SW_REQ to value 0"]
61impl crate::Resettable for CHNL_SW_REQ_SPEC {
62 #[inline(always)]
63 fn reset_value() -> Self::Ux {
64 0
65 }
66}