atsamv71n21/xdmac/xdmac_chid/
xdmac_cie.rs1#[doc = "Register `XDMAC_CIE` writer"]
2pub struct W(crate::W<XDMAC_CIE_SPEC>);
3impl core::ops::Deref for W {
4 type Target = crate::W<XDMAC_CIE_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<XDMAC_CIE_SPEC>> for W {
17 #[inline(always)]
18 fn from(writer: crate::W<XDMAC_CIE_SPEC>) -> Self {
19 W(writer)
20 }
21}
22#[doc = "Field `BIE` writer - End of Block Interrupt Enable Bit"]
23pub struct BIE_W<'a> {
24 w: &'a mut W,
25}
26impl<'a> BIE_W<'a> {
27 #[doc = r"Sets the field bit"]
28 #[inline(always)]
29 pub fn set_bit(self) -> &'a mut W {
30 self.bit(true)
31 }
32 #[doc = r"Clears the field bit"]
33 #[inline(always)]
34 pub fn clear_bit(self) -> &'a mut W {
35 self.bit(false)
36 }
37 #[doc = r"Writes raw bits to the field"]
38 #[inline(always)]
39 pub fn bit(self, value: bool) -> &'a mut W {
40 self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
41 self.w
42 }
43}
44#[doc = "Field `LIE` writer - End of Linked List Interrupt Enable Bit"]
45pub struct LIE_W<'a> {
46 w: &'a mut W,
47}
48impl<'a> LIE_W<'a> {
49 #[doc = r"Sets the field bit"]
50 #[inline(always)]
51 pub fn set_bit(self) -> &'a mut W {
52 self.bit(true)
53 }
54 #[doc = r"Clears the field bit"]
55 #[inline(always)]
56 pub fn clear_bit(self) -> &'a mut W {
57 self.bit(false)
58 }
59 #[doc = r"Writes raw bits to the field"]
60 #[inline(always)]
61 pub fn bit(self, value: bool) -> &'a mut W {
62 self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
63 self.w
64 }
65}
66#[doc = "Field `DIE` writer - End of Disable Interrupt Enable Bit"]
67pub struct DIE_W<'a> {
68 w: &'a mut W,
69}
70impl<'a> DIE_W<'a> {
71 #[doc = r"Sets the field bit"]
72 #[inline(always)]
73 pub fn set_bit(self) -> &'a mut W {
74 self.bit(true)
75 }
76 #[doc = r"Clears the field bit"]
77 #[inline(always)]
78 pub fn clear_bit(self) -> &'a mut W {
79 self.bit(false)
80 }
81 #[doc = r"Writes raw bits to the field"]
82 #[inline(always)]
83 pub fn bit(self, value: bool) -> &'a mut W {
84 self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
85 self.w
86 }
87}
88#[doc = "Field `FIE` writer - End of Flush Interrupt Enable Bit"]
89pub struct FIE_W<'a> {
90 w: &'a mut W,
91}
92impl<'a> FIE_W<'a> {
93 #[doc = r"Sets the field bit"]
94 #[inline(always)]
95 pub fn set_bit(self) -> &'a mut W {
96 self.bit(true)
97 }
98 #[doc = r"Clears the field bit"]
99 #[inline(always)]
100 pub fn clear_bit(self) -> &'a mut W {
101 self.bit(false)
102 }
103 #[doc = r"Writes raw bits to the field"]
104 #[inline(always)]
105 pub fn bit(self, value: bool) -> &'a mut W {
106 self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
107 self.w
108 }
109}
110#[doc = "Field `RBIE` writer - Read Bus Error Interrupt Enable Bit"]
111pub struct RBIE_W<'a> {
112 w: &'a mut W,
113}
114impl<'a> RBIE_W<'a> {
115 #[doc = r"Sets the field bit"]
116 #[inline(always)]
117 pub fn set_bit(self) -> &'a mut W {
118 self.bit(true)
119 }
120 #[doc = r"Clears the field bit"]
121 #[inline(always)]
122 pub fn clear_bit(self) -> &'a mut W {
123 self.bit(false)
124 }
125 #[doc = r"Writes raw bits to the field"]
126 #[inline(always)]
127 pub fn bit(self, value: bool) -> &'a mut W {
128 self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
129 self.w
130 }
131}
132#[doc = "Field `WBIE` writer - Write Bus Error Interrupt Enable Bit"]
133pub struct WBIE_W<'a> {
134 w: &'a mut W,
135}
136impl<'a> WBIE_W<'a> {
137 #[doc = r"Sets the field bit"]
138 #[inline(always)]
139 pub fn set_bit(self) -> &'a mut W {
140 self.bit(true)
141 }
142 #[doc = r"Clears the field bit"]
143 #[inline(always)]
144 pub fn clear_bit(self) -> &'a mut W {
145 self.bit(false)
146 }
147 #[doc = r"Writes raw bits to the field"]
148 #[inline(always)]
149 pub fn bit(self, value: bool) -> &'a mut W {
150 self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
151 self.w
152 }
153}
154#[doc = "Field `ROIE` writer - Request Overflow Error Interrupt Enable Bit"]
155pub struct ROIE_W<'a> {
156 w: &'a mut W,
157}
158impl<'a> ROIE_W<'a> {
159 #[doc = r"Sets the field bit"]
160 #[inline(always)]
161 pub fn set_bit(self) -> &'a mut W {
162 self.bit(true)
163 }
164 #[doc = r"Clears the field bit"]
165 #[inline(always)]
166 pub fn clear_bit(self) -> &'a mut W {
167 self.bit(false)
168 }
169 #[doc = r"Writes raw bits to the field"]
170 #[inline(always)]
171 pub fn bit(self, value: bool) -> &'a mut W {
172 self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
173 self.w
174 }
175}
176impl W {
177 #[doc = "Bit 0 - End of Block Interrupt Enable Bit"]
178 #[inline(always)]
179 pub fn bie(&mut self) -> BIE_W {
180 BIE_W { w: self }
181 }
182 #[doc = "Bit 1 - End of Linked List Interrupt Enable Bit"]
183 #[inline(always)]
184 pub fn lie(&mut self) -> LIE_W {
185 LIE_W { w: self }
186 }
187 #[doc = "Bit 2 - End of Disable Interrupt Enable Bit"]
188 #[inline(always)]
189 pub fn die(&mut self) -> DIE_W {
190 DIE_W { w: self }
191 }
192 #[doc = "Bit 3 - End of Flush Interrupt Enable Bit"]
193 #[inline(always)]
194 pub fn fie(&mut self) -> FIE_W {
195 FIE_W { w: self }
196 }
197 #[doc = "Bit 4 - Read Bus Error Interrupt Enable Bit"]
198 #[inline(always)]
199 pub fn rbie(&mut self) -> RBIE_W {
200 RBIE_W { w: self }
201 }
202 #[doc = "Bit 5 - Write Bus Error Interrupt Enable Bit"]
203 #[inline(always)]
204 pub fn wbie(&mut self) -> WBIE_W {
205 WBIE_W { w: self }
206 }
207 #[doc = "Bit 6 - Request Overflow Error Interrupt Enable Bit"]
208 #[inline(always)]
209 pub fn roie(&mut self) -> ROIE_W {
210 ROIE_W { w: self }
211 }
212 #[doc = "Writes raw bits to the register."]
213 #[inline(always)]
214 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
215 self.0.bits(bits);
216 self
217 }
218}
219#[doc = "Channel Interrupt Enable Register (chid = 0)\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 [xdmac_cie](index.html) module"]
220pub struct XDMAC_CIE_SPEC;
221impl crate::RegisterSpec for XDMAC_CIE_SPEC {
222 type Ux = u32;
223}
224#[doc = "`write(|w| ..)` method takes [xdmac_cie::W](W) writer structure"]
225impl crate::Writable for XDMAC_CIE_SPEC {
226 type Writer = W;
227}
228#[doc = "`reset()` method sets XDMAC_CIE to value 0"]
229impl crate::Resettable for XDMAC_CIE_SPEC {
230 #[inline(always)]
231 fn reset_value() -> Self::Ux {
232 0
233 }
234}