lpc43xx/mcpwm/inten_set/
mod.rs1#[doc = r" Value to write to the register"]
2pub struct W {
3 bits: u32,
4}
5impl super::INTEN_SET {
6 #[doc = r" Writes to the register"]
7 #[inline]
8 pub fn write<F>(&self, f: F)
9 where
10 F: FnOnce(&mut W) -> &mut W,
11 {
12 let mut w = W::reset_value();
13 f(&mut w);
14 self.register.set(w.bits);
15 }
16}
17#[doc = r" Proxy"]
18pub struct _ILIM0_SETW<'a> {
19 w: &'a mut W,
20}
21impl<'a> _ILIM0_SETW<'a> {
22 #[doc = r" Sets the field bit"]
23 pub fn set_bit(self) -> &'a mut W {
24 self.bit(true)
25 }
26 #[doc = r" Clears the field bit"]
27 pub fn clear_bit(self) -> &'a mut W {
28 self.bit(false)
29 }
30 #[doc = r" Writes raw bits to the field"]
31 #[inline]
32 pub fn bit(self, value: bool) -> &'a mut W {
33 const MASK: bool = true;
34 const OFFSET: u8 = 0;
35 self.w.bits &= !((MASK as u32) << OFFSET);
36 self.w.bits |= ((value & MASK) as u32) << OFFSET;
37 self.w
38 }
39}
40#[doc = r" Proxy"]
41pub struct _IMAT0_SETW<'a> {
42 w: &'a mut W,
43}
44impl<'a> _IMAT0_SETW<'a> {
45 #[doc = r" Sets the field bit"]
46 pub fn set_bit(self) -> &'a mut W {
47 self.bit(true)
48 }
49 #[doc = r" Clears the field bit"]
50 pub fn clear_bit(self) -> &'a mut W {
51 self.bit(false)
52 }
53 #[doc = r" Writes raw bits to the field"]
54 #[inline]
55 pub fn bit(self, value: bool) -> &'a mut W {
56 const MASK: bool = true;
57 const OFFSET: u8 = 1;
58 self.w.bits &= !((MASK as u32) << OFFSET);
59 self.w.bits |= ((value & MASK) as u32) << OFFSET;
60 self.w
61 }
62}
63#[doc = r" Proxy"]
64pub struct _ICAP0_SETW<'a> {
65 w: &'a mut W,
66}
67impl<'a> _ICAP0_SETW<'a> {
68 #[doc = r" Sets the field bit"]
69 pub fn set_bit(self) -> &'a mut W {
70 self.bit(true)
71 }
72 #[doc = r" Clears the field bit"]
73 pub fn clear_bit(self) -> &'a mut W {
74 self.bit(false)
75 }
76 #[doc = r" Writes raw bits to the field"]
77 #[inline]
78 pub fn bit(self, value: bool) -> &'a mut W {
79 const MASK: bool = true;
80 const OFFSET: u8 = 2;
81 self.w.bits &= !((MASK as u32) << OFFSET);
82 self.w.bits |= ((value & MASK) as u32) << OFFSET;
83 self.w
84 }
85}
86#[doc = r" Proxy"]
87pub struct _ILIM1_SETW<'a> {
88 w: &'a mut W,
89}
90impl<'a> _ILIM1_SETW<'a> {
91 #[doc = r" Sets the field bit"]
92 pub fn set_bit(self) -> &'a mut W {
93 self.bit(true)
94 }
95 #[doc = r" Clears the field bit"]
96 pub fn clear_bit(self) -> &'a mut W {
97 self.bit(false)
98 }
99 #[doc = r" Writes raw bits to the field"]
100 #[inline]
101 pub fn bit(self, value: bool) -> &'a mut W {
102 const MASK: bool = true;
103 const OFFSET: u8 = 4;
104 self.w.bits &= !((MASK as u32) << OFFSET);
105 self.w.bits |= ((value & MASK) as u32) << OFFSET;
106 self.w
107 }
108}
109#[doc = r" Proxy"]
110pub struct _IMAT1_SETW<'a> {
111 w: &'a mut W,
112}
113impl<'a> _IMAT1_SETW<'a> {
114 #[doc = r" Sets the field bit"]
115 pub fn set_bit(self) -> &'a mut W {
116 self.bit(true)
117 }
118 #[doc = r" Clears the field bit"]
119 pub fn clear_bit(self) -> &'a mut W {
120 self.bit(false)
121 }
122 #[doc = r" Writes raw bits to the field"]
123 #[inline]
124 pub fn bit(self, value: bool) -> &'a mut W {
125 const MASK: bool = true;
126 const OFFSET: u8 = 5;
127 self.w.bits &= !((MASK as u32) << OFFSET);
128 self.w.bits |= ((value & MASK) as u32) << OFFSET;
129 self.w
130 }
131}
132#[doc = r" Proxy"]
133pub struct _ICAP1_SETW<'a> {
134 w: &'a mut W,
135}
136impl<'a> _ICAP1_SETW<'a> {
137 #[doc = r" Sets the field bit"]
138 pub fn set_bit(self) -> &'a mut W {
139 self.bit(true)
140 }
141 #[doc = r" Clears the field bit"]
142 pub fn clear_bit(self) -> &'a mut W {
143 self.bit(false)
144 }
145 #[doc = r" Writes raw bits to the field"]
146 #[inline]
147 pub fn bit(self, value: bool) -> &'a mut W {
148 const MASK: bool = true;
149 const OFFSET: u8 = 6;
150 self.w.bits &= !((MASK as u32) << OFFSET);
151 self.w.bits |= ((value & MASK) as u32) << OFFSET;
152 self.w
153 }
154}
155#[doc = r" Proxy"]
156pub struct _ILIM2_SETW<'a> {
157 w: &'a mut W,
158}
159impl<'a> _ILIM2_SETW<'a> {
160 #[doc = r" Sets the field bit"]
161 pub fn set_bit(self) -> &'a mut W {
162 self.bit(true)
163 }
164 #[doc = r" Clears the field bit"]
165 pub fn clear_bit(self) -> &'a mut W {
166 self.bit(false)
167 }
168 #[doc = r" Writes raw bits to the field"]
169 #[inline]
170 pub fn bit(self, value: bool) -> &'a mut W {
171 const MASK: bool = true;
172 const OFFSET: u8 = 9;
173 self.w.bits &= !((MASK as u32) << OFFSET);
174 self.w.bits |= ((value & MASK) as u32) << OFFSET;
175 self.w
176 }
177}
178#[doc = r" Proxy"]
179pub struct _IMAT2_SETW<'a> {
180 w: &'a mut W,
181}
182impl<'a> _IMAT2_SETW<'a> {
183 #[doc = r" Sets the field bit"]
184 pub fn set_bit(self) -> &'a mut W {
185 self.bit(true)
186 }
187 #[doc = r" Clears the field bit"]
188 pub fn clear_bit(self) -> &'a mut W {
189 self.bit(false)
190 }
191 #[doc = r" Writes raw bits to the field"]
192 #[inline]
193 pub fn bit(self, value: bool) -> &'a mut W {
194 const MASK: bool = true;
195 const OFFSET: u8 = 10;
196 self.w.bits &= !((MASK as u32) << OFFSET);
197 self.w.bits |= ((value & MASK) as u32) << OFFSET;
198 self.w
199 }
200}
201#[doc = r" Proxy"]
202pub struct _ICAP2_SETW<'a> {
203 w: &'a mut W,
204}
205impl<'a> _ICAP2_SETW<'a> {
206 #[doc = r" Sets the field bit"]
207 pub fn set_bit(self) -> &'a mut W {
208 self.bit(true)
209 }
210 #[doc = r" Clears the field bit"]
211 pub fn clear_bit(self) -> &'a mut W {
212 self.bit(false)
213 }
214 #[doc = r" Writes raw bits to the field"]
215 #[inline]
216 pub fn bit(self, value: bool) -> &'a mut W {
217 const MASK: bool = true;
218 const OFFSET: u8 = 11;
219 self.w.bits &= !((MASK as u32) << OFFSET);
220 self.w.bits |= ((value & MASK) as u32) << OFFSET;
221 self.w
222 }
223}
224#[doc = r" Proxy"]
225pub struct _ABORT_SETW<'a> {
226 w: &'a mut W,
227}
228impl<'a> _ABORT_SETW<'a> {
229 #[doc = r" Sets the field bit"]
230 pub fn set_bit(self) -> &'a mut W {
231 self.bit(true)
232 }
233 #[doc = r" Clears the field bit"]
234 pub fn clear_bit(self) -> &'a mut W {
235 self.bit(false)
236 }
237 #[doc = r" Writes raw bits to the field"]
238 #[inline]
239 pub fn bit(self, value: bool) -> &'a mut W {
240 const MASK: bool = true;
241 const OFFSET: u8 = 15;
242 self.w.bits &= !((MASK as u32) << OFFSET);
243 self.w.bits |= ((value & MASK) as u32) << OFFSET;
244 self.w
245 }
246}
247impl W {
248 #[doc = r" Reset value of the register"]
249 #[inline]
250 pub fn reset_value() -> W {
251 W { bits: 0 }
252 }
253 #[doc = r" Writes raw bits to the register"]
254 #[inline]
255 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
256 self.bits = bits;
257 self
258 }
259 #[doc = "Bit 0 - Writing a one sets the corresponding bit in INTEN, thus enabling the interrupt."]
260 #[inline]
261 pub fn ilim0_set(&mut self) -> _ILIM0_SETW {
262 _ILIM0_SETW { w: self }
263 }
264 #[doc = "Bit 1 - Writing a one sets the corresponding bit in INTEN, thus enabling the interrupt."]
265 #[inline]
266 pub fn imat0_set(&mut self) -> _IMAT0_SETW {
267 _IMAT0_SETW { w: self }
268 }
269 #[doc = "Bit 2 - Writing a one sets the corresponding bit in INTEN, thus enabling the interrupt."]
270 #[inline]
271 pub fn icap0_set(&mut self) -> _ICAP0_SETW {
272 _ICAP0_SETW { w: self }
273 }
274 #[doc = "Bit 4 - Writing a one sets the corresponding bit in INTEN, thus enabling the interrupt."]
275 #[inline]
276 pub fn ilim1_set(&mut self) -> _ILIM1_SETW {
277 _ILIM1_SETW { w: self }
278 }
279 #[doc = "Bit 5 - Writing a one sets the corresponding bit in INTEN, thus enabling the interrupt."]
280 #[inline]
281 pub fn imat1_set(&mut self) -> _IMAT1_SETW {
282 _IMAT1_SETW { w: self }
283 }
284 #[doc = "Bit 6 - Writing a one sets the corresponding bit in INTEN, thus enabling the interrupt."]
285 #[inline]
286 pub fn icap1_set(&mut self) -> _ICAP1_SETW {
287 _ICAP1_SETW { w: self }
288 }
289 #[doc = "Bit 9 - Writing a one sets the corresponding bit in INTEN, thus enabling the interrupt."]
290 #[inline]
291 pub fn ilim2_set(&mut self) -> _ILIM2_SETW {
292 _ILIM2_SETW { w: self }
293 }
294 #[doc = "Bit 10 - Writing a one sets the corresponding bit in INTEN, thus enabling the interrupt."]
295 #[inline]
296 pub fn imat2_set(&mut self) -> _IMAT2_SETW {
297 _IMAT2_SETW { w: self }
298 }
299 #[doc = "Bit 11 - Writing a one sets the corresponding bit in INTEN, thus enabling the interrupt."]
300 #[inline]
301 pub fn icap2_set(&mut self) -> _ICAP2_SETW {
302 _ICAP2_SETW { w: self }
303 }
304 #[doc = "Bit 15 - Writing a one sets the corresponding bit in INTEN, thus enabling the interrupt."]
305 #[inline]
306 pub fn abort_set(&mut self) -> _ABORT_SETW {
307 _ABORT_SETW { w: self }
308 }
309}