w7500x_pac/dma/
chnl_req_mask_clr.rs

1#[doc = "Register `CHNL_REQ_MASK_CLR` writer"]
2pub struct W(crate::W<CHNL_REQ_MASK_CLR_SPEC>);
3impl core::ops::Deref for W {
4    type Target = crate::W<CHNL_REQ_MASK_CLR_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_REQ_MASK_CLR_SPEC>> for W {
17    #[inline(always)]
18    fn from(writer: crate::W<CHNL_REQ_MASK_CLR_SPEC>) -> Self {
19        W(writer)
20    }
21}
22#[doc = "Field `CHNL_REQ_MASK_CLR` writer - CHNL_REQ_MASK_CLR\\[5:0\\]
23bits (Set the appropriate bit to enable DMA requests for the channel corresponding to dma_req\\[Channel-1\\]
24and dma_sreq\\[Channel-1\\])"]
25pub struct CHNL_REQ_MASK_CLR_W<'a> {
26    w: &'a mut W,
27}
28impl<'a> CHNL_REQ_MASK_CLR_W<'a> {
29    #[doc = r"Writes raw bits to the field"]
30    #[inline(always)]
31    pub unsafe fn bits(self, value: u8) -> &'a mut W {
32        self.w.bits = (self.w.bits & !0x3f) | (value as u32 & 0x3f);
33        self.w
34    }
35}
36impl W {
37    #[doc = "Bits 0:5 - CHNL_REQ_MASK_CLR\\[5:0\\]
38bits (Set the appropriate bit to enable DMA requests for the channel corresponding to dma_req\\[Channel-1\\]
39and dma_sreq\\[Channel-1\\])"]
40    #[inline(always)]
41    pub fn chnl_req_mask_clr(&mut self) -> CHNL_REQ_MASK_CLR_W {
42        CHNL_REQ_MASK_CLR_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 = "Channel Request Mask Clear register\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_req_mask_clr](index.html) module"]
52pub struct CHNL_REQ_MASK_CLR_SPEC;
53impl crate::RegisterSpec for CHNL_REQ_MASK_CLR_SPEC {
54    type Ux = u32;
55}
56#[doc = "`write(|w| ..)` method takes [chnl_req_mask_clr::W](W) writer structure"]
57impl crate::Writable for CHNL_REQ_MASK_CLR_SPEC {
58    type Writer = W;
59}
60#[doc = "`reset()` method sets CHNL_REQ_MASK_CLR to value 0"]
61impl crate::Resettable for CHNL_REQ_MASK_CLR_SPEC {
62    #[inline(always)]
63    fn reset_value() -> Self::Ux {
64        0
65    }
66}