1 /**
2 * \file
3 *
4 * \brief SAM CCL
5 *
6 * Copyright (C) 2016 Atmel Corporation. All rights reserved.
7 *
8 * \asf_license_start
9 *
10 * \page License
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions are met:
14 *
15 * 1. Redistributions of source code must retain the above copyright notice,
16 * this list of conditions and the following disclaimer.
17 *
18 * 2. Redistributions in binary form must reproduce the above copyright notice,
19 * this list of conditions and the following disclaimer in the documentation
20 * and/or other materials provided with the distribution.
21 *
22 * 3. The name of Atmel may not be used to endorse or promote products derived
23 * from this software without specific prior written permission.
24 *
25 * 4. This software may only be redistributed and used in connection with an
26 * Atmel microcontroller product.
27 *
28 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
29 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
30 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
31 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
32 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
36 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
37 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 * POSSIBILITY OF SUCH DAMAGE.
39 *
40 * \asf_license_stop
41 */
42
43 #ifdef _SAML21_CCL_COMPONENT_
44 #ifndef _HRI_CCL_L21_H_INCLUDED_
45 #define _HRI_CCL_L21_H_INCLUDED_
46
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50
51 #include <stdbool.h>
52 #include <hal_atomic.h>
53
54 #if defined(ENABLE_CCL_CRITICAL_SECTIONS)
55 #define CCL_CRITICAL_SECTION_ENTER() CRITICAL_SECTION_ENTER()
56 #define CCL_CRITICAL_SECTION_LEAVE() CRITICAL_SECTION_LEAVE()
57 #else
58 #define CCL_CRITICAL_SECTION_ENTER()
59 #define CCL_CRITICAL_SECTION_LEAVE()
60 #endif
61
62 typedef uint32_t hri_ccl_lutctrl_reg_t;
63 typedef uint8_t hri_ccl_ctrl_reg_t;
64 typedef uint8_t hri_ccl_seqctrl_reg_t;
65
hri_ccl_set_CTRL_SWRST_bit(const void * const hw)66 static inline void hri_ccl_set_CTRL_SWRST_bit(const void *const hw)
67 {
68 CCL_CRITICAL_SECTION_ENTER();
69 ((Ccl *)hw)->CTRL.reg |= CCL_CTRL_SWRST;
70 CCL_CRITICAL_SECTION_LEAVE();
71 }
72
hri_ccl_get_CTRL_SWRST_bit(const void * const hw)73 static inline bool hri_ccl_get_CTRL_SWRST_bit(const void *const hw)
74 {
75 uint8_t tmp;
76 tmp = ((Ccl *)hw)->CTRL.reg;
77 tmp = (tmp & CCL_CTRL_SWRST) >> CCL_CTRL_SWRST_Pos;
78 return (bool)tmp;
79 }
80
hri_ccl_set_CTRL_ENABLE_bit(const void * const hw)81 static inline void hri_ccl_set_CTRL_ENABLE_bit(const void *const hw)
82 {
83 CCL_CRITICAL_SECTION_ENTER();
84 ((Ccl *)hw)->CTRL.reg |= CCL_CTRL_ENABLE;
85 CCL_CRITICAL_SECTION_LEAVE();
86 }
87
hri_ccl_get_CTRL_ENABLE_bit(const void * const hw)88 static inline bool hri_ccl_get_CTRL_ENABLE_bit(const void *const hw)
89 {
90 uint8_t tmp;
91 tmp = ((Ccl *)hw)->CTRL.reg;
92 tmp = (tmp & CCL_CTRL_ENABLE) >> CCL_CTRL_ENABLE_Pos;
93 return (bool)tmp;
94 }
95
hri_ccl_write_CTRL_ENABLE_bit(const void * const hw,bool value)96 static inline void hri_ccl_write_CTRL_ENABLE_bit(const void *const hw, bool value)
97 {
98 uint8_t tmp;
99 CCL_CRITICAL_SECTION_ENTER();
100 tmp = ((Ccl *)hw)->CTRL.reg;
101 tmp &= ~CCL_CTRL_ENABLE;
102 tmp |= value << CCL_CTRL_ENABLE_Pos;
103 ((Ccl *)hw)->CTRL.reg = tmp;
104 CCL_CRITICAL_SECTION_LEAVE();
105 }
106
hri_ccl_clear_CTRL_ENABLE_bit(const void * const hw)107 static inline void hri_ccl_clear_CTRL_ENABLE_bit(const void *const hw)
108 {
109 CCL_CRITICAL_SECTION_ENTER();
110 ((Ccl *)hw)->CTRL.reg &= ~CCL_CTRL_ENABLE;
111 CCL_CRITICAL_SECTION_LEAVE();
112 }
113
hri_ccl_toggle_CTRL_ENABLE_bit(const void * const hw)114 static inline void hri_ccl_toggle_CTRL_ENABLE_bit(const void *const hw)
115 {
116 CCL_CRITICAL_SECTION_ENTER();
117 ((Ccl *)hw)->CTRL.reg ^= CCL_CTRL_ENABLE;
118 CCL_CRITICAL_SECTION_LEAVE();
119 }
120
hri_ccl_set_CTRL_RUNSTDBY_bit(const void * const hw)121 static inline void hri_ccl_set_CTRL_RUNSTDBY_bit(const void *const hw)
122 {
123 CCL_CRITICAL_SECTION_ENTER();
124 ((Ccl *)hw)->CTRL.reg |= CCL_CTRL_RUNSTDBY;
125 CCL_CRITICAL_SECTION_LEAVE();
126 }
127
hri_ccl_get_CTRL_RUNSTDBY_bit(const void * const hw)128 static inline bool hri_ccl_get_CTRL_RUNSTDBY_bit(const void *const hw)
129 {
130 uint8_t tmp;
131 tmp = ((Ccl *)hw)->CTRL.reg;
132 tmp = (tmp & CCL_CTRL_RUNSTDBY) >> CCL_CTRL_RUNSTDBY_Pos;
133 return (bool)tmp;
134 }
135
hri_ccl_write_CTRL_RUNSTDBY_bit(const void * const hw,bool value)136 static inline void hri_ccl_write_CTRL_RUNSTDBY_bit(const void *const hw, bool value)
137 {
138 uint8_t tmp;
139 CCL_CRITICAL_SECTION_ENTER();
140 tmp = ((Ccl *)hw)->CTRL.reg;
141 tmp &= ~CCL_CTRL_RUNSTDBY;
142 tmp |= value << CCL_CTRL_RUNSTDBY_Pos;
143 ((Ccl *)hw)->CTRL.reg = tmp;
144 CCL_CRITICAL_SECTION_LEAVE();
145 }
146
hri_ccl_clear_CTRL_RUNSTDBY_bit(const void * const hw)147 static inline void hri_ccl_clear_CTRL_RUNSTDBY_bit(const void *const hw)
148 {
149 CCL_CRITICAL_SECTION_ENTER();
150 ((Ccl *)hw)->CTRL.reg &= ~CCL_CTRL_RUNSTDBY;
151 CCL_CRITICAL_SECTION_LEAVE();
152 }
153
hri_ccl_toggle_CTRL_RUNSTDBY_bit(const void * const hw)154 static inline void hri_ccl_toggle_CTRL_RUNSTDBY_bit(const void *const hw)
155 {
156 CCL_CRITICAL_SECTION_ENTER();
157 ((Ccl *)hw)->CTRL.reg ^= CCL_CTRL_RUNSTDBY;
158 CCL_CRITICAL_SECTION_LEAVE();
159 }
160
hri_ccl_set_CTRL_reg(const void * const hw,hri_ccl_ctrl_reg_t mask)161 static inline void hri_ccl_set_CTRL_reg(const void *const hw, hri_ccl_ctrl_reg_t mask)
162 {
163 CCL_CRITICAL_SECTION_ENTER();
164 ((Ccl *)hw)->CTRL.reg |= mask;
165 CCL_CRITICAL_SECTION_LEAVE();
166 }
167
hri_ccl_get_CTRL_reg(const void * const hw,hri_ccl_ctrl_reg_t mask)168 static inline hri_ccl_ctrl_reg_t hri_ccl_get_CTRL_reg(const void *const hw, hri_ccl_ctrl_reg_t mask)
169 {
170 uint8_t tmp;
171 tmp = ((Ccl *)hw)->CTRL.reg;
172 tmp &= mask;
173 return tmp;
174 }
175
hri_ccl_write_CTRL_reg(const void * const hw,hri_ccl_ctrl_reg_t data)176 static inline void hri_ccl_write_CTRL_reg(const void *const hw, hri_ccl_ctrl_reg_t data)
177 {
178 CCL_CRITICAL_SECTION_ENTER();
179 ((Ccl *)hw)->CTRL.reg = data;
180 CCL_CRITICAL_SECTION_LEAVE();
181 }
182
hri_ccl_clear_CTRL_reg(const void * const hw,hri_ccl_ctrl_reg_t mask)183 static inline void hri_ccl_clear_CTRL_reg(const void *const hw, hri_ccl_ctrl_reg_t mask)
184 {
185 CCL_CRITICAL_SECTION_ENTER();
186 ((Ccl *)hw)->CTRL.reg &= ~mask;
187 CCL_CRITICAL_SECTION_LEAVE();
188 }
189
hri_ccl_toggle_CTRL_reg(const void * const hw,hri_ccl_ctrl_reg_t mask)190 static inline void hri_ccl_toggle_CTRL_reg(const void *const hw, hri_ccl_ctrl_reg_t mask)
191 {
192 CCL_CRITICAL_SECTION_ENTER();
193 ((Ccl *)hw)->CTRL.reg ^= mask;
194 CCL_CRITICAL_SECTION_LEAVE();
195 }
196
hri_ccl_read_CTRL_reg(const void * const hw)197 static inline hri_ccl_ctrl_reg_t hri_ccl_read_CTRL_reg(const void *const hw)
198 {
199 return ((Ccl *)hw)->CTRL.reg;
200 }
201
hri_ccl_set_SEQCTRL_SEQSEL_bf(const void * const hw,uint8_t index,hri_ccl_seqctrl_reg_t mask)202 static inline void hri_ccl_set_SEQCTRL_SEQSEL_bf(const void *const hw, uint8_t index, hri_ccl_seqctrl_reg_t mask)
203 {
204 CCL_CRITICAL_SECTION_ENTER();
205 ((Ccl *)hw)->SEQCTRL[index].reg |= CCL_SEQCTRL_SEQSEL(mask);
206 CCL_CRITICAL_SECTION_LEAVE();
207 }
208
hri_ccl_get_SEQCTRL_SEQSEL_bf(const void * const hw,uint8_t index,hri_ccl_seqctrl_reg_t mask)209 static inline hri_ccl_seqctrl_reg_t hri_ccl_get_SEQCTRL_SEQSEL_bf(const void *const hw, uint8_t index,
210 hri_ccl_seqctrl_reg_t mask)
211 {
212 uint8_t tmp;
213 tmp = ((Ccl *)hw)->SEQCTRL[index].reg;
214 tmp = (tmp & CCL_SEQCTRL_SEQSEL(mask)) >> CCL_SEQCTRL_SEQSEL_Pos;
215 return tmp;
216 }
217
hri_ccl_write_SEQCTRL_SEQSEL_bf(const void * const hw,uint8_t index,hri_ccl_seqctrl_reg_t data)218 static inline void hri_ccl_write_SEQCTRL_SEQSEL_bf(const void *const hw, uint8_t index, hri_ccl_seqctrl_reg_t data)
219 {
220 uint8_t tmp;
221 CCL_CRITICAL_SECTION_ENTER();
222 tmp = ((Ccl *)hw)->SEQCTRL[index].reg;
223 tmp &= ~CCL_SEQCTRL_SEQSEL_Msk;
224 tmp |= CCL_SEQCTRL_SEQSEL(data);
225 ((Ccl *)hw)->SEQCTRL[index].reg = tmp;
226 CCL_CRITICAL_SECTION_LEAVE();
227 }
228
hri_ccl_clear_SEQCTRL_SEQSEL_bf(const void * const hw,uint8_t index,hri_ccl_seqctrl_reg_t mask)229 static inline void hri_ccl_clear_SEQCTRL_SEQSEL_bf(const void *const hw, uint8_t index, hri_ccl_seqctrl_reg_t mask)
230 {
231 CCL_CRITICAL_SECTION_ENTER();
232 ((Ccl *)hw)->SEQCTRL[index].reg &= ~CCL_SEQCTRL_SEQSEL(mask);
233 CCL_CRITICAL_SECTION_LEAVE();
234 }
235
hri_ccl_toggle_SEQCTRL_SEQSEL_bf(const void * const hw,uint8_t index,hri_ccl_seqctrl_reg_t mask)236 static inline void hri_ccl_toggle_SEQCTRL_SEQSEL_bf(const void *const hw, uint8_t index, hri_ccl_seqctrl_reg_t mask)
237 {
238 CCL_CRITICAL_SECTION_ENTER();
239 ((Ccl *)hw)->SEQCTRL[index].reg ^= CCL_SEQCTRL_SEQSEL(mask);
240 CCL_CRITICAL_SECTION_LEAVE();
241 }
242
hri_ccl_read_SEQCTRL_SEQSEL_bf(const void * const hw,uint8_t index)243 static inline hri_ccl_seqctrl_reg_t hri_ccl_read_SEQCTRL_SEQSEL_bf(const void *const hw, uint8_t index)
244 {
245 uint8_t tmp;
246 tmp = ((Ccl *)hw)->SEQCTRL[index].reg;
247 tmp = (tmp & CCL_SEQCTRL_SEQSEL_Msk) >> CCL_SEQCTRL_SEQSEL_Pos;
248 return tmp;
249 }
250
hri_ccl_set_SEQCTRL_reg(const void * const hw,uint8_t index,hri_ccl_seqctrl_reg_t mask)251 static inline void hri_ccl_set_SEQCTRL_reg(const void *const hw, uint8_t index, hri_ccl_seqctrl_reg_t mask)
252 {
253 CCL_CRITICAL_SECTION_ENTER();
254 ((Ccl *)hw)->SEQCTRL[index].reg |= mask;
255 CCL_CRITICAL_SECTION_LEAVE();
256 }
257
hri_ccl_get_SEQCTRL_reg(const void * const hw,uint8_t index,hri_ccl_seqctrl_reg_t mask)258 static inline hri_ccl_seqctrl_reg_t hri_ccl_get_SEQCTRL_reg(const void *const hw, uint8_t index,
259 hri_ccl_seqctrl_reg_t mask)
260 {
261 uint8_t tmp;
262 tmp = ((Ccl *)hw)->SEQCTRL[index].reg;
263 tmp &= mask;
264 return tmp;
265 }
266
hri_ccl_write_SEQCTRL_reg(const void * const hw,uint8_t index,hri_ccl_seqctrl_reg_t data)267 static inline void hri_ccl_write_SEQCTRL_reg(const void *const hw, uint8_t index, hri_ccl_seqctrl_reg_t data)
268 {
269 CCL_CRITICAL_SECTION_ENTER();
270 ((Ccl *)hw)->SEQCTRL[index].reg = data;
271 CCL_CRITICAL_SECTION_LEAVE();
272 }
273
hri_ccl_clear_SEQCTRL_reg(const void * const hw,uint8_t index,hri_ccl_seqctrl_reg_t mask)274 static inline void hri_ccl_clear_SEQCTRL_reg(const void *const hw, uint8_t index, hri_ccl_seqctrl_reg_t mask)
275 {
276 CCL_CRITICAL_SECTION_ENTER();
277 ((Ccl *)hw)->SEQCTRL[index].reg &= ~mask;
278 CCL_CRITICAL_SECTION_LEAVE();
279 }
280
hri_ccl_toggle_SEQCTRL_reg(const void * const hw,uint8_t index,hri_ccl_seqctrl_reg_t mask)281 static inline void hri_ccl_toggle_SEQCTRL_reg(const void *const hw, uint8_t index, hri_ccl_seqctrl_reg_t mask)
282 {
283 CCL_CRITICAL_SECTION_ENTER();
284 ((Ccl *)hw)->SEQCTRL[index].reg ^= mask;
285 CCL_CRITICAL_SECTION_LEAVE();
286 }
287
hri_ccl_read_SEQCTRL_reg(const void * const hw,uint8_t index)288 static inline hri_ccl_seqctrl_reg_t hri_ccl_read_SEQCTRL_reg(const void *const hw, uint8_t index)
289 {
290 return ((Ccl *)hw)->SEQCTRL[index].reg;
291 }
292
hri_ccl_set_LUTCTRL_ENABLE_bit(const void * const hw,uint8_t index)293 static inline void hri_ccl_set_LUTCTRL_ENABLE_bit(const void *const hw, uint8_t index)
294 {
295 CCL_CRITICAL_SECTION_ENTER();
296 ((Ccl *)hw)->LUTCTRL[index].reg |= CCL_LUTCTRL_ENABLE;
297 CCL_CRITICAL_SECTION_LEAVE();
298 }
299
hri_ccl_get_LUTCTRL_ENABLE_bit(const void * const hw,uint8_t index)300 static inline bool hri_ccl_get_LUTCTRL_ENABLE_bit(const void *const hw, uint8_t index)
301 {
302 uint32_t tmp;
303 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
304 tmp = (tmp & CCL_LUTCTRL_ENABLE) >> CCL_LUTCTRL_ENABLE_Pos;
305 return (bool)tmp;
306 }
307
hri_ccl_write_LUTCTRL_ENABLE_bit(const void * const hw,uint8_t index,bool value)308 static inline void hri_ccl_write_LUTCTRL_ENABLE_bit(const void *const hw, uint8_t index, bool value)
309 {
310 uint32_t tmp;
311 CCL_CRITICAL_SECTION_ENTER();
312 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
313 tmp &= ~CCL_LUTCTRL_ENABLE;
314 tmp |= value << CCL_LUTCTRL_ENABLE_Pos;
315 ((Ccl *)hw)->LUTCTRL[index].reg = tmp;
316 CCL_CRITICAL_SECTION_LEAVE();
317 }
318
hri_ccl_clear_LUTCTRL_ENABLE_bit(const void * const hw,uint8_t index)319 static inline void hri_ccl_clear_LUTCTRL_ENABLE_bit(const void *const hw, uint8_t index)
320 {
321 CCL_CRITICAL_SECTION_ENTER();
322 ((Ccl *)hw)->LUTCTRL[index].reg &= ~CCL_LUTCTRL_ENABLE;
323 CCL_CRITICAL_SECTION_LEAVE();
324 }
325
hri_ccl_toggle_LUTCTRL_ENABLE_bit(const void * const hw,uint8_t index)326 static inline void hri_ccl_toggle_LUTCTRL_ENABLE_bit(const void *const hw, uint8_t index)
327 {
328 CCL_CRITICAL_SECTION_ENTER();
329 ((Ccl *)hw)->LUTCTRL[index].reg ^= CCL_LUTCTRL_ENABLE;
330 CCL_CRITICAL_SECTION_LEAVE();
331 }
332
hri_ccl_set_LUTCTRL_EDGESEL_bit(const void * const hw,uint8_t index)333 static inline void hri_ccl_set_LUTCTRL_EDGESEL_bit(const void *const hw, uint8_t index)
334 {
335 CCL_CRITICAL_SECTION_ENTER();
336 ((Ccl *)hw)->LUTCTRL[index].reg |= CCL_LUTCTRL_EDGESEL;
337 CCL_CRITICAL_SECTION_LEAVE();
338 }
339
hri_ccl_get_LUTCTRL_EDGESEL_bit(const void * const hw,uint8_t index)340 static inline bool hri_ccl_get_LUTCTRL_EDGESEL_bit(const void *const hw, uint8_t index)
341 {
342 uint32_t tmp;
343 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
344 tmp = (tmp & CCL_LUTCTRL_EDGESEL) >> CCL_LUTCTRL_EDGESEL_Pos;
345 return (bool)tmp;
346 }
347
hri_ccl_write_LUTCTRL_EDGESEL_bit(const void * const hw,uint8_t index,bool value)348 static inline void hri_ccl_write_LUTCTRL_EDGESEL_bit(const void *const hw, uint8_t index, bool value)
349 {
350 uint32_t tmp;
351 CCL_CRITICAL_SECTION_ENTER();
352 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
353 tmp &= ~CCL_LUTCTRL_EDGESEL;
354 tmp |= value << CCL_LUTCTRL_EDGESEL_Pos;
355 ((Ccl *)hw)->LUTCTRL[index].reg = tmp;
356 CCL_CRITICAL_SECTION_LEAVE();
357 }
358
hri_ccl_clear_LUTCTRL_EDGESEL_bit(const void * const hw,uint8_t index)359 static inline void hri_ccl_clear_LUTCTRL_EDGESEL_bit(const void *const hw, uint8_t index)
360 {
361 CCL_CRITICAL_SECTION_ENTER();
362 ((Ccl *)hw)->LUTCTRL[index].reg &= ~CCL_LUTCTRL_EDGESEL;
363 CCL_CRITICAL_SECTION_LEAVE();
364 }
365
hri_ccl_toggle_LUTCTRL_EDGESEL_bit(const void * const hw,uint8_t index)366 static inline void hri_ccl_toggle_LUTCTRL_EDGESEL_bit(const void *const hw, uint8_t index)
367 {
368 CCL_CRITICAL_SECTION_ENTER();
369 ((Ccl *)hw)->LUTCTRL[index].reg ^= CCL_LUTCTRL_EDGESEL;
370 CCL_CRITICAL_SECTION_LEAVE();
371 }
372
hri_ccl_set_LUTCTRL_INVEI_bit(const void * const hw,uint8_t index)373 static inline void hri_ccl_set_LUTCTRL_INVEI_bit(const void *const hw, uint8_t index)
374 {
375 CCL_CRITICAL_SECTION_ENTER();
376 ((Ccl *)hw)->LUTCTRL[index].reg |= CCL_LUTCTRL_INVEI;
377 CCL_CRITICAL_SECTION_LEAVE();
378 }
379
hri_ccl_get_LUTCTRL_INVEI_bit(const void * const hw,uint8_t index)380 static inline bool hri_ccl_get_LUTCTRL_INVEI_bit(const void *const hw, uint8_t index)
381 {
382 uint32_t tmp;
383 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
384 tmp = (tmp & CCL_LUTCTRL_INVEI) >> CCL_LUTCTRL_INVEI_Pos;
385 return (bool)tmp;
386 }
387
hri_ccl_write_LUTCTRL_INVEI_bit(const void * const hw,uint8_t index,bool value)388 static inline void hri_ccl_write_LUTCTRL_INVEI_bit(const void *const hw, uint8_t index, bool value)
389 {
390 uint32_t tmp;
391 CCL_CRITICAL_SECTION_ENTER();
392 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
393 tmp &= ~CCL_LUTCTRL_INVEI;
394 tmp |= value << CCL_LUTCTRL_INVEI_Pos;
395 ((Ccl *)hw)->LUTCTRL[index].reg = tmp;
396 CCL_CRITICAL_SECTION_LEAVE();
397 }
398
hri_ccl_clear_LUTCTRL_INVEI_bit(const void * const hw,uint8_t index)399 static inline void hri_ccl_clear_LUTCTRL_INVEI_bit(const void *const hw, uint8_t index)
400 {
401 CCL_CRITICAL_SECTION_ENTER();
402 ((Ccl *)hw)->LUTCTRL[index].reg &= ~CCL_LUTCTRL_INVEI;
403 CCL_CRITICAL_SECTION_LEAVE();
404 }
405
hri_ccl_toggle_LUTCTRL_INVEI_bit(const void * const hw,uint8_t index)406 static inline void hri_ccl_toggle_LUTCTRL_INVEI_bit(const void *const hw, uint8_t index)
407 {
408 CCL_CRITICAL_SECTION_ENTER();
409 ((Ccl *)hw)->LUTCTRL[index].reg ^= CCL_LUTCTRL_INVEI;
410 CCL_CRITICAL_SECTION_LEAVE();
411 }
412
hri_ccl_set_LUTCTRL_LUTEI_bit(const void * const hw,uint8_t index)413 static inline void hri_ccl_set_LUTCTRL_LUTEI_bit(const void *const hw, uint8_t index)
414 {
415 CCL_CRITICAL_SECTION_ENTER();
416 ((Ccl *)hw)->LUTCTRL[index].reg |= CCL_LUTCTRL_LUTEI;
417 CCL_CRITICAL_SECTION_LEAVE();
418 }
419
hri_ccl_get_LUTCTRL_LUTEI_bit(const void * const hw,uint8_t index)420 static inline bool hri_ccl_get_LUTCTRL_LUTEI_bit(const void *const hw, uint8_t index)
421 {
422 uint32_t tmp;
423 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
424 tmp = (tmp & CCL_LUTCTRL_LUTEI) >> CCL_LUTCTRL_LUTEI_Pos;
425 return (bool)tmp;
426 }
427
hri_ccl_write_LUTCTRL_LUTEI_bit(const void * const hw,uint8_t index,bool value)428 static inline void hri_ccl_write_LUTCTRL_LUTEI_bit(const void *const hw, uint8_t index, bool value)
429 {
430 uint32_t tmp;
431 CCL_CRITICAL_SECTION_ENTER();
432 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
433 tmp &= ~CCL_LUTCTRL_LUTEI;
434 tmp |= value << CCL_LUTCTRL_LUTEI_Pos;
435 ((Ccl *)hw)->LUTCTRL[index].reg = tmp;
436 CCL_CRITICAL_SECTION_LEAVE();
437 }
438
hri_ccl_clear_LUTCTRL_LUTEI_bit(const void * const hw,uint8_t index)439 static inline void hri_ccl_clear_LUTCTRL_LUTEI_bit(const void *const hw, uint8_t index)
440 {
441 CCL_CRITICAL_SECTION_ENTER();
442 ((Ccl *)hw)->LUTCTRL[index].reg &= ~CCL_LUTCTRL_LUTEI;
443 CCL_CRITICAL_SECTION_LEAVE();
444 }
445
hri_ccl_toggle_LUTCTRL_LUTEI_bit(const void * const hw,uint8_t index)446 static inline void hri_ccl_toggle_LUTCTRL_LUTEI_bit(const void *const hw, uint8_t index)
447 {
448 CCL_CRITICAL_SECTION_ENTER();
449 ((Ccl *)hw)->LUTCTRL[index].reg ^= CCL_LUTCTRL_LUTEI;
450 CCL_CRITICAL_SECTION_LEAVE();
451 }
452
hri_ccl_set_LUTCTRL_LUTEO_bit(const void * const hw,uint8_t index)453 static inline void hri_ccl_set_LUTCTRL_LUTEO_bit(const void *const hw, uint8_t index)
454 {
455 CCL_CRITICAL_SECTION_ENTER();
456 ((Ccl *)hw)->LUTCTRL[index].reg |= CCL_LUTCTRL_LUTEO;
457 CCL_CRITICAL_SECTION_LEAVE();
458 }
459
hri_ccl_get_LUTCTRL_LUTEO_bit(const void * const hw,uint8_t index)460 static inline bool hri_ccl_get_LUTCTRL_LUTEO_bit(const void *const hw, uint8_t index)
461 {
462 uint32_t tmp;
463 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
464 tmp = (tmp & CCL_LUTCTRL_LUTEO) >> CCL_LUTCTRL_LUTEO_Pos;
465 return (bool)tmp;
466 }
467
hri_ccl_write_LUTCTRL_LUTEO_bit(const void * const hw,uint8_t index,bool value)468 static inline void hri_ccl_write_LUTCTRL_LUTEO_bit(const void *const hw, uint8_t index, bool value)
469 {
470 uint32_t tmp;
471 CCL_CRITICAL_SECTION_ENTER();
472 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
473 tmp &= ~CCL_LUTCTRL_LUTEO;
474 tmp |= value << CCL_LUTCTRL_LUTEO_Pos;
475 ((Ccl *)hw)->LUTCTRL[index].reg = tmp;
476 CCL_CRITICAL_SECTION_LEAVE();
477 }
478
hri_ccl_clear_LUTCTRL_LUTEO_bit(const void * const hw,uint8_t index)479 static inline void hri_ccl_clear_LUTCTRL_LUTEO_bit(const void *const hw, uint8_t index)
480 {
481 CCL_CRITICAL_SECTION_ENTER();
482 ((Ccl *)hw)->LUTCTRL[index].reg &= ~CCL_LUTCTRL_LUTEO;
483 CCL_CRITICAL_SECTION_LEAVE();
484 }
485
hri_ccl_toggle_LUTCTRL_LUTEO_bit(const void * const hw,uint8_t index)486 static inline void hri_ccl_toggle_LUTCTRL_LUTEO_bit(const void *const hw, uint8_t index)
487 {
488 CCL_CRITICAL_SECTION_ENTER();
489 ((Ccl *)hw)->LUTCTRL[index].reg ^= CCL_LUTCTRL_LUTEO;
490 CCL_CRITICAL_SECTION_LEAVE();
491 }
492
hri_ccl_set_LUTCTRL_FILTSEL_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)493 static inline void hri_ccl_set_LUTCTRL_FILTSEL_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
494 {
495 CCL_CRITICAL_SECTION_ENTER();
496 ((Ccl *)hw)->LUTCTRL[index].reg |= CCL_LUTCTRL_FILTSEL(mask);
497 CCL_CRITICAL_SECTION_LEAVE();
498 }
499
hri_ccl_get_LUTCTRL_FILTSEL_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)500 static inline hri_ccl_lutctrl_reg_t hri_ccl_get_LUTCTRL_FILTSEL_bf(const void *const hw, uint8_t index,
501 hri_ccl_lutctrl_reg_t mask)
502 {
503 uint32_t tmp;
504 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
505 tmp = (tmp & CCL_LUTCTRL_FILTSEL(mask)) >> CCL_LUTCTRL_FILTSEL_Pos;
506 return tmp;
507 }
508
hri_ccl_write_LUTCTRL_FILTSEL_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t data)509 static inline void hri_ccl_write_LUTCTRL_FILTSEL_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t data)
510 {
511 uint32_t tmp;
512 CCL_CRITICAL_SECTION_ENTER();
513 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
514 tmp &= ~CCL_LUTCTRL_FILTSEL_Msk;
515 tmp |= CCL_LUTCTRL_FILTSEL(data);
516 ((Ccl *)hw)->LUTCTRL[index].reg = tmp;
517 CCL_CRITICAL_SECTION_LEAVE();
518 }
519
hri_ccl_clear_LUTCTRL_FILTSEL_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)520 static inline void hri_ccl_clear_LUTCTRL_FILTSEL_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
521 {
522 CCL_CRITICAL_SECTION_ENTER();
523 ((Ccl *)hw)->LUTCTRL[index].reg &= ~CCL_LUTCTRL_FILTSEL(mask);
524 CCL_CRITICAL_SECTION_LEAVE();
525 }
526
hri_ccl_toggle_LUTCTRL_FILTSEL_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)527 static inline void hri_ccl_toggle_LUTCTRL_FILTSEL_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
528 {
529 CCL_CRITICAL_SECTION_ENTER();
530 ((Ccl *)hw)->LUTCTRL[index].reg ^= CCL_LUTCTRL_FILTSEL(mask);
531 CCL_CRITICAL_SECTION_LEAVE();
532 }
533
hri_ccl_read_LUTCTRL_FILTSEL_bf(const void * const hw,uint8_t index)534 static inline hri_ccl_lutctrl_reg_t hri_ccl_read_LUTCTRL_FILTSEL_bf(const void *const hw, uint8_t index)
535 {
536 uint32_t tmp;
537 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
538 tmp = (tmp & CCL_LUTCTRL_FILTSEL_Msk) >> CCL_LUTCTRL_FILTSEL_Pos;
539 return tmp;
540 }
541
hri_ccl_set_LUTCTRL_INSEL0_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)542 static inline void hri_ccl_set_LUTCTRL_INSEL0_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
543 {
544 CCL_CRITICAL_SECTION_ENTER();
545 ((Ccl *)hw)->LUTCTRL[index].reg |= CCL_LUTCTRL_INSEL0(mask);
546 CCL_CRITICAL_SECTION_LEAVE();
547 }
548
hri_ccl_get_LUTCTRL_INSEL0_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)549 static inline hri_ccl_lutctrl_reg_t hri_ccl_get_LUTCTRL_INSEL0_bf(const void *const hw, uint8_t index,
550 hri_ccl_lutctrl_reg_t mask)
551 {
552 uint32_t tmp;
553 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
554 tmp = (tmp & CCL_LUTCTRL_INSEL0(mask)) >> CCL_LUTCTRL_INSEL0_Pos;
555 return tmp;
556 }
557
hri_ccl_write_LUTCTRL_INSEL0_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t data)558 static inline void hri_ccl_write_LUTCTRL_INSEL0_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t data)
559 {
560 uint32_t tmp;
561 CCL_CRITICAL_SECTION_ENTER();
562 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
563 tmp &= ~CCL_LUTCTRL_INSEL0_Msk;
564 tmp |= CCL_LUTCTRL_INSEL0(data);
565 ((Ccl *)hw)->LUTCTRL[index].reg = tmp;
566 CCL_CRITICAL_SECTION_LEAVE();
567 }
568
hri_ccl_clear_LUTCTRL_INSEL0_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)569 static inline void hri_ccl_clear_LUTCTRL_INSEL0_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
570 {
571 CCL_CRITICAL_SECTION_ENTER();
572 ((Ccl *)hw)->LUTCTRL[index].reg &= ~CCL_LUTCTRL_INSEL0(mask);
573 CCL_CRITICAL_SECTION_LEAVE();
574 }
575
hri_ccl_toggle_LUTCTRL_INSEL0_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)576 static inline void hri_ccl_toggle_LUTCTRL_INSEL0_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
577 {
578 CCL_CRITICAL_SECTION_ENTER();
579 ((Ccl *)hw)->LUTCTRL[index].reg ^= CCL_LUTCTRL_INSEL0(mask);
580 CCL_CRITICAL_SECTION_LEAVE();
581 }
582
hri_ccl_read_LUTCTRL_INSEL0_bf(const void * const hw,uint8_t index)583 static inline hri_ccl_lutctrl_reg_t hri_ccl_read_LUTCTRL_INSEL0_bf(const void *const hw, uint8_t index)
584 {
585 uint32_t tmp;
586 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
587 tmp = (tmp & CCL_LUTCTRL_INSEL0_Msk) >> CCL_LUTCTRL_INSEL0_Pos;
588 return tmp;
589 }
590
hri_ccl_set_LUTCTRL_INSEL1_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)591 static inline void hri_ccl_set_LUTCTRL_INSEL1_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
592 {
593 CCL_CRITICAL_SECTION_ENTER();
594 ((Ccl *)hw)->LUTCTRL[index].reg |= CCL_LUTCTRL_INSEL1(mask);
595 CCL_CRITICAL_SECTION_LEAVE();
596 }
597
hri_ccl_get_LUTCTRL_INSEL1_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)598 static inline hri_ccl_lutctrl_reg_t hri_ccl_get_LUTCTRL_INSEL1_bf(const void *const hw, uint8_t index,
599 hri_ccl_lutctrl_reg_t mask)
600 {
601 uint32_t tmp;
602 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
603 tmp = (tmp & CCL_LUTCTRL_INSEL1(mask)) >> CCL_LUTCTRL_INSEL1_Pos;
604 return tmp;
605 }
606
hri_ccl_write_LUTCTRL_INSEL1_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t data)607 static inline void hri_ccl_write_LUTCTRL_INSEL1_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t data)
608 {
609 uint32_t tmp;
610 CCL_CRITICAL_SECTION_ENTER();
611 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
612 tmp &= ~CCL_LUTCTRL_INSEL1_Msk;
613 tmp |= CCL_LUTCTRL_INSEL1(data);
614 ((Ccl *)hw)->LUTCTRL[index].reg = tmp;
615 CCL_CRITICAL_SECTION_LEAVE();
616 }
617
hri_ccl_clear_LUTCTRL_INSEL1_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)618 static inline void hri_ccl_clear_LUTCTRL_INSEL1_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
619 {
620 CCL_CRITICAL_SECTION_ENTER();
621 ((Ccl *)hw)->LUTCTRL[index].reg &= ~CCL_LUTCTRL_INSEL1(mask);
622 CCL_CRITICAL_SECTION_LEAVE();
623 }
624
hri_ccl_toggle_LUTCTRL_INSEL1_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)625 static inline void hri_ccl_toggle_LUTCTRL_INSEL1_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
626 {
627 CCL_CRITICAL_SECTION_ENTER();
628 ((Ccl *)hw)->LUTCTRL[index].reg ^= CCL_LUTCTRL_INSEL1(mask);
629 CCL_CRITICAL_SECTION_LEAVE();
630 }
631
hri_ccl_read_LUTCTRL_INSEL1_bf(const void * const hw,uint8_t index)632 static inline hri_ccl_lutctrl_reg_t hri_ccl_read_LUTCTRL_INSEL1_bf(const void *const hw, uint8_t index)
633 {
634 uint32_t tmp;
635 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
636 tmp = (tmp & CCL_LUTCTRL_INSEL1_Msk) >> CCL_LUTCTRL_INSEL1_Pos;
637 return tmp;
638 }
639
hri_ccl_set_LUTCTRL_INSEL2_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)640 static inline void hri_ccl_set_LUTCTRL_INSEL2_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
641 {
642 CCL_CRITICAL_SECTION_ENTER();
643 ((Ccl *)hw)->LUTCTRL[index].reg |= CCL_LUTCTRL_INSEL2(mask);
644 CCL_CRITICAL_SECTION_LEAVE();
645 }
646
hri_ccl_get_LUTCTRL_INSEL2_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)647 static inline hri_ccl_lutctrl_reg_t hri_ccl_get_LUTCTRL_INSEL2_bf(const void *const hw, uint8_t index,
648 hri_ccl_lutctrl_reg_t mask)
649 {
650 uint32_t tmp;
651 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
652 tmp = (tmp & CCL_LUTCTRL_INSEL2(mask)) >> CCL_LUTCTRL_INSEL2_Pos;
653 return tmp;
654 }
655
hri_ccl_write_LUTCTRL_INSEL2_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t data)656 static inline void hri_ccl_write_LUTCTRL_INSEL2_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t data)
657 {
658 uint32_t tmp;
659 CCL_CRITICAL_SECTION_ENTER();
660 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
661 tmp &= ~CCL_LUTCTRL_INSEL2_Msk;
662 tmp |= CCL_LUTCTRL_INSEL2(data);
663 ((Ccl *)hw)->LUTCTRL[index].reg = tmp;
664 CCL_CRITICAL_SECTION_LEAVE();
665 }
666
hri_ccl_clear_LUTCTRL_INSEL2_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)667 static inline void hri_ccl_clear_LUTCTRL_INSEL2_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
668 {
669 CCL_CRITICAL_SECTION_ENTER();
670 ((Ccl *)hw)->LUTCTRL[index].reg &= ~CCL_LUTCTRL_INSEL2(mask);
671 CCL_CRITICAL_SECTION_LEAVE();
672 }
673
hri_ccl_toggle_LUTCTRL_INSEL2_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)674 static inline void hri_ccl_toggle_LUTCTRL_INSEL2_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
675 {
676 CCL_CRITICAL_SECTION_ENTER();
677 ((Ccl *)hw)->LUTCTRL[index].reg ^= CCL_LUTCTRL_INSEL2(mask);
678 CCL_CRITICAL_SECTION_LEAVE();
679 }
680
hri_ccl_read_LUTCTRL_INSEL2_bf(const void * const hw,uint8_t index)681 static inline hri_ccl_lutctrl_reg_t hri_ccl_read_LUTCTRL_INSEL2_bf(const void *const hw, uint8_t index)
682 {
683 uint32_t tmp;
684 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
685 tmp = (tmp & CCL_LUTCTRL_INSEL2_Msk) >> CCL_LUTCTRL_INSEL2_Pos;
686 return tmp;
687 }
688
hri_ccl_set_LUTCTRL_TRUTH_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)689 static inline void hri_ccl_set_LUTCTRL_TRUTH_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
690 {
691 CCL_CRITICAL_SECTION_ENTER();
692 ((Ccl *)hw)->LUTCTRL[index].reg |= CCL_LUTCTRL_TRUTH(mask);
693 CCL_CRITICAL_SECTION_LEAVE();
694 }
695
hri_ccl_get_LUTCTRL_TRUTH_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)696 static inline hri_ccl_lutctrl_reg_t hri_ccl_get_LUTCTRL_TRUTH_bf(const void *const hw, uint8_t index,
697 hri_ccl_lutctrl_reg_t mask)
698 {
699 uint32_t tmp;
700 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
701 tmp = (tmp & CCL_LUTCTRL_TRUTH(mask)) >> CCL_LUTCTRL_TRUTH_Pos;
702 return tmp;
703 }
704
hri_ccl_write_LUTCTRL_TRUTH_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t data)705 static inline void hri_ccl_write_LUTCTRL_TRUTH_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t data)
706 {
707 uint32_t tmp;
708 CCL_CRITICAL_SECTION_ENTER();
709 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
710 tmp &= ~CCL_LUTCTRL_TRUTH_Msk;
711 tmp |= CCL_LUTCTRL_TRUTH(data);
712 ((Ccl *)hw)->LUTCTRL[index].reg = tmp;
713 CCL_CRITICAL_SECTION_LEAVE();
714 }
715
hri_ccl_clear_LUTCTRL_TRUTH_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)716 static inline void hri_ccl_clear_LUTCTRL_TRUTH_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
717 {
718 CCL_CRITICAL_SECTION_ENTER();
719 ((Ccl *)hw)->LUTCTRL[index].reg &= ~CCL_LUTCTRL_TRUTH(mask);
720 CCL_CRITICAL_SECTION_LEAVE();
721 }
722
hri_ccl_toggle_LUTCTRL_TRUTH_bf(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)723 static inline void hri_ccl_toggle_LUTCTRL_TRUTH_bf(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
724 {
725 CCL_CRITICAL_SECTION_ENTER();
726 ((Ccl *)hw)->LUTCTRL[index].reg ^= CCL_LUTCTRL_TRUTH(mask);
727 CCL_CRITICAL_SECTION_LEAVE();
728 }
729
hri_ccl_read_LUTCTRL_TRUTH_bf(const void * const hw,uint8_t index)730 static inline hri_ccl_lutctrl_reg_t hri_ccl_read_LUTCTRL_TRUTH_bf(const void *const hw, uint8_t index)
731 {
732 uint32_t tmp;
733 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
734 tmp = (tmp & CCL_LUTCTRL_TRUTH_Msk) >> CCL_LUTCTRL_TRUTH_Pos;
735 return tmp;
736 }
737
hri_ccl_set_LUTCTRL_reg(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)738 static inline void hri_ccl_set_LUTCTRL_reg(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
739 {
740 CCL_CRITICAL_SECTION_ENTER();
741 ((Ccl *)hw)->LUTCTRL[index].reg |= mask;
742 CCL_CRITICAL_SECTION_LEAVE();
743 }
744
hri_ccl_get_LUTCTRL_reg(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)745 static inline hri_ccl_lutctrl_reg_t hri_ccl_get_LUTCTRL_reg(const void *const hw, uint8_t index,
746 hri_ccl_lutctrl_reg_t mask)
747 {
748 uint32_t tmp;
749 tmp = ((Ccl *)hw)->LUTCTRL[index].reg;
750 tmp &= mask;
751 return tmp;
752 }
753
hri_ccl_write_LUTCTRL_reg(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t data)754 static inline void hri_ccl_write_LUTCTRL_reg(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t data)
755 {
756 CCL_CRITICAL_SECTION_ENTER();
757 ((Ccl *)hw)->LUTCTRL[index].reg = data;
758 CCL_CRITICAL_SECTION_LEAVE();
759 }
760
hri_ccl_clear_LUTCTRL_reg(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)761 static inline void hri_ccl_clear_LUTCTRL_reg(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
762 {
763 CCL_CRITICAL_SECTION_ENTER();
764 ((Ccl *)hw)->LUTCTRL[index].reg &= ~mask;
765 CCL_CRITICAL_SECTION_LEAVE();
766 }
767
hri_ccl_toggle_LUTCTRL_reg(const void * const hw,uint8_t index,hri_ccl_lutctrl_reg_t mask)768 static inline void hri_ccl_toggle_LUTCTRL_reg(const void *const hw, uint8_t index, hri_ccl_lutctrl_reg_t mask)
769 {
770 CCL_CRITICAL_SECTION_ENTER();
771 ((Ccl *)hw)->LUTCTRL[index].reg ^= mask;
772 CCL_CRITICAL_SECTION_LEAVE();
773 }
774
hri_ccl_read_LUTCTRL_reg(const void * const hw,uint8_t index)775 static inline hri_ccl_lutctrl_reg_t hri_ccl_read_LUTCTRL_reg(const void *const hw, uint8_t index)
776 {
777 return ((Ccl *)hw)->LUTCTRL[index].reg;
778 }
779
780 #ifdef __cplusplus
781 }
782 #endif
783
784 #endif /* _HRI_CCL_L21_H_INCLUDED */
785 #endif /* _SAML21_CCL_COMPONENT_ */
786