bl702_pac/dma/
dma_c0config.rs1#[doc = "Register `DMA_C0Config` reader"]
2pub struct R(crate::R<DMA_C0CONFIG_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<DMA_C0CONFIG_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<DMA_C0CONFIG_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<DMA_C0CONFIG_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `DMA_C0Config` writer"]
17pub struct W(crate::W<DMA_C0CONFIG_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<DMA_C0CONFIG_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<DMA_C0CONFIG_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<DMA_C0CONFIG_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `E` reader - "]
38pub type E_R = crate::BitReader<bool>;
39#[doc = "Field `E` writer - "]
40pub type E_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C0CONFIG_SPEC, bool, O>;
41#[doc = "Field `SrcPeripheral` reader - "]
42pub type SRC_PERIPHERAL_R = crate::FieldReader<u8, u8>;
43#[doc = "Field `SrcPeripheral` writer - "]
44pub type SRC_PERIPHERAL_W<'a, const O: u8> =
45 crate::FieldWriter<'a, u32, DMA_C0CONFIG_SPEC, u8, u8, 5, O>;
46#[doc = "Field `DstPeripheral` reader - "]
47pub type DST_PERIPHERAL_R = crate::FieldReader<u8, u8>;
48#[doc = "Field `DstPeripheral` writer - "]
49pub type DST_PERIPHERAL_W<'a, const O: u8> =
50 crate::FieldWriter<'a, u32, DMA_C0CONFIG_SPEC, u8, u8, 5, O>;
51#[doc = "Field `FlowCntrl` reader - "]
52pub type FLOW_CNTRL_R = crate::FieldReader<u8, u8>;
53#[doc = "Field `FlowCntrl` writer - "]
54pub type FLOW_CNTRL_W<'a, const O: u8> =
55 crate::FieldWriter<'a, u32, DMA_C0CONFIG_SPEC, u8, u8, 3, O>;
56#[doc = "Field `IE` reader - "]
57pub type IE_R = crate::BitReader<bool>;
58#[doc = "Field `IE` writer - "]
59pub type IE_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C0CONFIG_SPEC, bool, O>;
60#[doc = "Field `ITC` reader - "]
61pub type ITC_R = crate::BitReader<bool>;
62#[doc = "Field `ITC` writer - "]
63pub type ITC_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C0CONFIG_SPEC, bool, O>;
64#[doc = "Field `L` reader - "]
65pub type L_R = crate::BitReader<bool>;
66#[doc = "Field `L` writer - "]
67pub type L_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C0CONFIG_SPEC, bool, O>;
68#[doc = "Field `A` reader - "]
69pub type A_R = crate::BitReader<bool>;
70#[doc = "Field `A` writer - "]
71pub type A_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C0CONFIG_SPEC, bool, O>;
72#[doc = "Field `H` reader - "]
73pub type H_R = crate::BitReader<bool>;
74#[doc = "Field `H` writer - "]
75pub type H_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C0CONFIG_SPEC, bool, O>;
76#[doc = "Field `LLICounter` reader - "]
77pub type LLICOUNTER_R = crate::FieldReader<u16, u16>;
78#[doc = "Field `LLICounter` writer - "]
79pub type LLICOUNTER_W<'a, const O: u8> =
80 crate::FieldWriter<'a, u32, DMA_C0CONFIG_SPEC, u16, u16, 10, O>;
81impl R {
82 #[doc = "Bit 0"]
83 #[inline(always)]
84 pub fn e(&self) -> E_R {
85 E_R::new((self.bits & 1) != 0)
86 }
87 #[doc = "Bits 1:5"]
88 #[inline(always)]
89 pub fn src_peripheral(&self) -> SRC_PERIPHERAL_R {
90 SRC_PERIPHERAL_R::new(((self.bits >> 1) & 0x1f) as u8)
91 }
92 #[doc = "Bits 6:10"]
93 #[inline(always)]
94 pub fn dst_peripheral(&self) -> DST_PERIPHERAL_R {
95 DST_PERIPHERAL_R::new(((self.bits >> 6) & 0x1f) as u8)
96 }
97 #[doc = "Bits 11:13"]
98 #[inline(always)]
99 pub fn flow_cntrl(&self) -> FLOW_CNTRL_R {
100 FLOW_CNTRL_R::new(((self.bits >> 11) & 7) as u8)
101 }
102 #[doc = "Bit 14"]
103 #[inline(always)]
104 pub fn ie(&self) -> IE_R {
105 IE_R::new(((self.bits >> 14) & 1) != 0)
106 }
107 #[doc = "Bit 15"]
108 #[inline(always)]
109 pub fn itc(&self) -> ITC_R {
110 ITC_R::new(((self.bits >> 15) & 1) != 0)
111 }
112 #[doc = "Bit 16"]
113 #[inline(always)]
114 pub fn l(&self) -> L_R {
115 L_R::new(((self.bits >> 16) & 1) != 0)
116 }
117 #[doc = "Bit 17"]
118 #[inline(always)]
119 pub fn a(&self) -> A_R {
120 A_R::new(((self.bits >> 17) & 1) != 0)
121 }
122 #[doc = "Bit 18"]
123 #[inline(always)]
124 pub fn h(&self) -> H_R {
125 H_R::new(((self.bits >> 18) & 1) != 0)
126 }
127 #[doc = "Bits 20:29"]
128 #[inline(always)]
129 pub fn llicounter(&self) -> LLICOUNTER_R {
130 LLICOUNTER_R::new(((self.bits >> 20) & 0x03ff) as u16)
131 }
132}
133impl W {
134 #[doc = "Bit 0"]
135 #[inline(always)]
136 #[must_use]
137 pub fn e(&mut self) -> E_W<0> {
138 E_W::new(self)
139 }
140 #[doc = "Bits 1:5"]
141 #[inline(always)]
142 #[must_use]
143 pub fn src_peripheral(&mut self) -> SRC_PERIPHERAL_W<1> {
144 SRC_PERIPHERAL_W::new(self)
145 }
146 #[doc = "Bits 6:10"]
147 #[inline(always)]
148 #[must_use]
149 pub fn dst_peripheral(&mut self) -> DST_PERIPHERAL_W<6> {
150 DST_PERIPHERAL_W::new(self)
151 }
152 #[doc = "Bits 11:13"]
153 #[inline(always)]
154 #[must_use]
155 pub fn flow_cntrl(&mut self) -> FLOW_CNTRL_W<11> {
156 FLOW_CNTRL_W::new(self)
157 }
158 #[doc = "Bit 14"]
159 #[inline(always)]
160 #[must_use]
161 pub fn ie(&mut self) -> IE_W<14> {
162 IE_W::new(self)
163 }
164 #[doc = "Bit 15"]
165 #[inline(always)]
166 #[must_use]
167 pub fn itc(&mut self) -> ITC_W<15> {
168 ITC_W::new(self)
169 }
170 #[doc = "Bit 16"]
171 #[inline(always)]
172 #[must_use]
173 pub fn l(&mut self) -> L_W<16> {
174 L_W::new(self)
175 }
176 #[doc = "Bit 17"]
177 #[inline(always)]
178 #[must_use]
179 pub fn a(&mut self) -> A_W<17> {
180 A_W::new(self)
181 }
182 #[doc = "Bit 18"]
183 #[inline(always)]
184 #[must_use]
185 pub fn h(&mut self) -> H_W<18> {
186 H_W::new(self)
187 }
188 #[doc = "Bits 20:29"]
189 #[inline(always)]
190 #[must_use]
191 pub fn llicounter(&mut self) -> LLICOUNTER_W<20> {
192 LLICOUNTER_W::new(self)
193 }
194 #[doc = "Writes raw bits to the register."]
195 #[inline(always)]
196 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
197 self.0.bits(bits);
198 self
199 }
200}
201#[doc = "DMA_C0Config.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_c0config](index.html) module"]
202pub struct DMA_C0CONFIG_SPEC;
203impl crate::RegisterSpec for DMA_C0CONFIG_SPEC {
204 type Ux = u32;
205}
206#[doc = "`read()` method returns [dma_c0config::R](R) reader structure"]
207impl crate::Readable for DMA_C0CONFIG_SPEC {
208 type Reader = R;
209}
210#[doc = "`write(|w| ..)` method takes [dma_c0config::W](W) writer structure"]
211impl crate::Writable for DMA_C0CONFIG_SPEC {
212 type Writer = W;
213 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
214 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
215}
216#[doc = "`reset()` method sets DMA_C0Config to value 0"]
217impl crate::Resettable for DMA_C0CONFIG_SPEC {
218 const RESET_VALUE: Self::Ux = 0;
219}