blob: 55f46bd62447c3f7732633e6c3d918de4ceac4cc [file] [log] [blame]
Kévin Redon69b92d92019-01-24 16:39:20 +01001/**
2 * \file
3 *
4 * \brief SAM TCC
5 *
6 * Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.
7 *
8 * \asf_license_start
9 *
10 * \page License
11 *
12 * Subject to your compliance with these terms, you may use Microchip
13 * software and any derivatives exclusively with Microchip products.
14 * It is your responsibility to comply with third party license terms applicable
15 * to your use of third party software (including open source software) that
16 * may accompany Microchip software.
17 *
18 * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 *
30 * \asf_license_stop
31 *
32 */
33
34#ifdef _SAME54_TCC_COMPONENT_
35#ifndef _HRI_TCC_E54_H_INCLUDED_
36#define _HRI_TCC_E54_H_INCLUDED_
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42#include <stdbool.h>
43#include <hal_atomic.h>
44
45#if defined(ENABLE_TCC_CRITICAL_SECTIONS)
46#define TCC_CRITICAL_SECTION_ENTER() CRITICAL_SECTION_ENTER()
47#define TCC_CRITICAL_SECTION_LEAVE() CRITICAL_SECTION_LEAVE()
48#else
49#define TCC_CRITICAL_SECTION_ENTER()
50#define TCC_CRITICAL_SECTION_LEAVE()
51#endif
52
53typedef uint16_t hri_tcc_patt_reg_t;
54typedef uint16_t hri_tcc_pattbuf_reg_t;
55typedef uint32_t hri_tcc_cc_reg_t;
56typedef uint32_t hri_tcc_ccbuf_reg_t;
57typedef uint32_t hri_tcc_count_reg_t;
58typedef uint32_t hri_tcc_ctrla_reg_t;
59typedef uint32_t hri_tcc_drvctrl_reg_t;
60typedef uint32_t hri_tcc_evctrl_reg_t;
61typedef uint32_t hri_tcc_fctrla_reg_t;
62typedef uint32_t hri_tcc_fctrlb_reg_t;
63typedef uint32_t hri_tcc_intenset_reg_t;
64typedef uint32_t hri_tcc_intflag_reg_t;
65typedef uint32_t hri_tcc_per_reg_t;
66typedef uint32_t hri_tcc_perbuf_reg_t;
67typedef uint32_t hri_tcc_status_reg_t;
68typedef uint32_t hri_tcc_syncbusy_reg_t;
69typedef uint32_t hri_tcc_wave_reg_t;
70typedef uint32_t hri_tcc_wexctrl_reg_t;
71typedef uint8_t hri_tcc_ctrlbset_reg_t;
72typedef uint8_t hri_tcc_dbgctrl_reg_t;
73
74static inline void hri_tcc_wait_for_sync(const void *const hw, hri_tcc_syncbusy_reg_t reg)
75{
76 while (((Tcc *)hw)->SYNCBUSY.reg & reg) {
77 };
78}
79
80static inline bool hri_tcc_is_syncing(const void *const hw, hri_tcc_syncbusy_reg_t reg)
81{
82 return ((Tcc *)hw)->SYNCBUSY.reg & reg;
83}
84
85static inline bool hri_tcc_get_INTFLAG_OVF_bit(const void *const hw)
86{
87 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_OVF) >> TCC_INTFLAG_OVF_Pos;
88}
89
90static inline void hri_tcc_clear_INTFLAG_OVF_bit(const void *const hw)
91{
92 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_OVF;
93}
94
95static inline bool hri_tcc_get_INTFLAG_TRG_bit(const void *const hw)
96{
97 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_TRG) >> TCC_INTFLAG_TRG_Pos;
98}
99
100static inline void hri_tcc_clear_INTFLAG_TRG_bit(const void *const hw)
101{
102 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_TRG;
103}
104
105static inline bool hri_tcc_get_INTFLAG_CNT_bit(const void *const hw)
106{
107 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_CNT) >> TCC_INTFLAG_CNT_Pos;
108}
109
110static inline void hri_tcc_clear_INTFLAG_CNT_bit(const void *const hw)
111{
112 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_CNT;
113}
114
115static inline bool hri_tcc_get_INTFLAG_ERR_bit(const void *const hw)
116{
117 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_ERR) >> TCC_INTFLAG_ERR_Pos;
118}
119
120static inline void hri_tcc_clear_INTFLAG_ERR_bit(const void *const hw)
121{
122 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_ERR;
123}
124
125static inline bool hri_tcc_get_INTFLAG_UFS_bit(const void *const hw)
126{
127 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_UFS) >> TCC_INTFLAG_UFS_Pos;
128}
129
130static inline void hri_tcc_clear_INTFLAG_UFS_bit(const void *const hw)
131{
132 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_UFS;
133}
134
135static inline bool hri_tcc_get_INTFLAG_DFS_bit(const void *const hw)
136{
137 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_DFS) >> TCC_INTFLAG_DFS_Pos;
138}
139
140static inline void hri_tcc_clear_INTFLAG_DFS_bit(const void *const hw)
141{
142 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_DFS;
143}
144
145static inline bool hri_tcc_get_INTFLAG_FAULTA_bit(const void *const hw)
146{
147 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_FAULTA) >> TCC_INTFLAG_FAULTA_Pos;
148}
149
150static inline void hri_tcc_clear_INTFLAG_FAULTA_bit(const void *const hw)
151{
152 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_FAULTA;
153}
154
155static inline bool hri_tcc_get_INTFLAG_FAULTB_bit(const void *const hw)
156{
157 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_FAULTB) >> TCC_INTFLAG_FAULTB_Pos;
158}
159
160static inline void hri_tcc_clear_INTFLAG_FAULTB_bit(const void *const hw)
161{
162 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_FAULTB;
163}
164
165static inline bool hri_tcc_get_INTFLAG_FAULT0_bit(const void *const hw)
166{
167 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_FAULT0) >> TCC_INTFLAG_FAULT0_Pos;
168}
169
170static inline void hri_tcc_clear_INTFLAG_FAULT0_bit(const void *const hw)
171{
172 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_FAULT0;
173}
174
175static inline bool hri_tcc_get_INTFLAG_FAULT1_bit(const void *const hw)
176{
177 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_FAULT1) >> TCC_INTFLAG_FAULT1_Pos;
178}
179
180static inline void hri_tcc_clear_INTFLAG_FAULT1_bit(const void *const hw)
181{
182 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_FAULT1;
183}
184
185static inline bool hri_tcc_get_INTFLAG_MC0_bit(const void *const hw)
186{
187 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_MC0) >> TCC_INTFLAG_MC0_Pos;
188}
189
190static inline void hri_tcc_clear_INTFLAG_MC0_bit(const void *const hw)
191{
192 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_MC0;
193}
194
195static inline bool hri_tcc_get_INTFLAG_MC1_bit(const void *const hw)
196{
197 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_MC1) >> TCC_INTFLAG_MC1_Pos;
198}
199
200static inline void hri_tcc_clear_INTFLAG_MC1_bit(const void *const hw)
201{
202 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_MC1;
203}
204
205static inline bool hri_tcc_get_INTFLAG_MC2_bit(const void *const hw)
206{
207 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_MC2) >> TCC_INTFLAG_MC2_Pos;
208}
209
210static inline void hri_tcc_clear_INTFLAG_MC2_bit(const void *const hw)
211{
212 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_MC2;
213}
214
215static inline bool hri_tcc_get_INTFLAG_MC3_bit(const void *const hw)
216{
217 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_MC3) >> TCC_INTFLAG_MC3_Pos;
218}
219
220static inline void hri_tcc_clear_INTFLAG_MC3_bit(const void *const hw)
221{
222 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_MC3;
223}
224
225static inline bool hri_tcc_get_INTFLAG_MC4_bit(const void *const hw)
226{
227 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_MC4) >> TCC_INTFLAG_MC4_Pos;
228}
229
230static inline void hri_tcc_clear_INTFLAG_MC4_bit(const void *const hw)
231{
232 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_MC4;
233}
234
235static inline bool hri_tcc_get_INTFLAG_MC5_bit(const void *const hw)
236{
237 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_MC5) >> TCC_INTFLAG_MC5_Pos;
238}
239
240static inline void hri_tcc_clear_INTFLAG_MC5_bit(const void *const hw)
241{
242 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_MC5;
243}
244
245static inline bool hri_tcc_get_interrupt_OVF_bit(const void *const hw)
246{
247 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_OVF) >> TCC_INTFLAG_OVF_Pos;
248}
249
250static inline void hri_tcc_clear_interrupt_OVF_bit(const void *const hw)
251{
252 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_OVF;
253}
254
255static inline bool hri_tcc_get_interrupt_TRG_bit(const void *const hw)
256{
257 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_TRG) >> TCC_INTFLAG_TRG_Pos;
258}
259
260static inline void hri_tcc_clear_interrupt_TRG_bit(const void *const hw)
261{
262 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_TRG;
263}
264
265static inline bool hri_tcc_get_interrupt_CNT_bit(const void *const hw)
266{
267 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_CNT) >> TCC_INTFLAG_CNT_Pos;
268}
269
270static inline void hri_tcc_clear_interrupt_CNT_bit(const void *const hw)
271{
272 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_CNT;
273}
274
275static inline bool hri_tcc_get_interrupt_ERR_bit(const void *const hw)
276{
277 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_ERR) >> TCC_INTFLAG_ERR_Pos;
278}
279
280static inline void hri_tcc_clear_interrupt_ERR_bit(const void *const hw)
281{
282 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_ERR;
283}
284
285static inline bool hri_tcc_get_interrupt_UFS_bit(const void *const hw)
286{
287 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_UFS) >> TCC_INTFLAG_UFS_Pos;
288}
289
290static inline void hri_tcc_clear_interrupt_UFS_bit(const void *const hw)
291{
292 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_UFS;
293}
294
295static inline bool hri_tcc_get_interrupt_DFS_bit(const void *const hw)
296{
297 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_DFS) >> TCC_INTFLAG_DFS_Pos;
298}
299
300static inline void hri_tcc_clear_interrupt_DFS_bit(const void *const hw)
301{
302 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_DFS;
303}
304
305static inline bool hri_tcc_get_interrupt_FAULTA_bit(const void *const hw)
306{
307 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_FAULTA) >> TCC_INTFLAG_FAULTA_Pos;
308}
309
310static inline void hri_tcc_clear_interrupt_FAULTA_bit(const void *const hw)
311{
312 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_FAULTA;
313}
314
315static inline bool hri_tcc_get_interrupt_FAULTB_bit(const void *const hw)
316{
317 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_FAULTB) >> TCC_INTFLAG_FAULTB_Pos;
318}
319
320static inline void hri_tcc_clear_interrupt_FAULTB_bit(const void *const hw)
321{
322 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_FAULTB;
323}
324
325static inline bool hri_tcc_get_interrupt_FAULT0_bit(const void *const hw)
326{
327 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_FAULT0) >> TCC_INTFLAG_FAULT0_Pos;
328}
329
330static inline void hri_tcc_clear_interrupt_FAULT0_bit(const void *const hw)
331{
332 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_FAULT0;
333}
334
335static inline bool hri_tcc_get_interrupt_FAULT1_bit(const void *const hw)
336{
337 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_FAULT1) >> TCC_INTFLAG_FAULT1_Pos;
338}
339
340static inline void hri_tcc_clear_interrupt_FAULT1_bit(const void *const hw)
341{
342 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_FAULT1;
343}
344
345static inline bool hri_tcc_get_interrupt_MC0_bit(const void *const hw)
346{
347 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_MC0) >> TCC_INTFLAG_MC0_Pos;
348}
349
350static inline void hri_tcc_clear_interrupt_MC0_bit(const void *const hw)
351{
352 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_MC0;
353}
354
355static inline bool hri_tcc_get_interrupt_MC1_bit(const void *const hw)
356{
357 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_MC1) >> TCC_INTFLAG_MC1_Pos;
358}
359
360static inline void hri_tcc_clear_interrupt_MC1_bit(const void *const hw)
361{
362 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_MC1;
363}
364
365static inline bool hri_tcc_get_interrupt_MC2_bit(const void *const hw)
366{
367 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_MC2) >> TCC_INTFLAG_MC2_Pos;
368}
369
370static inline void hri_tcc_clear_interrupt_MC2_bit(const void *const hw)
371{
372 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_MC2;
373}
374
375static inline bool hri_tcc_get_interrupt_MC3_bit(const void *const hw)
376{
377 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_MC3) >> TCC_INTFLAG_MC3_Pos;
378}
379
380static inline void hri_tcc_clear_interrupt_MC3_bit(const void *const hw)
381{
382 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_MC3;
383}
384
385static inline bool hri_tcc_get_interrupt_MC4_bit(const void *const hw)
386{
387 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_MC4) >> TCC_INTFLAG_MC4_Pos;
388}
389
390static inline void hri_tcc_clear_interrupt_MC4_bit(const void *const hw)
391{
392 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_MC4;
393}
394
395static inline bool hri_tcc_get_interrupt_MC5_bit(const void *const hw)
396{
397 return (((Tcc *)hw)->INTFLAG.reg & TCC_INTFLAG_MC5) >> TCC_INTFLAG_MC5_Pos;
398}
399
400static inline void hri_tcc_clear_interrupt_MC5_bit(const void *const hw)
401{
402 ((Tcc *)hw)->INTFLAG.reg = TCC_INTFLAG_MC5;
403}
404
405static inline hri_tcc_intflag_reg_t hri_tcc_get_INTFLAG_reg(const void *const hw, hri_tcc_intflag_reg_t mask)
406{
407 uint32_t tmp;
408 tmp = ((Tcc *)hw)->INTFLAG.reg;
409 tmp &= mask;
410 return tmp;
411}
412
413static inline hri_tcc_intflag_reg_t hri_tcc_read_INTFLAG_reg(const void *const hw)
414{
415 return ((Tcc *)hw)->INTFLAG.reg;
416}
417
418static inline void hri_tcc_clear_INTFLAG_reg(const void *const hw, hri_tcc_intflag_reg_t mask)
419{
420 ((Tcc *)hw)->INTFLAG.reg = mask;
421}
422
423static inline void hri_tcc_set_CTRLB_DIR_bit(const void *const hw)
424{
425 ((Tcc *)hw)->CTRLBSET.reg = TCC_CTRLBSET_DIR;
426}
427
428static inline bool hri_tcc_get_CTRLB_DIR_bit(const void *const hw)
429{
430 return (((Tcc *)hw)->CTRLBSET.reg & TCC_CTRLBSET_DIR) >> TCC_CTRLBSET_DIR_Pos;
431}
432
433static inline void hri_tcc_write_CTRLB_DIR_bit(const void *const hw, bool value)
434{
435 if (value == 0x0) {
436 ((Tcc *)hw)->CTRLBCLR.reg = TCC_CTRLBSET_DIR;
437 } else {
438 ((Tcc *)hw)->CTRLBSET.reg = TCC_CTRLBSET_DIR;
439 }
440}
441
442static inline void hri_tcc_clear_CTRLB_DIR_bit(const void *const hw)
443{
444 ((Tcc *)hw)->CTRLBCLR.reg = TCC_CTRLBSET_DIR;
445}
446
447static inline void hri_tcc_set_CTRLB_LUPD_bit(const void *const hw)
448{
449 ((Tcc *)hw)->CTRLBSET.reg = TCC_CTRLBSET_LUPD;
450}
451
452static inline bool hri_tcc_get_CTRLB_LUPD_bit(const void *const hw)
453{
454 return (((Tcc *)hw)->CTRLBSET.reg & TCC_CTRLBSET_LUPD) >> TCC_CTRLBSET_LUPD_Pos;
455}
456
457static inline void hri_tcc_write_CTRLB_LUPD_bit(const void *const hw, bool value)
458{
459 if (value == 0x0) {
460 ((Tcc *)hw)->CTRLBCLR.reg = TCC_CTRLBSET_LUPD;
461 } else {
462 ((Tcc *)hw)->CTRLBSET.reg = TCC_CTRLBSET_LUPD;
463 }
464}
465
466static inline void hri_tcc_clear_CTRLB_LUPD_bit(const void *const hw)
467{
468 ((Tcc *)hw)->CTRLBCLR.reg = TCC_CTRLBSET_LUPD;
469}
470
471static inline void hri_tcc_set_CTRLB_ONESHOT_bit(const void *const hw)
472{
473 ((Tcc *)hw)->CTRLBSET.reg = TCC_CTRLBSET_ONESHOT;
474}
475
476static inline bool hri_tcc_get_CTRLB_ONESHOT_bit(const void *const hw)
477{
478 return (((Tcc *)hw)->CTRLBSET.reg & TCC_CTRLBSET_ONESHOT) >> TCC_CTRLBSET_ONESHOT_Pos;
479}
480
481static inline void hri_tcc_write_CTRLB_ONESHOT_bit(const void *const hw, bool value)
482{
483 if (value == 0x0) {
484 ((Tcc *)hw)->CTRLBCLR.reg = TCC_CTRLBSET_ONESHOT;
485 } else {
486 ((Tcc *)hw)->CTRLBSET.reg = TCC_CTRLBSET_ONESHOT;
487 }
488}
489
490static inline void hri_tcc_clear_CTRLB_ONESHOT_bit(const void *const hw)
491{
492 ((Tcc *)hw)->CTRLBCLR.reg = TCC_CTRLBSET_ONESHOT;
493}
494
495static inline void hri_tcc_set_CTRLB_IDXCMD_bf(const void *const hw, hri_tcc_ctrlbset_reg_t mask)
496{
497 ((Tcc *)hw)->CTRLBSET.reg = TCC_CTRLBSET_IDXCMD(mask);
498}
499
500static inline hri_tcc_ctrlbset_reg_t hri_tcc_get_CTRLB_IDXCMD_bf(const void *const hw, hri_tcc_ctrlbset_reg_t mask)
501{
502 uint8_t tmp;
503 tmp = ((Tcc *)hw)->CTRLBSET.reg;
504 tmp = (tmp & TCC_CTRLBSET_IDXCMD(mask)) >> TCC_CTRLBSET_IDXCMD_Pos;
505 return tmp;
506}
507
508static inline hri_tcc_ctrlbset_reg_t hri_tcc_read_CTRLB_IDXCMD_bf(const void *const hw)
509{
510 uint8_t tmp;
511 tmp = ((Tcc *)hw)->CTRLBSET.reg;
512 tmp = (tmp & TCC_CTRLBSET_IDXCMD_Msk) >> TCC_CTRLBSET_IDXCMD_Pos;
513 return tmp;
514}
515
516static inline void hri_tcc_write_CTRLB_IDXCMD_bf(const void *const hw, hri_tcc_ctrlbset_reg_t data)
517{
518 ((Tcc *)hw)->CTRLBSET.reg = TCC_CTRLBSET_IDXCMD(data);
519 ((Tcc *)hw)->CTRLBCLR.reg = ~TCC_CTRLBSET_IDXCMD(data);
520}
521
522static inline void hri_tcc_clear_CTRLB_IDXCMD_bf(const void *const hw, hri_tcc_ctrlbset_reg_t mask)
523{
524 ((Tcc *)hw)->CTRLBCLR.reg = TCC_CTRLBSET_IDXCMD(mask);
525}
526
527static inline void hri_tcc_set_CTRLB_CMD_bf(const void *const hw, hri_tcc_ctrlbset_reg_t mask)
528{
529 ((Tcc *)hw)->CTRLBSET.reg = TCC_CTRLBSET_CMD(mask);
530}
531
532static inline hri_tcc_ctrlbset_reg_t hri_tcc_get_CTRLB_CMD_bf(const void *const hw, hri_tcc_ctrlbset_reg_t mask)
533{
534 uint8_t tmp;
535 tmp = ((Tcc *)hw)->CTRLBSET.reg;
536 tmp = (tmp & TCC_CTRLBSET_CMD(mask)) >> TCC_CTRLBSET_CMD_Pos;
537 return tmp;
538}
539
540static inline hri_tcc_ctrlbset_reg_t hri_tcc_read_CTRLB_CMD_bf(const void *const hw)
541{
542 uint8_t tmp;
543 tmp = ((Tcc *)hw)->CTRLBSET.reg;
544 tmp = (tmp & TCC_CTRLBSET_CMD_Msk) >> TCC_CTRLBSET_CMD_Pos;
545 return tmp;
546}
547
548static inline void hri_tcc_write_CTRLB_CMD_bf(const void *const hw, hri_tcc_ctrlbset_reg_t data)
549{
550 ((Tcc *)hw)->CTRLBSET.reg = TCC_CTRLBSET_CMD(data);
551 ((Tcc *)hw)->CTRLBCLR.reg = ~TCC_CTRLBSET_CMD(data);
552}
553
554static inline void hri_tcc_clear_CTRLB_CMD_bf(const void *const hw, hri_tcc_ctrlbset_reg_t mask)
555{
556 ((Tcc *)hw)->CTRLBCLR.reg = TCC_CTRLBSET_CMD(mask);
557}
558
559static inline void hri_tcc_set_CTRLB_reg(const void *const hw, hri_tcc_ctrlbset_reg_t mask)
560{
561 ((Tcc *)hw)->CTRLBSET.reg = mask;
562}
563
564static inline hri_tcc_ctrlbset_reg_t hri_tcc_get_CTRLB_reg(const void *const hw, hri_tcc_ctrlbset_reg_t mask)
565{
566 uint8_t tmp;
567 tmp = ((Tcc *)hw)->CTRLBSET.reg;
568 tmp &= mask;
569 return tmp;
570}
571
572static inline hri_tcc_ctrlbset_reg_t hri_tcc_read_CTRLB_reg(const void *const hw)
573{
574 return ((Tcc *)hw)->CTRLBSET.reg;
575}
576
577static inline void hri_tcc_write_CTRLB_reg(const void *const hw, hri_tcc_ctrlbset_reg_t data)
578{
579 ((Tcc *)hw)->CTRLBSET.reg = data;
580 ((Tcc *)hw)->CTRLBCLR.reg = ~data;
581}
582
583static inline void hri_tcc_clear_CTRLB_reg(const void *const hw, hri_tcc_ctrlbset_reg_t mask)
584{
585 ((Tcc *)hw)->CTRLBCLR.reg = mask;
586}
587
588static inline void hri_tcc_set_INTEN_OVF_bit(const void *const hw)
589{
590 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_OVF;
591}
592
593static inline bool hri_tcc_get_INTEN_OVF_bit(const void *const hw)
594{
595 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_OVF) >> TCC_INTENSET_OVF_Pos;
596}
597
598static inline void hri_tcc_write_INTEN_OVF_bit(const void *const hw, bool value)
599{
600 if (value == 0x0) {
601 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_OVF;
602 } else {
603 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_OVF;
604 }
605}
606
607static inline void hri_tcc_clear_INTEN_OVF_bit(const void *const hw)
608{
609 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_OVF;
610}
611
612static inline void hri_tcc_set_INTEN_TRG_bit(const void *const hw)
613{
614 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_TRG;
615}
616
617static inline bool hri_tcc_get_INTEN_TRG_bit(const void *const hw)
618{
619 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_TRG) >> TCC_INTENSET_TRG_Pos;
620}
621
622static inline void hri_tcc_write_INTEN_TRG_bit(const void *const hw, bool value)
623{
624 if (value == 0x0) {
625 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_TRG;
626 } else {
627 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_TRG;
628 }
629}
630
631static inline void hri_tcc_clear_INTEN_TRG_bit(const void *const hw)
632{
633 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_TRG;
634}
635
636static inline void hri_tcc_set_INTEN_CNT_bit(const void *const hw)
637{
638 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_CNT;
639}
640
641static inline bool hri_tcc_get_INTEN_CNT_bit(const void *const hw)
642{
643 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_CNT) >> TCC_INTENSET_CNT_Pos;
644}
645
646static inline void hri_tcc_write_INTEN_CNT_bit(const void *const hw, bool value)
647{
648 if (value == 0x0) {
649 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_CNT;
650 } else {
651 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_CNT;
652 }
653}
654
655static inline void hri_tcc_clear_INTEN_CNT_bit(const void *const hw)
656{
657 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_CNT;
658}
659
660static inline void hri_tcc_set_INTEN_ERR_bit(const void *const hw)
661{
662 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_ERR;
663}
664
665static inline bool hri_tcc_get_INTEN_ERR_bit(const void *const hw)
666{
667 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_ERR) >> TCC_INTENSET_ERR_Pos;
668}
669
670static inline void hri_tcc_write_INTEN_ERR_bit(const void *const hw, bool value)
671{
672 if (value == 0x0) {
673 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_ERR;
674 } else {
675 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_ERR;
676 }
677}
678
679static inline void hri_tcc_clear_INTEN_ERR_bit(const void *const hw)
680{
681 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_ERR;
682}
683
684static inline void hri_tcc_set_INTEN_UFS_bit(const void *const hw)
685{
686 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_UFS;
687}
688
689static inline bool hri_tcc_get_INTEN_UFS_bit(const void *const hw)
690{
691 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_UFS) >> TCC_INTENSET_UFS_Pos;
692}
693
694static inline void hri_tcc_write_INTEN_UFS_bit(const void *const hw, bool value)
695{
696 if (value == 0x0) {
697 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_UFS;
698 } else {
699 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_UFS;
700 }
701}
702
703static inline void hri_tcc_clear_INTEN_UFS_bit(const void *const hw)
704{
705 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_UFS;
706}
707
708static inline void hri_tcc_set_INTEN_DFS_bit(const void *const hw)
709{
710 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_DFS;
711}
712
713static inline bool hri_tcc_get_INTEN_DFS_bit(const void *const hw)
714{
715 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_DFS) >> TCC_INTENSET_DFS_Pos;
716}
717
718static inline void hri_tcc_write_INTEN_DFS_bit(const void *const hw, bool value)
719{
720 if (value == 0x0) {
721 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_DFS;
722 } else {
723 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_DFS;
724 }
725}
726
727static inline void hri_tcc_clear_INTEN_DFS_bit(const void *const hw)
728{
729 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_DFS;
730}
731
732static inline void hri_tcc_set_INTEN_FAULTA_bit(const void *const hw)
733{
734 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_FAULTA;
735}
736
737static inline bool hri_tcc_get_INTEN_FAULTA_bit(const void *const hw)
738{
739 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_FAULTA) >> TCC_INTENSET_FAULTA_Pos;
740}
741
742static inline void hri_tcc_write_INTEN_FAULTA_bit(const void *const hw, bool value)
743{
744 if (value == 0x0) {
745 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_FAULTA;
746 } else {
747 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_FAULTA;
748 }
749}
750
751static inline void hri_tcc_clear_INTEN_FAULTA_bit(const void *const hw)
752{
753 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_FAULTA;
754}
755
756static inline void hri_tcc_set_INTEN_FAULTB_bit(const void *const hw)
757{
758 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_FAULTB;
759}
760
761static inline bool hri_tcc_get_INTEN_FAULTB_bit(const void *const hw)
762{
763 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_FAULTB) >> TCC_INTENSET_FAULTB_Pos;
764}
765
766static inline void hri_tcc_write_INTEN_FAULTB_bit(const void *const hw, bool value)
767{
768 if (value == 0x0) {
769 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_FAULTB;
770 } else {
771 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_FAULTB;
772 }
773}
774
775static inline void hri_tcc_clear_INTEN_FAULTB_bit(const void *const hw)
776{
777 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_FAULTB;
778}
779
780static inline void hri_tcc_set_INTEN_FAULT0_bit(const void *const hw)
781{
782 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_FAULT0;
783}
784
785static inline bool hri_tcc_get_INTEN_FAULT0_bit(const void *const hw)
786{
787 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_FAULT0) >> TCC_INTENSET_FAULT0_Pos;
788}
789
790static inline void hri_tcc_write_INTEN_FAULT0_bit(const void *const hw, bool value)
791{
792 if (value == 0x0) {
793 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_FAULT0;
794 } else {
795 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_FAULT0;
796 }
797}
798
799static inline void hri_tcc_clear_INTEN_FAULT0_bit(const void *const hw)
800{
801 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_FAULT0;
802}
803
804static inline void hri_tcc_set_INTEN_FAULT1_bit(const void *const hw)
805{
806 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_FAULT1;
807}
808
809static inline bool hri_tcc_get_INTEN_FAULT1_bit(const void *const hw)
810{
811 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_FAULT1) >> TCC_INTENSET_FAULT1_Pos;
812}
813
814static inline void hri_tcc_write_INTEN_FAULT1_bit(const void *const hw, bool value)
815{
816 if (value == 0x0) {
817 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_FAULT1;
818 } else {
819 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_FAULT1;
820 }
821}
822
823static inline void hri_tcc_clear_INTEN_FAULT1_bit(const void *const hw)
824{
825 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_FAULT1;
826}
827
828static inline void hri_tcc_set_INTEN_MC0_bit(const void *const hw)
829{
830 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_MC0;
831}
832
833static inline bool hri_tcc_get_INTEN_MC0_bit(const void *const hw)
834{
835 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_MC0) >> TCC_INTENSET_MC0_Pos;
836}
837
838static inline void hri_tcc_write_INTEN_MC0_bit(const void *const hw, bool value)
839{
840 if (value == 0x0) {
841 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_MC0;
842 } else {
843 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_MC0;
844 }
845}
846
847static inline void hri_tcc_clear_INTEN_MC0_bit(const void *const hw)
848{
849 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_MC0;
850}
851
852static inline void hri_tcc_set_INTEN_MC1_bit(const void *const hw)
853{
854 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_MC1;
855}
856
857static inline bool hri_tcc_get_INTEN_MC1_bit(const void *const hw)
858{
859 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_MC1) >> TCC_INTENSET_MC1_Pos;
860}
861
862static inline void hri_tcc_write_INTEN_MC1_bit(const void *const hw, bool value)
863{
864 if (value == 0x0) {
865 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_MC1;
866 } else {
867 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_MC1;
868 }
869}
870
871static inline void hri_tcc_clear_INTEN_MC1_bit(const void *const hw)
872{
873 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_MC1;
874}
875
876static inline void hri_tcc_set_INTEN_MC2_bit(const void *const hw)
877{
878 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_MC2;
879}
880
881static inline bool hri_tcc_get_INTEN_MC2_bit(const void *const hw)
882{
883 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_MC2) >> TCC_INTENSET_MC2_Pos;
884}
885
886static inline void hri_tcc_write_INTEN_MC2_bit(const void *const hw, bool value)
887{
888 if (value == 0x0) {
889 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_MC2;
890 } else {
891 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_MC2;
892 }
893}
894
895static inline void hri_tcc_clear_INTEN_MC2_bit(const void *const hw)
896{
897 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_MC2;
898}
899
900static inline void hri_tcc_set_INTEN_MC3_bit(const void *const hw)
901{
902 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_MC3;
903}
904
905static inline bool hri_tcc_get_INTEN_MC3_bit(const void *const hw)
906{
907 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_MC3) >> TCC_INTENSET_MC3_Pos;
908}
909
910static inline void hri_tcc_write_INTEN_MC3_bit(const void *const hw, bool value)
911{
912 if (value == 0x0) {
913 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_MC3;
914 } else {
915 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_MC3;
916 }
917}
918
919static inline void hri_tcc_clear_INTEN_MC3_bit(const void *const hw)
920{
921 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_MC3;
922}
923
924static inline void hri_tcc_set_INTEN_MC4_bit(const void *const hw)
925{
926 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_MC4;
927}
928
929static inline bool hri_tcc_get_INTEN_MC4_bit(const void *const hw)
930{
931 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_MC4) >> TCC_INTENSET_MC4_Pos;
932}
933
934static inline void hri_tcc_write_INTEN_MC4_bit(const void *const hw, bool value)
935{
936 if (value == 0x0) {
937 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_MC4;
938 } else {
939 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_MC4;
940 }
941}
942
943static inline void hri_tcc_clear_INTEN_MC4_bit(const void *const hw)
944{
945 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_MC4;
946}
947
948static inline void hri_tcc_set_INTEN_MC5_bit(const void *const hw)
949{
950 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_MC5;
951}
952
953static inline bool hri_tcc_get_INTEN_MC5_bit(const void *const hw)
954{
955 return (((Tcc *)hw)->INTENSET.reg & TCC_INTENSET_MC5) >> TCC_INTENSET_MC5_Pos;
956}
957
958static inline void hri_tcc_write_INTEN_MC5_bit(const void *const hw, bool value)
959{
960 if (value == 0x0) {
961 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_MC5;
962 } else {
963 ((Tcc *)hw)->INTENSET.reg = TCC_INTENSET_MC5;
964 }
965}
966
967static inline void hri_tcc_clear_INTEN_MC5_bit(const void *const hw)
968{
969 ((Tcc *)hw)->INTENCLR.reg = TCC_INTENSET_MC5;
970}
971
972static inline void hri_tcc_set_INTEN_reg(const void *const hw, hri_tcc_intenset_reg_t mask)
973{
974 ((Tcc *)hw)->INTENSET.reg = mask;
975}
976
977static inline hri_tcc_intenset_reg_t hri_tcc_get_INTEN_reg(const void *const hw, hri_tcc_intenset_reg_t mask)
978{
979 uint32_t tmp;
980 tmp = ((Tcc *)hw)->INTENSET.reg;
981 tmp &= mask;
982 return tmp;
983}
984
985static inline hri_tcc_intenset_reg_t hri_tcc_read_INTEN_reg(const void *const hw)
986{
987 return ((Tcc *)hw)->INTENSET.reg;
988}
989
990static inline void hri_tcc_write_INTEN_reg(const void *const hw, hri_tcc_intenset_reg_t data)
991{
992 ((Tcc *)hw)->INTENSET.reg = data;
993 ((Tcc *)hw)->INTENCLR.reg = ~data;
994}
995
996static inline void hri_tcc_clear_INTEN_reg(const void *const hw, hri_tcc_intenset_reg_t mask)
997{
998 ((Tcc *)hw)->INTENCLR.reg = mask;
999}
1000
1001static inline bool hri_tcc_get_SYNCBUSY_SWRST_bit(const void *const hw)
1002{
1003 return (((Tcc *)hw)->SYNCBUSY.reg & TCC_SYNCBUSY_SWRST) >> TCC_SYNCBUSY_SWRST_Pos;
1004}
1005
1006static inline bool hri_tcc_get_SYNCBUSY_ENABLE_bit(const void *const hw)
1007{
1008 return (((Tcc *)hw)->SYNCBUSY.reg & TCC_SYNCBUSY_ENABLE) >> TCC_SYNCBUSY_ENABLE_Pos;
1009}
1010
1011static inline bool hri_tcc_get_SYNCBUSY_CTRLB_bit(const void *const hw)
1012{
1013 return (((Tcc *)hw)->SYNCBUSY.reg & TCC_SYNCBUSY_CTRLB) >> TCC_SYNCBUSY_CTRLB_Pos;
1014}
1015
1016static inline bool hri_tcc_get_SYNCBUSY_STATUS_bit(const void *const hw)
1017{
1018 return (((Tcc *)hw)->SYNCBUSY.reg & TCC_SYNCBUSY_STATUS) >> TCC_SYNCBUSY_STATUS_Pos;
1019}
1020
1021static inline bool hri_tcc_get_SYNCBUSY_COUNT_bit(const void *const hw)
1022{
1023 return (((Tcc *)hw)->SYNCBUSY.reg & TCC_SYNCBUSY_COUNT) >> TCC_SYNCBUSY_COUNT_Pos;
1024}
1025
1026static inline bool hri_tcc_get_SYNCBUSY_PATT_bit(const void *const hw)
1027{
1028 return (((Tcc *)hw)->SYNCBUSY.reg & TCC_SYNCBUSY_PATT) >> TCC_SYNCBUSY_PATT_Pos;
1029}
1030
1031static inline bool hri_tcc_get_SYNCBUSY_WAVE_bit(const void *const hw)
1032{
1033 return (((Tcc *)hw)->SYNCBUSY.reg & TCC_SYNCBUSY_WAVE) >> TCC_SYNCBUSY_WAVE_Pos;
1034}
1035
1036static inline bool hri_tcc_get_SYNCBUSY_PER_bit(const void *const hw)
1037{
1038 return (((Tcc *)hw)->SYNCBUSY.reg & TCC_SYNCBUSY_PER) >> TCC_SYNCBUSY_PER_Pos;
1039}
1040
1041static inline bool hri_tcc_get_SYNCBUSY_CC0_bit(const void *const hw)
1042{
1043 return (((Tcc *)hw)->SYNCBUSY.reg & TCC_SYNCBUSY_CC0) >> TCC_SYNCBUSY_CC0_Pos;
1044}
1045
1046static inline bool hri_tcc_get_SYNCBUSY_CC1_bit(const void *const hw)
1047{
1048 return (((Tcc *)hw)->SYNCBUSY.reg & TCC_SYNCBUSY_CC1) >> TCC_SYNCBUSY_CC1_Pos;
1049}
1050
1051static inline bool hri_tcc_get_SYNCBUSY_CC2_bit(const void *const hw)
1052{
1053 return (((Tcc *)hw)->SYNCBUSY.reg & TCC_SYNCBUSY_CC2) >> TCC_SYNCBUSY_CC2_Pos;
1054}
1055
1056static inline bool hri_tcc_get_SYNCBUSY_CC3_bit(const void *const hw)
1057{
1058 return (((Tcc *)hw)->SYNCBUSY.reg & TCC_SYNCBUSY_CC3) >> TCC_SYNCBUSY_CC3_Pos;
1059}
1060
1061static inline bool hri_tcc_get_SYNCBUSY_CC4_bit(const void *const hw)
1062{
1063 return (((Tcc *)hw)->SYNCBUSY.reg & TCC_SYNCBUSY_CC4) >> TCC_SYNCBUSY_CC4_Pos;
1064}
1065
1066static inline bool hri_tcc_get_SYNCBUSY_CC5_bit(const void *const hw)
1067{
1068 return (((Tcc *)hw)->SYNCBUSY.reg & TCC_SYNCBUSY_CC5) >> TCC_SYNCBUSY_CC5_Pos;
1069}
1070
1071static inline hri_tcc_syncbusy_reg_t hri_tcc_get_SYNCBUSY_reg(const void *const hw, hri_tcc_syncbusy_reg_t mask)
1072{
1073 uint32_t tmp;
1074 tmp = ((Tcc *)hw)->SYNCBUSY.reg;
1075 tmp &= mask;
1076 return tmp;
1077}
1078
1079static inline hri_tcc_syncbusy_reg_t hri_tcc_read_SYNCBUSY_reg(const void *const hw)
1080{
1081 return ((Tcc *)hw)->SYNCBUSY.reg;
1082}
1083
1084static inline void hri_tcc_set_CTRLA_SWRST_bit(const void *const hw)
1085{
1086 TCC_CRITICAL_SECTION_ENTER();
1087 ((Tcc *)hw)->CTRLA.reg |= TCC_CTRLA_SWRST;
1088 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_SWRST);
1089 TCC_CRITICAL_SECTION_LEAVE();
1090}
1091
1092static inline bool hri_tcc_get_CTRLA_SWRST_bit(const void *const hw)
1093{
1094 uint32_t tmp;
1095 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_SWRST);
1096 tmp = ((Tcc *)hw)->CTRLA.reg;
1097 tmp = (tmp & TCC_CTRLA_SWRST) >> TCC_CTRLA_SWRST_Pos;
1098 return (bool)tmp;
1099}
1100
1101static inline void hri_tcc_set_CTRLA_ENABLE_bit(const void *const hw)
1102{
1103 TCC_CRITICAL_SECTION_ENTER();
1104 ((Tcc *)hw)->CTRLA.reg |= TCC_CTRLA_ENABLE;
1105 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_SWRST | TCC_SYNCBUSY_ENABLE);
1106 TCC_CRITICAL_SECTION_LEAVE();
1107}
1108
1109static inline bool hri_tcc_get_CTRLA_ENABLE_bit(const void *const hw)
1110{
1111 uint32_t tmp;
1112 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_SWRST | TCC_SYNCBUSY_ENABLE);
1113 tmp = ((Tcc *)hw)->CTRLA.reg;
1114 tmp = (tmp & TCC_CTRLA_ENABLE) >> TCC_CTRLA_ENABLE_Pos;
1115 return (bool)tmp;
1116}
1117
1118static inline void hri_tcc_write_CTRLA_ENABLE_bit(const void *const hw, bool value)
1119{
1120 uint32_t tmp;
1121 TCC_CRITICAL_SECTION_ENTER();
1122 tmp = ((Tcc *)hw)->CTRLA.reg;
1123 tmp &= ~TCC_CTRLA_ENABLE;
1124 tmp |= value << TCC_CTRLA_ENABLE_Pos;
1125 ((Tcc *)hw)->CTRLA.reg = tmp;
1126 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_SWRST | TCC_SYNCBUSY_ENABLE);
1127 TCC_CRITICAL_SECTION_LEAVE();
1128}
1129
1130static inline void hri_tcc_clear_CTRLA_ENABLE_bit(const void *const hw)
1131{
1132 TCC_CRITICAL_SECTION_ENTER();
1133 ((Tcc *)hw)->CTRLA.reg &= ~TCC_CTRLA_ENABLE;
1134 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_SWRST | TCC_SYNCBUSY_ENABLE);
1135 TCC_CRITICAL_SECTION_LEAVE();
1136}
1137
1138static inline void hri_tcc_toggle_CTRLA_ENABLE_bit(const void *const hw)
1139{
1140 TCC_CRITICAL_SECTION_ENTER();
1141 ((Tcc *)hw)->CTRLA.reg ^= TCC_CTRLA_ENABLE;
1142 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_SWRST | TCC_SYNCBUSY_ENABLE);
1143 TCC_CRITICAL_SECTION_LEAVE();
1144}
1145
1146static inline void hri_tcc_set_CTRLA_RUNSTDBY_bit(const void *const hw)
1147{
1148 TCC_CRITICAL_SECTION_ENTER();
1149 ((Tcc *)hw)->CTRLA.reg |= TCC_CTRLA_RUNSTDBY;
1150 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1151 TCC_CRITICAL_SECTION_LEAVE();
1152}
1153
1154static inline bool hri_tcc_get_CTRLA_RUNSTDBY_bit(const void *const hw)
1155{
1156 uint32_t tmp;
1157 tmp = ((Tcc *)hw)->CTRLA.reg;
1158 tmp = (tmp & TCC_CTRLA_RUNSTDBY) >> TCC_CTRLA_RUNSTDBY_Pos;
1159 return (bool)tmp;
1160}
1161
1162static inline void hri_tcc_write_CTRLA_RUNSTDBY_bit(const void *const hw, bool value)
1163{
1164 uint32_t tmp;
1165 TCC_CRITICAL_SECTION_ENTER();
1166 tmp = ((Tcc *)hw)->CTRLA.reg;
1167 tmp &= ~TCC_CTRLA_RUNSTDBY;
1168 tmp |= value << TCC_CTRLA_RUNSTDBY_Pos;
1169 ((Tcc *)hw)->CTRLA.reg = tmp;
1170 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1171 TCC_CRITICAL_SECTION_LEAVE();
1172}
1173
1174static inline void hri_tcc_clear_CTRLA_RUNSTDBY_bit(const void *const hw)
1175{
1176 TCC_CRITICAL_SECTION_ENTER();
1177 ((Tcc *)hw)->CTRLA.reg &= ~TCC_CTRLA_RUNSTDBY;
1178 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1179 TCC_CRITICAL_SECTION_LEAVE();
1180}
1181
1182static inline void hri_tcc_toggle_CTRLA_RUNSTDBY_bit(const void *const hw)
1183{
1184 TCC_CRITICAL_SECTION_ENTER();
1185 ((Tcc *)hw)->CTRLA.reg ^= TCC_CTRLA_RUNSTDBY;
1186 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1187 TCC_CRITICAL_SECTION_LEAVE();
1188}
1189
1190static inline void hri_tcc_set_CTRLA_ALOCK_bit(const void *const hw)
1191{
1192 TCC_CRITICAL_SECTION_ENTER();
1193 ((Tcc *)hw)->CTRLA.reg |= TCC_CTRLA_ALOCK;
1194 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1195 TCC_CRITICAL_SECTION_LEAVE();
1196}
1197
1198static inline bool hri_tcc_get_CTRLA_ALOCK_bit(const void *const hw)
1199{
1200 uint32_t tmp;
1201 tmp = ((Tcc *)hw)->CTRLA.reg;
1202 tmp = (tmp & TCC_CTRLA_ALOCK) >> TCC_CTRLA_ALOCK_Pos;
1203 return (bool)tmp;
1204}
1205
1206static inline void hri_tcc_write_CTRLA_ALOCK_bit(const void *const hw, bool value)
1207{
1208 uint32_t tmp;
1209 TCC_CRITICAL_SECTION_ENTER();
1210 tmp = ((Tcc *)hw)->CTRLA.reg;
1211 tmp &= ~TCC_CTRLA_ALOCK;
1212 tmp |= value << TCC_CTRLA_ALOCK_Pos;
1213 ((Tcc *)hw)->CTRLA.reg = tmp;
1214 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1215 TCC_CRITICAL_SECTION_LEAVE();
1216}
1217
1218static inline void hri_tcc_clear_CTRLA_ALOCK_bit(const void *const hw)
1219{
1220 TCC_CRITICAL_SECTION_ENTER();
1221 ((Tcc *)hw)->CTRLA.reg &= ~TCC_CTRLA_ALOCK;
1222 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1223 TCC_CRITICAL_SECTION_LEAVE();
1224}
1225
1226static inline void hri_tcc_toggle_CTRLA_ALOCK_bit(const void *const hw)
1227{
1228 TCC_CRITICAL_SECTION_ENTER();
1229 ((Tcc *)hw)->CTRLA.reg ^= TCC_CTRLA_ALOCK;
1230 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1231 TCC_CRITICAL_SECTION_LEAVE();
1232}
1233
1234static inline void hri_tcc_set_CTRLA_MSYNC_bit(const void *const hw)
1235{
1236 TCC_CRITICAL_SECTION_ENTER();
1237 ((Tcc *)hw)->CTRLA.reg |= TCC_CTRLA_MSYNC;
1238 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1239 TCC_CRITICAL_SECTION_LEAVE();
1240}
1241
1242static inline bool hri_tcc_get_CTRLA_MSYNC_bit(const void *const hw)
1243{
1244 uint32_t tmp;
1245 tmp = ((Tcc *)hw)->CTRLA.reg;
1246 tmp = (tmp & TCC_CTRLA_MSYNC) >> TCC_CTRLA_MSYNC_Pos;
1247 return (bool)tmp;
1248}
1249
1250static inline void hri_tcc_write_CTRLA_MSYNC_bit(const void *const hw, bool value)
1251{
1252 uint32_t tmp;
1253 TCC_CRITICAL_SECTION_ENTER();
1254 tmp = ((Tcc *)hw)->CTRLA.reg;
1255 tmp &= ~TCC_CTRLA_MSYNC;
1256 tmp |= value << TCC_CTRLA_MSYNC_Pos;
1257 ((Tcc *)hw)->CTRLA.reg = tmp;
1258 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1259 TCC_CRITICAL_SECTION_LEAVE();
1260}
1261
1262static inline void hri_tcc_clear_CTRLA_MSYNC_bit(const void *const hw)
1263{
1264 TCC_CRITICAL_SECTION_ENTER();
1265 ((Tcc *)hw)->CTRLA.reg &= ~TCC_CTRLA_MSYNC;
1266 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1267 TCC_CRITICAL_SECTION_LEAVE();
1268}
1269
1270static inline void hri_tcc_toggle_CTRLA_MSYNC_bit(const void *const hw)
1271{
1272 TCC_CRITICAL_SECTION_ENTER();
1273 ((Tcc *)hw)->CTRLA.reg ^= TCC_CTRLA_MSYNC;
1274 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1275 TCC_CRITICAL_SECTION_LEAVE();
1276}
1277
1278static inline void hri_tcc_set_CTRLA_DMAOS_bit(const void *const hw)
1279{
1280 TCC_CRITICAL_SECTION_ENTER();
1281 ((Tcc *)hw)->CTRLA.reg |= TCC_CTRLA_DMAOS;
1282 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1283 TCC_CRITICAL_SECTION_LEAVE();
1284}
1285
1286static inline bool hri_tcc_get_CTRLA_DMAOS_bit(const void *const hw)
1287{
1288 uint32_t tmp;
1289 tmp = ((Tcc *)hw)->CTRLA.reg;
1290 tmp = (tmp & TCC_CTRLA_DMAOS) >> TCC_CTRLA_DMAOS_Pos;
1291 return (bool)tmp;
1292}
1293
1294static inline void hri_tcc_write_CTRLA_DMAOS_bit(const void *const hw, bool value)
1295{
1296 uint32_t tmp;
1297 TCC_CRITICAL_SECTION_ENTER();
1298 tmp = ((Tcc *)hw)->CTRLA.reg;
1299 tmp &= ~TCC_CTRLA_DMAOS;
1300 tmp |= value << TCC_CTRLA_DMAOS_Pos;
1301 ((Tcc *)hw)->CTRLA.reg = tmp;
1302 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1303 TCC_CRITICAL_SECTION_LEAVE();
1304}
1305
1306static inline void hri_tcc_clear_CTRLA_DMAOS_bit(const void *const hw)
1307{
1308 TCC_CRITICAL_SECTION_ENTER();
1309 ((Tcc *)hw)->CTRLA.reg &= ~TCC_CTRLA_DMAOS;
1310 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1311 TCC_CRITICAL_SECTION_LEAVE();
1312}
1313
1314static inline void hri_tcc_toggle_CTRLA_DMAOS_bit(const void *const hw)
1315{
1316 TCC_CRITICAL_SECTION_ENTER();
1317 ((Tcc *)hw)->CTRLA.reg ^= TCC_CTRLA_DMAOS;
1318 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1319 TCC_CRITICAL_SECTION_LEAVE();
1320}
1321
1322static inline void hri_tcc_set_CTRLA_CPTEN0_bit(const void *const hw)
1323{
1324 TCC_CRITICAL_SECTION_ENTER();
1325 ((Tcc *)hw)->CTRLA.reg |= TCC_CTRLA_CPTEN0;
1326 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1327 TCC_CRITICAL_SECTION_LEAVE();
1328}
1329
1330static inline bool hri_tcc_get_CTRLA_CPTEN0_bit(const void *const hw)
1331{
1332 uint32_t tmp;
1333 tmp = ((Tcc *)hw)->CTRLA.reg;
1334 tmp = (tmp & TCC_CTRLA_CPTEN0) >> TCC_CTRLA_CPTEN0_Pos;
1335 return (bool)tmp;
1336}
1337
1338static inline void hri_tcc_write_CTRLA_CPTEN0_bit(const void *const hw, bool value)
1339{
1340 uint32_t tmp;
1341 TCC_CRITICAL_SECTION_ENTER();
1342 tmp = ((Tcc *)hw)->CTRLA.reg;
1343 tmp &= ~TCC_CTRLA_CPTEN0;
1344 tmp |= value << TCC_CTRLA_CPTEN0_Pos;
1345 ((Tcc *)hw)->CTRLA.reg = tmp;
1346 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1347 TCC_CRITICAL_SECTION_LEAVE();
1348}
1349
1350static inline void hri_tcc_clear_CTRLA_CPTEN0_bit(const void *const hw)
1351{
1352 TCC_CRITICAL_SECTION_ENTER();
1353 ((Tcc *)hw)->CTRLA.reg &= ~TCC_CTRLA_CPTEN0;
1354 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1355 TCC_CRITICAL_SECTION_LEAVE();
1356}
1357
1358static inline void hri_tcc_toggle_CTRLA_CPTEN0_bit(const void *const hw)
1359{
1360 TCC_CRITICAL_SECTION_ENTER();
1361 ((Tcc *)hw)->CTRLA.reg ^= TCC_CTRLA_CPTEN0;
1362 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1363 TCC_CRITICAL_SECTION_LEAVE();
1364}
1365
1366static inline void hri_tcc_set_CTRLA_CPTEN1_bit(const void *const hw)
1367{
1368 TCC_CRITICAL_SECTION_ENTER();
1369 ((Tcc *)hw)->CTRLA.reg |= TCC_CTRLA_CPTEN1;
1370 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1371 TCC_CRITICAL_SECTION_LEAVE();
1372}
1373
1374static inline bool hri_tcc_get_CTRLA_CPTEN1_bit(const void *const hw)
1375{
1376 uint32_t tmp;
1377 tmp = ((Tcc *)hw)->CTRLA.reg;
1378 tmp = (tmp & TCC_CTRLA_CPTEN1) >> TCC_CTRLA_CPTEN1_Pos;
1379 return (bool)tmp;
1380}
1381
1382static inline void hri_tcc_write_CTRLA_CPTEN1_bit(const void *const hw, bool value)
1383{
1384 uint32_t tmp;
1385 TCC_CRITICAL_SECTION_ENTER();
1386 tmp = ((Tcc *)hw)->CTRLA.reg;
1387 tmp &= ~TCC_CTRLA_CPTEN1;
1388 tmp |= value << TCC_CTRLA_CPTEN1_Pos;
1389 ((Tcc *)hw)->CTRLA.reg = tmp;
1390 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1391 TCC_CRITICAL_SECTION_LEAVE();
1392}
1393
1394static inline void hri_tcc_clear_CTRLA_CPTEN1_bit(const void *const hw)
1395{
1396 TCC_CRITICAL_SECTION_ENTER();
1397 ((Tcc *)hw)->CTRLA.reg &= ~TCC_CTRLA_CPTEN1;
1398 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1399 TCC_CRITICAL_SECTION_LEAVE();
1400}
1401
1402static inline void hri_tcc_toggle_CTRLA_CPTEN1_bit(const void *const hw)
1403{
1404 TCC_CRITICAL_SECTION_ENTER();
1405 ((Tcc *)hw)->CTRLA.reg ^= TCC_CTRLA_CPTEN1;
1406 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1407 TCC_CRITICAL_SECTION_LEAVE();
1408}
1409
1410static inline void hri_tcc_set_CTRLA_CPTEN2_bit(const void *const hw)
1411{
1412 TCC_CRITICAL_SECTION_ENTER();
1413 ((Tcc *)hw)->CTRLA.reg |= TCC_CTRLA_CPTEN2;
1414 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1415 TCC_CRITICAL_SECTION_LEAVE();
1416}
1417
1418static inline bool hri_tcc_get_CTRLA_CPTEN2_bit(const void *const hw)
1419{
1420 uint32_t tmp;
1421 tmp = ((Tcc *)hw)->CTRLA.reg;
1422 tmp = (tmp & TCC_CTRLA_CPTEN2) >> TCC_CTRLA_CPTEN2_Pos;
1423 return (bool)tmp;
1424}
1425
1426static inline void hri_tcc_write_CTRLA_CPTEN2_bit(const void *const hw, bool value)
1427{
1428 uint32_t tmp;
1429 TCC_CRITICAL_SECTION_ENTER();
1430 tmp = ((Tcc *)hw)->CTRLA.reg;
1431 tmp &= ~TCC_CTRLA_CPTEN2;
1432 tmp |= value << TCC_CTRLA_CPTEN2_Pos;
1433 ((Tcc *)hw)->CTRLA.reg = tmp;
1434 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1435 TCC_CRITICAL_SECTION_LEAVE();
1436}
1437
1438static inline void hri_tcc_clear_CTRLA_CPTEN2_bit(const void *const hw)
1439{
1440 TCC_CRITICAL_SECTION_ENTER();
1441 ((Tcc *)hw)->CTRLA.reg &= ~TCC_CTRLA_CPTEN2;
1442 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1443 TCC_CRITICAL_SECTION_LEAVE();
1444}
1445
1446static inline void hri_tcc_toggle_CTRLA_CPTEN2_bit(const void *const hw)
1447{
1448 TCC_CRITICAL_SECTION_ENTER();
1449 ((Tcc *)hw)->CTRLA.reg ^= TCC_CTRLA_CPTEN2;
1450 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1451 TCC_CRITICAL_SECTION_LEAVE();
1452}
1453
1454static inline void hri_tcc_set_CTRLA_CPTEN3_bit(const void *const hw)
1455{
1456 TCC_CRITICAL_SECTION_ENTER();
1457 ((Tcc *)hw)->CTRLA.reg |= TCC_CTRLA_CPTEN3;
1458 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1459 TCC_CRITICAL_SECTION_LEAVE();
1460}
1461
1462static inline bool hri_tcc_get_CTRLA_CPTEN3_bit(const void *const hw)
1463{
1464 uint32_t tmp;
1465 tmp = ((Tcc *)hw)->CTRLA.reg;
1466 tmp = (tmp & TCC_CTRLA_CPTEN3) >> TCC_CTRLA_CPTEN3_Pos;
1467 return (bool)tmp;
1468}
1469
1470static inline void hri_tcc_write_CTRLA_CPTEN3_bit(const void *const hw, bool value)
1471{
1472 uint32_t tmp;
1473 TCC_CRITICAL_SECTION_ENTER();
1474 tmp = ((Tcc *)hw)->CTRLA.reg;
1475 tmp &= ~TCC_CTRLA_CPTEN3;
1476 tmp |= value << TCC_CTRLA_CPTEN3_Pos;
1477 ((Tcc *)hw)->CTRLA.reg = tmp;
1478 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1479 TCC_CRITICAL_SECTION_LEAVE();
1480}
1481
1482static inline void hri_tcc_clear_CTRLA_CPTEN3_bit(const void *const hw)
1483{
1484 TCC_CRITICAL_SECTION_ENTER();
1485 ((Tcc *)hw)->CTRLA.reg &= ~TCC_CTRLA_CPTEN3;
1486 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1487 TCC_CRITICAL_SECTION_LEAVE();
1488}
1489
1490static inline void hri_tcc_toggle_CTRLA_CPTEN3_bit(const void *const hw)
1491{
1492 TCC_CRITICAL_SECTION_ENTER();
1493 ((Tcc *)hw)->CTRLA.reg ^= TCC_CTRLA_CPTEN3;
1494 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1495 TCC_CRITICAL_SECTION_LEAVE();
1496}
1497
1498static inline void hri_tcc_set_CTRLA_CPTEN4_bit(const void *const hw)
1499{
1500 TCC_CRITICAL_SECTION_ENTER();
1501 ((Tcc *)hw)->CTRLA.reg |= TCC_CTRLA_CPTEN4;
1502 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1503 TCC_CRITICAL_SECTION_LEAVE();
1504}
1505
1506static inline bool hri_tcc_get_CTRLA_CPTEN4_bit(const void *const hw)
1507{
1508 uint32_t tmp;
1509 tmp = ((Tcc *)hw)->CTRLA.reg;
1510 tmp = (tmp & TCC_CTRLA_CPTEN4) >> TCC_CTRLA_CPTEN4_Pos;
1511 return (bool)tmp;
1512}
1513
1514static inline void hri_tcc_write_CTRLA_CPTEN4_bit(const void *const hw, bool value)
1515{
1516 uint32_t tmp;
1517 TCC_CRITICAL_SECTION_ENTER();
1518 tmp = ((Tcc *)hw)->CTRLA.reg;
1519 tmp &= ~TCC_CTRLA_CPTEN4;
1520 tmp |= value << TCC_CTRLA_CPTEN4_Pos;
1521 ((Tcc *)hw)->CTRLA.reg = tmp;
1522 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1523 TCC_CRITICAL_SECTION_LEAVE();
1524}
1525
1526static inline void hri_tcc_clear_CTRLA_CPTEN4_bit(const void *const hw)
1527{
1528 TCC_CRITICAL_SECTION_ENTER();
1529 ((Tcc *)hw)->CTRLA.reg &= ~TCC_CTRLA_CPTEN4;
1530 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1531 TCC_CRITICAL_SECTION_LEAVE();
1532}
1533
1534static inline void hri_tcc_toggle_CTRLA_CPTEN4_bit(const void *const hw)
1535{
1536 TCC_CRITICAL_SECTION_ENTER();
1537 ((Tcc *)hw)->CTRLA.reg ^= TCC_CTRLA_CPTEN4;
1538 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1539 TCC_CRITICAL_SECTION_LEAVE();
1540}
1541
1542static inline void hri_tcc_set_CTRLA_CPTEN5_bit(const void *const hw)
1543{
1544 TCC_CRITICAL_SECTION_ENTER();
1545 ((Tcc *)hw)->CTRLA.reg |= TCC_CTRLA_CPTEN5;
1546 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1547 TCC_CRITICAL_SECTION_LEAVE();
1548}
1549
1550static inline bool hri_tcc_get_CTRLA_CPTEN5_bit(const void *const hw)
1551{
1552 uint32_t tmp;
1553 tmp = ((Tcc *)hw)->CTRLA.reg;
1554 tmp = (tmp & TCC_CTRLA_CPTEN5) >> TCC_CTRLA_CPTEN5_Pos;
1555 return (bool)tmp;
1556}
1557
1558static inline void hri_tcc_write_CTRLA_CPTEN5_bit(const void *const hw, bool value)
1559{
1560 uint32_t tmp;
1561 TCC_CRITICAL_SECTION_ENTER();
1562 tmp = ((Tcc *)hw)->CTRLA.reg;
1563 tmp &= ~TCC_CTRLA_CPTEN5;
1564 tmp |= value << TCC_CTRLA_CPTEN5_Pos;
1565 ((Tcc *)hw)->CTRLA.reg = tmp;
1566 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1567 TCC_CRITICAL_SECTION_LEAVE();
1568}
1569
1570static inline void hri_tcc_clear_CTRLA_CPTEN5_bit(const void *const hw)
1571{
1572 TCC_CRITICAL_SECTION_ENTER();
1573 ((Tcc *)hw)->CTRLA.reg &= ~TCC_CTRLA_CPTEN5;
1574 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1575 TCC_CRITICAL_SECTION_LEAVE();
1576}
1577
1578static inline void hri_tcc_toggle_CTRLA_CPTEN5_bit(const void *const hw)
1579{
1580 TCC_CRITICAL_SECTION_ENTER();
1581 ((Tcc *)hw)->CTRLA.reg ^= TCC_CTRLA_CPTEN5;
1582 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1583 TCC_CRITICAL_SECTION_LEAVE();
1584}
1585
1586static inline void hri_tcc_set_CTRLA_RESOLUTION_bf(const void *const hw, hri_tcc_ctrla_reg_t mask)
1587{
1588 TCC_CRITICAL_SECTION_ENTER();
1589 ((Tcc *)hw)->CTRLA.reg |= TCC_CTRLA_RESOLUTION(mask);
1590 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1591 TCC_CRITICAL_SECTION_LEAVE();
1592}
1593
1594static inline hri_tcc_ctrla_reg_t hri_tcc_get_CTRLA_RESOLUTION_bf(const void *const hw, hri_tcc_ctrla_reg_t mask)
1595{
1596 uint32_t tmp;
1597 tmp = ((Tcc *)hw)->CTRLA.reg;
1598 tmp = (tmp & TCC_CTRLA_RESOLUTION(mask)) >> TCC_CTRLA_RESOLUTION_Pos;
1599 return tmp;
1600}
1601
1602static inline void hri_tcc_write_CTRLA_RESOLUTION_bf(const void *const hw, hri_tcc_ctrla_reg_t data)
1603{
1604 uint32_t tmp;
1605 TCC_CRITICAL_SECTION_ENTER();
1606 tmp = ((Tcc *)hw)->CTRLA.reg;
1607 tmp &= ~TCC_CTRLA_RESOLUTION_Msk;
1608 tmp |= TCC_CTRLA_RESOLUTION(data);
1609 ((Tcc *)hw)->CTRLA.reg = tmp;
1610 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1611 TCC_CRITICAL_SECTION_LEAVE();
1612}
1613
1614static inline void hri_tcc_clear_CTRLA_RESOLUTION_bf(const void *const hw, hri_tcc_ctrla_reg_t mask)
1615{
1616 TCC_CRITICAL_SECTION_ENTER();
1617 ((Tcc *)hw)->CTRLA.reg &= ~TCC_CTRLA_RESOLUTION(mask);
1618 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1619 TCC_CRITICAL_SECTION_LEAVE();
1620}
1621
1622static inline void hri_tcc_toggle_CTRLA_RESOLUTION_bf(const void *const hw, hri_tcc_ctrla_reg_t mask)
1623{
1624 TCC_CRITICAL_SECTION_ENTER();
1625 ((Tcc *)hw)->CTRLA.reg ^= TCC_CTRLA_RESOLUTION(mask);
1626 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1627 TCC_CRITICAL_SECTION_LEAVE();
1628}
1629
1630static inline hri_tcc_ctrla_reg_t hri_tcc_read_CTRLA_RESOLUTION_bf(const void *const hw)
1631{
1632 uint32_t tmp;
1633 tmp = ((Tcc *)hw)->CTRLA.reg;
1634 tmp = (tmp & TCC_CTRLA_RESOLUTION_Msk) >> TCC_CTRLA_RESOLUTION_Pos;
1635 return tmp;
1636}
1637
1638static inline void hri_tcc_set_CTRLA_PRESCALER_bf(const void *const hw, hri_tcc_ctrla_reg_t mask)
1639{
1640 TCC_CRITICAL_SECTION_ENTER();
1641 ((Tcc *)hw)->CTRLA.reg |= TCC_CTRLA_PRESCALER(mask);
1642 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1643 TCC_CRITICAL_SECTION_LEAVE();
1644}
1645
1646static inline hri_tcc_ctrla_reg_t hri_tcc_get_CTRLA_PRESCALER_bf(const void *const hw, hri_tcc_ctrla_reg_t mask)
1647{
1648 uint32_t tmp;
1649 tmp = ((Tcc *)hw)->CTRLA.reg;
1650 tmp = (tmp & TCC_CTRLA_PRESCALER(mask)) >> TCC_CTRLA_PRESCALER_Pos;
1651 return tmp;
1652}
1653
1654static inline void hri_tcc_write_CTRLA_PRESCALER_bf(const void *const hw, hri_tcc_ctrla_reg_t data)
1655{
1656 uint32_t tmp;
1657 TCC_CRITICAL_SECTION_ENTER();
1658 tmp = ((Tcc *)hw)->CTRLA.reg;
1659 tmp &= ~TCC_CTRLA_PRESCALER_Msk;
1660 tmp |= TCC_CTRLA_PRESCALER(data);
1661 ((Tcc *)hw)->CTRLA.reg = tmp;
1662 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1663 TCC_CRITICAL_SECTION_LEAVE();
1664}
1665
1666static inline void hri_tcc_clear_CTRLA_PRESCALER_bf(const void *const hw, hri_tcc_ctrla_reg_t mask)
1667{
1668 TCC_CRITICAL_SECTION_ENTER();
1669 ((Tcc *)hw)->CTRLA.reg &= ~TCC_CTRLA_PRESCALER(mask);
1670 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1671 TCC_CRITICAL_SECTION_LEAVE();
1672}
1673
1674static inline void hri_tcc_toggle_CTRLA_PRESCALER_bf(const void *const hw, hri_tcc_ctrla_reg_t mask)
1675{
1676 TCC_CRITICAL_SECTION_ENTER();
1677 ((Tcc *)hw)->CTRLA.reg ^= TCC_CTRLA_PRESCALER(mask);
1678 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1679 TCC_CRITICAL_SECTION_LEAVE();
1680}
1681
1682static inline hri_tcc_ctrla_reg_t hri_tcc_read_CTRLA_PRESCALER_bf(const void *const hw)
1683{
1684 uint32_t tmp;
1685 tmp = ((Tcc *)hw)->CTRLA.reg;
1686 tmp = (tmp & TCC_CTRLA_PRESCALER_Msk) >> TCC_CTRLA_PRESCALER_Pos;
1687 return tmp;
1688}
1689
1690static inline void hri_tcc_set_CTRLA_PRESCSYNC_bf(const void *const hw, hri_tcc_ctrla_reg_t mask)
1691{
1692 TCC_CRITICAL_SECTION_ENTER();
1693 ((Tcc *)hw)->CTRLA.reg |= TCC_CTRLA_PRESCSYNC(mask);
1694 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1695 TCC_CRITICAL_SECTION_LEAVE();
1696}
1697
1698static inline hri_tcc_ctrla_reg_t hri_tcc_get_CTRLA_PRESCSYNC_bf(const void *const hw, hri_tcc_ctrla_reg_t mask)
1699{
1700 uint32_t tmp;
1701 tmp = ((Tcc *)hw)->CTRLA.reg;
1702 tmp = (tmp & TCC_CTRLA_PRESCSYNC(mask)) >> TCC_CTRLA_PRESCSYNC_Pos;
1703 return tmp;
1704}
1705
1706static inline void hri_tcc_write_CTRLA_PRESCSYNC_bf(const void *const hw, hri_tcc_ctrla_reg_t data)
1707{
1708 uint32_t tmp;
1709 TCC_CRITICAL_SECTION_ENTER();
1710 tmp = ((Tcc *)hw)->CTRLA.reg;
1711 tmp &= ~TCC_CTRLA_PRESCSYNC_Msk;
1712 tmp |= TCC_CTRLA_PRESCSYNC(data);
1713 ((Tcc *)hw)->CTRLA.reg = tmp;
1714 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1715 TCC_CRITICAL_SECTION_LEAVE();
1716}
1717
1718static inline void hri_tcc_clear_CTRLA_PRESCSYNC_bf(const void *const hw, hri_tcc_ctrla_reg_t mask)
1719{
1720 TCC_CRITICAL_SECTION_ENTER();
1721 ((Tcc *)hw)->CTRLA.reg &= ~TCC_CTRLA_PRESCSYNC(mask);
1722 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1723 TCC_CRITICAL_SECTION_LEAVE();
1724}
1725
1726static inline void hri_tcc_toggle_CTRLA_PRESCSYNC_bf(const void *const hw, hri_tcc_ctrla_reg_t mask)
1727{
1728 TCC_CRITICAL_SECTION_ENTER();
1729 ((Tcc *)hw)->CTRLA.reg ^= TCC_CTRLA_PRESCSYNC(mask);
1730 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
1731 TCC_CRITICAL_SECTION_LEAVE();
1732}
1733
1734static inline hri_tcc_ctrla_reg_t hri_tcc_read_CTRLA_PRESCSYNC_bf(const void *const hw)
1735{
1736 uint32_t tmp;
1737 tmp = ((Tcc *)hw)->CTRLA.reg;
1738 tmp = (tmp & TCC_CTRLA_PRESCSYNC_Msk) >> TCC_CTRLA_PRESCSYNC_Pos;
1739 return tmp;
1740}
1741
1742static inline void hri_tcc_set_CTRLA_reg(const void *const hw, hri_tcc_ctrla_reg_t mask)
1743{
1744 TCC_CRITICAL_SECTION_ENTER();
1745 ((Tcc *)hw)->CTRLA.reg |= mask;
1746 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_SWRST | TCC_SYNCBUSY_ENABLE);
1747 TCC_CRITICAL_SECTION_LEAVE();
1748}
1749
1750static inline hri_tcc_ctrla_reg_t hri_tcc_get_CTRLA_reg(const void *const hw, hri_tcc_ctrla_reg_t mask)
1751{
1752 uint32_t tmp;
1753 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_SWRST | TCC_SYNCBUSY_ENABLE);
1754 tmp = ((Tcc *)hw)->CTRLA.reg;
1755 tmp &= mask;
1756 return tmp;
1757}
1758
1759static inline void hri_tcc_write_CTRLA_reg(const void *const hw, hri_tcc_ctrla_reg_t data)
1760{
1761 TCC_CRITICAL_SECTION_ENTER();
1762 ((Tcc *)hw)->CTRLA.reg = data;
1763 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_SWRST | TCC_SYNCBUSY_ENABLE);
1764 TCC_CRITICAL_SECTION_LEAVE();
1765}
1766
1767static inline void hri_tcc_clear_CTRLA_reg(const void *const hw, hri_tcc_ctrla_reg_t mask)
1768{
1769 TCC_CRITICAL_SECTION_ENTER();
1770 ((Tcc *)hw)->CTRLA.reg &= ~mask;
1771 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_SWRST | TCC_SYNCBUSY_ENABLE);
1772 TCC_CRITICAL_SECTION_LEAVE();
1773}
1774
1775static inline void hri_tcc_toggle_CTRLA_reg(const void *const hw, hri_tcc_ctrla_reg_t mask)
1776{
1777 TCC_CRITICAL_SECTION_ENTER();
1778 ((Tcc *)hw)->CTRLA.reg ^= mask;
1779 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_SWRST | TCC_SYNCBUSY_ENABLE);
1780 TCC_CRITICAL_SECTION_LEAVE();
1781}
1782
1783static inline hri_tcc_ctrla_reg_t hri_tcc_read_CTRLA_reg(const void *const hw)
1784{
1785 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_SWRST | TCC_SYNCBUSY_ENABLE);
1786 return ((Tcc *)hw)->CTRLA.reg;
1787}
1788
1789static inline void hri_tcc_set_FCTRLA_KEEP_bit(const void *const hw)
1790{
1791 TCC_CRITICAL_SECTION_ENTER();
1792 ((Tcc *)hw)->FCTRLA.reg |= TCC_FCTRLA_KEEP;
1793 TCC_CRITICAL_SECTION_LEAVE();
1794}
1795
1796static inline bool hri_tcc_get_FCTRLA_KEEP_bit(const void *const hw)
1797{
1798 uint32_t tmp;
1799 tmp = ((Tcc *)hw)->FCTRLA.reg;
1800 tmp = (tmp & TCC_FCTRLA_KEEP) >> TCC_FCTRLA_KEEP_Pos;
1801 return (bool)tmp;
1802}
1803
1804static inline void hri_tcc_write_FCTRLA_KEEP_bit(const void *const hw, bool value)
1805{
1806 uint32_t tmp;
1807 TCC_CRITICAL_SECTION_ENTER();
1808 tmp = ((Tcc *)hw)->FCTRLA.reg;
1809 tmp &= ~TCC_FCTRLA_KEEP;
1810 tmp |= value << TCC_FCTRLA_KEEP_Pos;
1811 ((Tcc *)hw)->FCTRLA.reg = tmp;
1812 TCC_CRITICAL_SECTION_LEAVE();
1813}
1814
1815static inline void hri_tcc_clear_FCTRLA_KEEP_bit(const void *const hw)
1816{
1817 TCC_CRITICAL_SECTION_ENTER();
1818 ((Tcc *)hw)->FCTRLA.reg &= ~TCC_FCTRLA_KEEP;
1819 TCC_CRITICAL_SECTION_LEAVE();
1820}
1821
1822static inline void hri_tcc_toggle_FCTRLA_KEEP_bit(const void *const hw)
1823{
1824 TCC_CRITICAL_SECTION_ENTER();
1825 ((Tcc *)hw)->FCTRLA.reg ^= TCC_FCTRLA_KEEP;
1826 TCC_CRITICAL_SECTION_LEAVE();
1827}
1828
1829static inline void hri_tcc_set_FCTRLA_QUAL_bit(const void *const hw)
1830{
1831 TCC_CRITICAL_SECTION_ENTER();
1832 ((Tcc *)hw)->FCTRLA.reg |= TCC_FCTRLA_QUAL;
1833 TCC_CRITICAL_SECTION_LEAVE();
1834}
1835
1836static inline bool hri_tcc_get_FCTRLA_QUAL_bit(const void *const hw)
1837{
1838 uint32_t tmp;
1839 tmp = ((Tcc *)hw)->FCTRLA.reg;
1840 tmp = (tmp & TCC_FCTRLA_QUAL) >> TCC_FCTRLA_QUAL_Pos;
1841 return (bool)tmp;
1842}
1843
1844static inline void hri_tcc_write_FCTRLA_QUAL_bit(const void *const hw, bool value)
1845{
1846 uint32_t tmp;
1847 TCC_CRITICAL_SECTION_ENTER();
1848 tmp = ((Tcc *)hw)->FCTRLA.reg;
1849 tmp &= ~TCC_FCTRLA_QUAL;
1850 tmp |= value << TCC_FCTRLA_QUAL_Pos;
1851 ((Tcc *)hw)->FCTRLA.reg = tmp;
1852 TCC_CRITICAL_SECTION_LEAVE();
1853}
1854
1855static inline void hri_tcc_clear_FCTRLA_QUAL_bit(const void *const hw)
1856{
1857 TCC_CRITICAL_SECTION_ENTER();
1858 ((Tcc *)hw)->FCTRLA.reg &= ~TCC_FCTRLA_QUAL;
1859 TCC_CRITICAL_SECTION_LEAVE();
1860}
1861
1862static inline void hri_tcc_toggle_FCTRLA_QUAL_bit(const void *const hw)
1863{
1864 TCC_CRITICAL_SECTION_ENTER();
1865 ((Tcc *)hw)->FCTRLA.reg ^= TCC_FCTRLA_QUAL;
1866 TCC_CRITICAL_SECTION_LEAVE();
1867}
1868
1869static inline void hri_tcc_set_FCTRLA_RESTART_bit(const void *const hw)
1870{
1871 TCC_CRITICAL_SECTION_ENTER();
1872 ((Tcc *)hw)->FCTRLA.reg |= TCC_FCTRLA_RESTART;
1873 TCC_CRITICAL_SECTION_LEAVE();
1874}
1875
1876static inline bool hri_tcc_get_FCTRLA_RESTART_bit(const void *const hw)
1877{
1878 uint32_t tmp;
1879 tmp = ((Tcc *)hw)->FCTRLA.reg;
1880 tmp = (tmp & TCC_FCTRLA_RESTART) >> TCC_FCTRLA_RESTART_Pos;
1881 return (bool)tmp;
1882}
1883
1884static inline void hri_tcc_write_FCTRLA_RESTART_bit(const void *const hw, bool value)
1885{
1886 uint32_t tmp;
1887 TCC_CRITICAL_SECTION_ENTER();
1888 tmp = ((Tcc *)hw)->FCTRLA.reg;
1889 tmp &= ~TCC_FCTRLA_RESTART;
1890 tmp |= value << TCC_FCTRLA_RESTART_Pos;
1891 ((Tcc *)hw)->FCTRLA.reg = tmp;
1892 TCC_CRITICAL_SECTION_LEAVE();
1893}
1894
1895static inline void hri_tcc_clear_FCTRLA_RESTART_bit(const void *const hw)
1896{
1897 TCC_CRITICAL_SECTION_ENTER();
1898 ((Tcc *)hw)->FCTRLA.reg &= ~TCC_FCTRLA_RESTART;
1899 TCC_CRITICAL_SECTION_LEAVE();
1900}
1901
1902static inline void hri_tcc_toggle_FCTRLA_RESTART_bit(const void *const hw)
1903{
1904 TCC_CRITICAL_SECTION_ENTER();
1905 ((Tcc *)hw)->FCTRLA.reg ^= TCC_FCTRLA_RESTART;
1906 TCC_CRITICAL_SECTION_LEAVE();
1907}
1908
1909static inline void hri_tcc_set_FCTRLA_BLANKPRESC_bit(const void *const hw)
1910{
1911 TCC_CRITICAL_SECTION_ENTER();
1912 ((Tcc *)hw)->FCTRLA.reg |= TCC_FCTRLA_BLANKPRESC;
1913 TCC_CRITICAL_SECTION_LEAVE();
1914}
1915
1916static inline bool hri_tcc_get_FCTRLA_BLANKPRESC_bit(const void *const hw)
1917{
1918 uint32_t tmp;
1919 tmp = ((Tcc *)hw)->FCTRLA.reg;
1920 tmp = (tmp & TCC_FCTRLA_BLANKPRESC) >> TCC_FCTRLA_BLANKPRESC_Pos;
1921 return (bool)tmp;
1922}
1923
1924static inline void hri_tcc_write_FCTRLA_BLANKPRESC_bit(const void *const hw, bool value)
1925{
1926 uint32_t tmp;
1927 TCC_CRITICAL_SECTION_ENTER();
1928 tmp = ((Tcc *)hw)->FCTRLA.reg;
1929 tmp &= ~TCC_FCTRLA_BLANKPRESC;
1930 tmp |= value << TCC_FCTRLA_BLANKPRESC_Pos;
1931 ((Tcc *)hw)->FCTRLA.reg = tmp;
1932 TCC_CRITICAL_SECTION_LEAVE();
1933}
1934
1935static inline void hri_tcc_clear_FCTRLA_BLANKPRESC_bit(const void *const hw)
1936{
1937 TCC_CRITICAL_SECTION_ENTER();
1938 ((Tcc *)hw)->FCTRLA.reg &= ~TCC_FCTRLA_BLANKPRESC;
1939 TCC_CRITICAL_SECTION_LEAVE();
1940}
1941
1942static inline void hri_tcc_toggle_FCTRLA_BLANKPRESC_bit(const void *const hw)
1943{
1944 TCC_CRITICAL_SECTION_ENTER();
1945 ((Tcc *)hw)->FCTRLA.reg ^= TCC_FCTRLA_BLANKPRESC;
1946 TCC_CRITICAL_SECTION_LEAVE();
1947}
1948
1949static inline void hri_tcc_set_FCTRLA_SRC_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
1950{
1951 TCC_CRITICAL_SECTION_ENTER();
1952 ((Tcc *)hw)->FCTRLA.reg |= TCC_FCTRLA_SRC(mask);
1953 TCC_CRITICAL_SECTION_LEAVE();
1954}
1955
1956static inline hri_tcc_fctrla_reg_t hri_tcc_get_FCTRLA_SRC_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
1957{
1958 uint32_t tmp;
1959 tmp = ((Tcc *)hw)->FCTRLA.reg;
1960 tmp = (tmp & TCC_FCTRLA_SRC(mask)) >> TCC_FCTRLA_SRC_Pos;
1961 return tmp;
1962}
1963
1964static inline void hri_tcc_write_FCTRLA_SRC_bf(const void *const hw, hri_tcc_fctrla_reg_t data)
1965{
1966 uint32_t tmp;
1967 TCC_CRITICAL_SECTION_ENTER();
1968 tmp = ((Tcc *)hw)->FCTRLA.reg;
1969 tmp &= ~TCC_FCTRLA_SRC_Msk;
1970 tmp |= TCC_FCTRLA_SRC(data);
1971 ((Tcc *)hw)->FCTRLA.reg = tmp;
1972 TCC_CRITICAL_SECTION_LEAVE();
1973}
1974
1975static inline void hri_tcc_clear_FCTRLA_SRC_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
1976{
1977 TCC_CRITICAL_SECTION_ENTER();
1978 ((Tcc *)hw)->FCTRLA.reg &= ~TCC_FCTRLA_SRC(mask);
1979 TCC_CRITICAL_SECTION_LEAVE();
1980}
1981
1982static inline void hri_tcc_toggle_FCTRLA_SRC_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
1983{
1984 TCC_CRITICAL_SECTION_ENTER();
1985 ((Tcc *)hw)->FCTRLA.reg ^= TCC_FCTRLA_SRC(mask);
1986 TCC_CRITICAL_SECTION_LEAVE();
1987}
1988
1989static inline hri_tcc_fctrla_reg_t hri_tcc_read_FCTRLA_SRC_bf(const void *const hw)
1990{
1991 uint32_t tmp;
1992 tmp = ((Tcc *)hw)->FCTRLA.reg;
1993 tmp = (tmp & TCC_FCTRLA_SRC_Msk) >> TCC_FCTRLA_SRC_Pos;
1994 return tmp;
1995}
1996
1997static inline void hri_tcc_set_FCTRLA_BLANK_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
1998{
1999 TCC_CRITICAL_SECTION_ENTER();
2000 ((Tcc *)hw)->FCTRLA.reg |= TCC_FCTRLA_BLANK(mask);
2001 TCC_CRITICAL_SECTION_LEAVE();
2002}
2003
2004static inline hri_tcc_fctrla_reg_t hri_tcc_get_FCTRLA_BLANK_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2005{
2006 uint32_t tmp;
2007 tmp = ((Tcc *)hw)->FCTRLA.reg;
2008 tmp = (tmp & TCC_FCTRLA_BLANK(mask)) >> TCC_FCTRLA_BLANK_Pos;
2009 return tmp;
2010}
2011
2012static inline void hri_tcc_write_FCTRLA_BLANK_bf(const void *const hw, hri_tcc_fctrla_reg_t data)
2013{
2014 uint32_t tmp;
2015 TCC_CRITICAL_SECTION_ENTER();
2016 tmp = ((Tcc *)hw)->FCTRLA.reg;
2017 tmp &= ~TCC_FCTRLA_BLANK_Msk;
2018 tmp |= TCC_FCTRLA_BLANK(data);
2019 ((Tcc *)hw)->FCTRLA.reg = tmp;
2020 TCC_CRITICAL_SECTION_LEAVE();
2021}
2022
2023static inline void hri_tcc_clear_FCTRLA_BLANK_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2024{
2025 TCC_CRITICAL_SECTION_ENTER();
2026 ((Tcc *)hw)->FCTRLA.reg &= ~TCC_FCTRLA_BLANK(mask);
2027 TCC_CRITICAL_SECTION_LEAVE();
2028}
2029
2030static inline void hri_tcc_toggle_FCTRLA_BLANK_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2031{
2032 TCC_CRITICAL_SECTION_ENTER();
2033 ((Tcc *)hw)->FCTRLA.reg ^= TCC_FCTRLA_BLANK(mask);
2034 TCC_CRITICAL_SECTION_LEAVE();
2035}
2036
2037static inline hri_tcc_fctrla_reg_t hri_tcc_read_FCTRLA_BLANK_bf(const void *const hw)
2038{
2039 uint32_t tmp;
2040 tmp = ((Tcc *)hw)->FCTRLA.reg;
2041 tmp = (tmp & TCC_FCTRLA_BLANK_Msk) >> TCC_FCTRLA_BLANK_Pos;
2042 return tmp;
2043}
2044
2045static inline void hri_tcc_set_FCTRLA_HALT_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2046{
2047 TCC_CRITICAL_SECTION_ENTER();
2048 ((Tcc *)hw)->FCTRLA.reg |= TCC_FCTRLA_HALT(mask);
2049 TCC_CRITICAL_SECTION_LEAVE();
2050}
2051
2052static inline hri_tcc_fctrla_reg_t hri_tcc_get_FCTRLA_HALT_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2053{
2054 uint32_t tmp;
2055 tmp = ((Tcc *)hw)->FCTRLA.reg;
2056 tmp = (tmp & TCC_FCTRLA_HALT(mask)) >> TCC_FCTRLA_HALT_Pos;
2057 return tmp;
2058}
2059
2060static inline void hri_tcc_write_FCTRLA_HALT_bf(const void *const hw, hri_tcc_fctrla_reg_t data)
2061{
2062 uint32_t tmp;
2063 TCC_CRITICAL_SECTION_ENTER();
2064 tmp = ((Tcc *)hw)->FCTRLA.reg;
2065 tmp &= ~TCC_FCTRLA_HALT_Msk;
2066 tmp |= TCC_FCTRLA_HALT(data);
2067 ((Tcc *)hw)->FCTRLA.reg = tmp;
2068 TCC_CRITICAL_SECTION_LEAVE();
2069}
2070
2071static inline void hri_tcc_clear_FCTRLA_HALT_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2072{
2073 TCC_CRITICAL_SECTION_ENTER();
2074 ((Tcc *)hw)->FCTRLA.reg &= ~TCC_FCTRLA_HALT(mask);
2075 TCC_CRITICAL_SECTION_LEAVE();
2076}
2077
2078static inline void hri_tcc_toggle_FCTRLA_HALT_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2079{
2080 TCC_CRITICAL_SECTION_ENTER();
2081 ((Tcc *)hw)->FCTRLA.reg ^= TCC_FCTRLA_HALT(mask);
2082 TCC_CRITICAL_SECTION_LEAVE();
2083}
2084
2085static inline hri_tcc_fctrla_reg_t hri_tcc_read_FCTRLA_HALT_bf(const void *const hw)
2086{
2087 uint32_t tmp;
2088 tmp = ((Tcc *)hw)->FCTRLA.reg;
2089 tmp = (tmp & TCC_FCTRLA_HALT_Msk) >> TCC_FCTRLA_HALT_Pos;
2090 return tmp;
2091}
2092
2093static inline void hri_tcc_set_FCTRLA_CHSEL_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2094{
2095 TCC_CRITICAL_SECTION_ENTER();
2096 ((Tcc *)hw)->FCTRLA.reg |= TCC_FCTRLA_CHSEL(mask);
2097 TCC_CRITICAL_SECTION_LEAVE();
2098}
2099
2100static inline hri_tcc_fctrla_reg_t hri_tcc_get_FCTRLA_CHSEL_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2101{
2102 uint32_t tmp;
2103 tmp = ((Tcc *)hw)->FCTRLA.reg;
2104 tmp = (tmp & TCC_FCTRLA_CHSEL(mask)) >> TCC_FCTRLA_CHSEL_Pos;
2105 return tmp;
2106}
2107
2108static inline void hri_tcc_write_FCTRLA_CHSEL_bf(const void *const hw, hri_tcc_fctrla_reg_t data)
2109{
2110 uint32_t tmp;
2111 TCC_CRITICAL_SECTION_ENTER();
2112 tmp = ((Tcc *)hw)->FCTRLA.reg;
2113 tmp &= ~TCC_FCTRLA_CHSEL_Msk;
2114 tmp |= TCC_FCTRLA_CHSEL(data);
2115 ((Tcc *)hw)->FCTRLA.reg = tmp;
2116 TCC_CRITICAL_SECTION_LEAVE();
2117}
2118
2119static inline void hri_tcc_clear_FCTRLA_CHSEL_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2120{
2121 TCC_CRITICAL_SECTION_ENTER();
2122 ((Tcc *)hw)->FCTRLA.reg &= ~TCC_FCTRLA_CHSEL(mask);
2123 TCC_CRITICAL_SECTION_LEAVE();
2124}
2125
2126static inline void hri_tcc_toggle_FCTRLA_CHSEL_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2127{
2128 TCC_CRITICAL_SECTION_ENTER();
2129 ((Tcc *)hw)->FCTRLA.reg ^= TCC_FCTRLA_CHSEL(mask);
2130 TCC_CRITICAL_SECTION_LEAVE();
2131}
2132
2133static inline hri_tcc_fctrla_reg_t hri_tcc_read_FCTRLA_CHSEL_bf(const void *const hw)
2134{
2135 uint32_t tmp;
2136 tmp = ((Tcc *)hw)->FCTRLA.reg;
2137 tmp = (tmp & TCC_FCTRLA_CHSEL_Msk) >> TCC_FCTRLA_CHSEL_Pos;
2138 return tmp;
2139}
2140
2141static inline void hri_tcc_set_FCTRLA_CAPTURE_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2142{
2143 TCC_CRITICAL_SECTION_ENTER();
2144 ((Tcc *)hw)->FCTRLA.reg |= TCC_FCTRLA_CAPTURE(mask);
2145 TCC_CRITICAL_SECTION_LEAVE();
2146}
2147
2148static inline hri_tcc_fctrla_reg_t hri_tcc_get_FCTRLA_CAPTURE_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2149{
2150 uint32_t tmp;
2151 tmp = ((Tcc *)hw)->FCTRLA.reg;
2152 tmp = (tmp & TCC_FCTRLA_CAPTURE(mask)) >> TCC_FCTRLA_CAPTURE_Pos;
2153 return tmp;
2154}
2155
2156static inline void hri_tcc_write_FCTRLA_CAPTURE_bf(const void *const hw, hri_tcc_fctrla_reg_t data)
2157{
2158 uint32_t tmp;
2159 TCC_CRITICAL_SECTION_ENTER();
2160 tmp = ((Tcc *)hw)->FCTRLA.reg;
2161 tmp &= ~TCC_FCTRLA_CAPTURE_Msk;
2162 tmp |= TCC_FCTRLA_CAPTURE(data);
2163 ((Tcc *)hw)->FCTRLA.reg = tmp;
2164 TCC_CRITICAL_SECTION_LEAVE();
2165}
2166
2167static inline void hri_tcc_clear_FCTRLA_CAPTURE_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2168{
2169 TCC_CRITICAL_SECTION_ENTER();
2170 ((Tcc *)hw)->FCTRLA.reg &= ~TCC_FCTRLA_CAPTURE(mask);
2171 TCC_CRITICAL_SECTION_LEAVE();
2172}
2173
2174static inline void hri_tcc_toggle_FCTRLA_CAPTURE_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2175{
2176 TCC_CRITICAL_SECTION_ENTER();
2177 ((Tcc *)hw)->FCTRLA.reg ^= TCC_FCTRLA_CAPTURE(mask);
2178 TCC_CRITICAL_SECTION_LEAVE();
2179}
2180
2181static inline hri_tcc_fctrla_reg_t hri_tcc_read_FCTRLA_CAPTURE_bf(const void *const hw)
2182{
2183 uint32_t tmp;
2184 tmp = ((Tcc *)hw)->FCTRLA.reg;
2185 tmp = (tmp & TCC_FCTRLA_CAPTURE_Msk) >> TCC_FCTRLA_CAPTURE_Pos;
2186 return tmp;
2187}
2188
2189static inline void hri_tcc_set_FCTRLA_BLANKVAL_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2190{
2191 TCC_CRITICAL_SECTION_ENTER();
2192 ((Tcc *)hw)->FCTRLA.reg |= TCC_FCTRLA_BLANKVAL(mask);
2193 TCC_CRITICAL_SECTION_LEAVE();
2194}
2195
2196static inline hri_tcc_fctrla_reg_t hri_tcc_get_FCTRLA_BLANKVAL_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2197{
2198 uint32_t tmp;
2199 tmp = ((Tcc *)hw)->FCTRLA.reg;
2200 tmp = (tmp & TCC_FCTRLA_BLANKVAL(mask)) >> TCC_FCTRLA_BLANKVAL_Pos;
2201 return tmp;
2202}
2203
2204static inline void hri_tcc_write_FCTRLA_BLANKVAL_bf(const void *const hw, hri_tcc_fctrla_reg_t data)
2205{
2206 uint32_t tmp;
2207 TCC_CRITICAL_SECTION_ENTER();
2208 tmp = ((Tcc *)hw)->FCTRLA.reg;
2209 tmp &= ~TCC_FCTRLA_BLANKVAL_Msk;
2210 tmp |= TCC_FCTRLA_BLANKVAL(data);
2211 ((Tcc *)hw)->FCTRLA.reg = tmp;
2212 TCC_CRITICAL_SECTION_LEAVE();
2213}
2214
2215static inline void hri_tcc_clear_FCTRLA_BLANKVAL_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2216{
2217 TCC_CRITICAL_SECTION_ENTER();
2218 ((Tcc *)hw)->FCTRLA.reg &= ~TCC_FCTRLA_BLANKVAL(mask);
2219 TCC_CRITICAL_SECTION_LEAVE();
2220}
2221
2222static inline void hri_tcc_toggle_FCTRLA_BLANKVAL_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2223{
2224 TCC_CRITICAL_SECTION_ENTER();
2225 ((Tcc *)hw)->FCTRLA.reg ^= TCC_FCTRLA_BLANKVAL(mask);
2226 TCC_CRITICAL_SECTION_LEAVE();
2227}
2228
2229static inline hri_tcc_fctrla_reg_t hri_tcc_read_FCTRLA_BLANKVAL_bf(const void *const hw)
2230{
2231 uint32_t tmp;
2232 tmp = ((Tcc *)hw)->FCTRLA.reg;
2233 tmp = (tmp & TCC_FCTRLA_BLANKVAL_Msk) >> TCC_FCTRLA_BLANKVAL_Pos;
2234 return tmp;
2235}
2236
2237static inline void hri_tcc_set_FCTRLA_FILTERVAL_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2238{
2239 TCC_CRITICAL_SECTION_ENTER();
2240 ((Tcc *)hw)->FCTRLA.reg |= TCC_FCTRLA_FILTERVAL(mask);
2241 TCC_CRITICAL_SECTION_LEAVE();
2242}
2243
2244static inline hri_tcc_fctrla_reg_t hri_tcc_get_FCTRLA_FILTERVAL_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2245{
2246 uint32_t tmp;
2247 tmp = ((Tcc *)hw)->FCTRLA.reg;
2248 tmp = (tmp & TCC_FCTRLA_FILTERVAL(mask)) >> TCC_FCTRLA_FILTERVAL_Pos;
2249 return tmp;
2250}
2251
2252static inline void hri_tcc_write_FCTRLA_FILTERVAL_bf(const void *const hw, hri_tcc_fctrla_reg_t data)
2253{
2254 uint32_t tmp;
2255 TCC_CRITICAL_SECTION_ENTER();
2256 tmp = ((Tcc *)hw)->FCTRLA.reg;
2257 tmp &= ~TCC_FCTRLA_FILTERVAL_Msk;
2258 tmp |= TCC_FCTRLA_FILTERVAL(data);
2259 ((Tcc *)hw)->FCTRLA.reg = tmp;
2260 TCC_CRITICAL_SECTION_LEAVE();
2261}
2262
2263static inline void hri_tcc_clear_FCTRLA_FILTERVAL_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2264{
2265 TCC_CRITICAL_SECTION_ENTER();
2266 ((Tcc *)hw)->FCTRLA.reg &= ~TCC_FCTRLA_FILTERVAL(mask);
2267 TCC_CRITICAL_SECTION_LEAVE();
2268}
2269
2270static inline void hri_tcc_toggle_FCTRLA_FILTERVAL_bf(const void *const hw, hri_tcc_fctrla_reg_t mask)
2271{
2272 TCC_CRITICAL_SECTION_ENTER();
2273 ((Tcc *)hw)->FCTRLA.reg ^= TCC_FCTRLA_FILTERVAL(mask);
2274 TCC_CRITICAL_SECTION_LEAVE();
2275}
2276
2277static inline hri_tcc_fctrla_reg_t hri_tcc_read_FCTRLA_FILTERVAL_bf(const void *const hw)
2278{
2279 uint32_t tmp;
2280 tmp = ((Tcc *)hw)->FCTRLA.reg;
2281 tmp = (tmp & TCC_FCTRLA_FILTERVAL_Msk) >> TCC_FCTRLA_FILTERVAL_Pos;
2282 return tmp;
2283}
2284
2285static inline void hri_tcc_set_FCTRLA_reg(const void *const hw, hri_tcc_fctrla_reg_t mask)
2286{
2287 TCC_CRITICAL_SECTION_ENTER();
2288 ((Tcc *)hw)->FCTRLA.reg |= mask;
2289 TCC_CRITICAL_SECTION_LEAVE();
2290}
2291
2292static inline hri_tcc_fctrla_reg_t hri_tcc_get_FCTRLA_reg(const void *const hw, hri_tcc_fctrla_reg_t mask)
2293{
2294 uint32_t tmp;
2295 tmp = ((Tcc *)hw)->FCTRLA.reg;
2296 tmp &= mask;
2297 return tmp;
2298}
2299
2300static inline void hri_tcc_write_FCTRLA_reg(const void *const hw, hri_tcc_fctrla_reg_t data)
2301{
2302 TCC_CRITICAL_SECTION_ENTER();
2303 ((Tcc *)hw)->FCTRLA.reg = data;
2304 TCC_CRITICAL_SECTION_LEAVE();
2305}
2306
2307static inline void hri_tcc_clear_FCTRLA_reg(const void *const hw, hri_tcc_fctrla_reg_t mask)
2308{
2309 TCC_CRITICAL_SECTION_ENTER();
2310 ((Tcc *)hw)->FCTRLA.reg &= ~mask;
2311 TCC_CRITICAL_SECTION_LEAVE();
2312}
2313
2314static inline void hri_tcc_toggle_FCTRLA_reg(const void *const hw, hri_tcc_fctrla_reg_t mask)
2315{
2316 TCC_CRITICAL_SECTION_ENTER();
2317 ((Tcc *)hw)->FCTRLA.reg ^= mask;
2318 TCC_CRITICAL_SECTION_LEAVE();
2319}
2320
2321static inline hri_tcc_fctrla_reg_t hri_tcc_read_FCTRLA_reg(const void *const hw)
2322{
2323 return ((Tcc *)hw)->FCTRLA.reg;
2324}
2325
2326static inline void hri_tcc_set_FCTRLB_KEEP_bit(const void *const hw)
2327{
2328 TCC_CRITICAL_SECTION_ENTER();
2329 ((Tcc *)hw)->FCTRLB.reg |= TCC_FCTRLB_KEEP;
2330 TCC_CRITICAL_SECTION_LEAVE();
2331}
2332
2333static inline bool hri_tcc_get_FCTRLB_KEEP_bit(const void *const hw)
2334{
2335 uint32_t tmp;
2336 tmp = ((Tcc *)hw)->FCTRLB.reg;
2337 tmp = (tmp & TCC_FCTRLB_KEEP) >> TCC_FCTRLB_KEEP_Pos;
2338 return (bool)tmp;
2339}
2340
2341static inline void hri_tcc_write_FCTRLB_KEEP_bit(const void *const hw, bool value)
2342{
2343 uint32_t tmp;
2344 TCC_CRITICAL_SECTION_ENTER();
2345 tmp = ((Tcc *)hw)->FCTRLB.reg;
2346 tmp &= ~TCC_FCTRLB_KEEP;
2347 tmp |= value << TCC_FCTRLB_KEEP_Pos;
2348 ((Tcc *)hw)->FCTRLB.reg = tmp;
2349 TCC_CRITICAL_SECTION_LEAVE();
2350}
2351
2352static inline void hri_tcc_clear_FCTRLB_KEEP_bit(const void *const hw)
2353{
2354 TCC_CRITICAL_SECTION_ENTER();
2355 ((Tcc *)hw)->FCTRLB.reg &= ~TCC_FCTRLB_KEEP;
2356 TCC_CRITICAL_SECTION_LEAVE();
2357}
2358
2359static inline void hri_tcc_toggle_FCTRLB_KEEP_bit(const void *const hw)
2360{
2361 TCC_CRITICAL_SECTION_ENTER();
2362 ((Tcc *)hw)->FCTRLB.reg ^= TCC_FCTRLB_KEEP;
2363 TCC_CRITICAL_SECTION_LEAVE();
2364}
2365
2366static inline void hri_tcc_set_FCTRLB_QUAL_bit(const void *const hw)
2367{
2368 TCC_CRITICAL_SECTION_ENTER();
2369 ((Tcc *)hw)->FCTRLB.reg |= TCC_FCTRLB_QUAL;
2370 TCC_CRITICAL_SECTION_LEAVE();
2371}
2372
2373static inline bool hri_tcc_get_FCTRLB_QUAL_bit(const void *const hw)
2374{
2375 uint32_t tmp;
2376 tmp = ((Tcc *)hw)->FCTRLB.reg;
2377 tmp = (tmp & TCC_FCTRLB_QUAL) >> TCC_FCTRLB_QUAL_Pos;
2378 return (bool)tmp;
2379}
2380
2381static inline void hri_tcc_write_FCTRLB_QUAL_bit(const void *const hw, bool value)
2382{
2383 uint32_t tmp;
2384 TCC_CRITICAL_SECTION_ENTER();
2385 tmp = ((Tcc *)hw)->FCTRLB.reg;
2386 tmp &= ~TCC_FCTRLB_QUAL;
2387 tmp |= value << TCC_FCTRLB_QUAL_Pos;
2388 ((Tcc *)hw)->FCTRLB.reg = tmp;
2389 TCC_CRITICAL_SECTION_LEAVE();
2390}
2391
2392static inline void hri_tcc_clear_FCTRLB_QUAL_bit(const void *const hw)
2393{
2394 TCC_CRITICAL_SECTION_ENTER();
2395 ((Tcc *)hw)->FCTRLB.reg &= ~TCC_FCTRLB_QUAL;
2396 TCC_CRITICAL_SECTION_LEAVE();
2397}
2398
2399static inline void hri_tcc_toggle_FCTRLB_QUAL_bit(const void *const hw)
2400{
2401 TCC_CRITICAL_SECTION_ENTER();
2402 ((Tcc *)hw)->FCTRLB.reg ^= TCC_FCTRLB_QUAL;
2403 TCC_CRITICAL_SECTION_LEAVE();
2404}
2405
2406static inline void hri_tcc_set_FCTRLB_RESTART_bit(const void *const hw)
2407{
2408 TCC_CRITICAL_SECTION_ENTER();
2409 ((Tcc *)hw)->FCTRLB.reg |= TCC_FCTRLB_RESTART;
2410 TCC_CRITICAL_SECTION_LEAVE();
2411}
2412
2413static inline bool hri_tcc_get_FCTRLB_RESTART_bit(const void *const hw)
2414{
2415 uint32_t tmp;
2416 tmp = ((Tcc *)hw)->FCTRLB.reg;
2417 tmp = (tmp & TCC_FCTRLB_RESTART) >> TCC_FCTRLB_RESTART_Pos;
2418 return (bool)tmp;
2419}
2420
2421static inline void hri_tcc_write_FCTRLB_RESTART_bit(const void *const hw, bool value)
2422{
2423 uint32_t tmp;
2424 TCC_CRITICAL_SECTION_ENTER();
2425 tmp = ((Tcc *)hw)->FCTRLB.reg;
2426 tmp &= ~TCC_FCTRLB_RESTART;
2427 tmp |= value << TCC_FCTRLB_RESTART_Pos;
2428 ((Tcc *)hw)->FCTRLB.reg = tmp;
2429 TCC_CRITICAL_SECTION_LEAVE();
2430}
2431
2432static inline void hri_tcc_clear_FCTRLB_RESTART_bit(const void *const hw)
2433{
2434 TCC_CRITICAL_SECTION_ENTER();
2435 ((Tcc *)hw)->FCTRLB.reg &= ~TCC_FCTRLB_RESTART;
2436 TCC_CRITICAL_SECTION_LEAVE();
2437}
2438
2439static inline void hri_tcc_toggle_FCTRLB_RESTART_bit(const void *const hw)
2440{
2441 TCC_CRITICAL_SECTION_ENTER();
2442 ((Tcc *)hw)->FCTRLB.reg ^= TCC_FCTRLB_RESTART;
2443 TCC_CRITICAL_SECTION_LEAVE();
2444}
2445
2446static inline void hri_tcc_set_FCTRLB_BLANKPRESC_bit(const void *const hw)
2447{
2448 TCC_CRITICAL_SECTION_ENTER();
2449 ((Tcc *)hw)->FCTRLB.reg |= TCC_FCTRLB_BLANKPRESC;
2450 TCC_CRITICAL_SECTION_LEAVE();
2451}
2452
2453static inline bool hri_tcc_get_FCTRLB_BLANKPRESC_bit(const void *const hw)
2454{
2455 uint32_t tmp;
2456 tmp = ((Tcc *)hw)->FCTRLB.reg;
2457 tmp = (tmp & TCC_FCTRLB_BLANKPRESC) >> TCC_FCTRLB_BLANKPRESC_Pos;
2458 return (bool)tmp;
2459}
2460
2461static inline void hri_tcc_write_FCTRLB_BLANKPRESC_bit(const void *const hw, bool value)
2462{
2463 uint32_t tmp;
2464 TCC_CRITICAL_SECTION_ENTER();
2465 tmp = ((Tcc *)hw)->FCTRLB.reg;
2466 tmp &= ~TCC_FCTRLB_BLANKPRESC;
2467 tmp |= value << TCC_FCTRLB_BLANKPRESC_Pos;
2468 ((Tcc *)hw)->FCTRLB.reg = tmp;
2469 TCC_CRITICAL_SECTION_LEAVE();
2470}
2471
2472static inline void hri_tcc_clear_FCTRLB_BLANKPRESC_bit(const void *const hw)
2473{
2474 TCC_CRITICAL_SECTION_ENTER();
2475 ((Tcc *)hw)->FCTRLB.reg &= ~TCC_FCTRLB_BLANKPRESC;
2476 TCC_CRITICAL_SECTION_LEAVE();
2477}
2478
2479static inline void hri_tcc_toggle_FCTRLB_BLANKPRESC_bit(const void *const hw)
2480{
2481 TCC_CRITICAL_SECTION_ENTER();
2482 ((Tcc *)hw)->FCTRLB.reg ^= TCC_FCTRLB_BLANKPRESC;
2483 TCC_CRITICAL_SECTION_LEAVE();
2484}
2485
2486static inline void hri_tcc_set_FCTRLB_SRC_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2487{
2488 TCC_CRITICAL_SECTION_ENTER();
2489 ((Tcc *)hw)->FCTRLB.reg |= TCC_FCTRLB_SRC(mask);
2490 TCC_CRITICAL_SECTION_LEAVE();
2491}
2492
2493static inline hri_tcc_fctrlb_reg_t hri_tcc_get_FCTRLB_SRC_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2494{
2495 uint32_t tmp;
2496 tmp = ((Tcc *)hw)->FCTRLB.reg;
2497 tmp = (tmp & TCC_FCTRLB_SRC(mask)) >> TCC_FCTRLB_SRC_Pos;
2498 return tmp;
2499}
2500
2501static inline void hri_tcc_write_FCTRLB_SRC_bf(const void *const hw, hri_tcc_fctrlb_reg_t data)
2502{
2503 uint32_t tmp;
2504 TCC_CRITICAL_SECTION_ENTER();
2505 tmp = ((Tcc *)hw)->FCTRLB.reg;
2506 tmp &= ~TCC_FCTRLB_SRC_Msk;
2507 tmp |= TCC_FCTRLB_SRC(data);
2508 ((Tcc *)hw)->FCTRLB.reg = tmp;
2509 TCC_CRITICAL_SECTION_LEAVE();
2510}
2511
2512static inline void hri_tcc_clear_FCTRLB_SRC_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2513{
2514 TCC_CRITICAL_SECTION_ENTER();
2515 ((Tcc *)hw)->FCTRLB.reg &= ~TCC_FCTRLB_SRC(mask);
2516 TCC_CRITICAL_SECTION_LEAVE();
2517}
2518
2519static inline void hri_tcc_toggle_FCTRLB_SRC_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2520{
2521 TCC_CRITICAL_SECTION_ENTER();
2522 ((Tcc *)hw)->FCTRLB.reg ^= TCC_FCTRLB_SRC(mask);
2523 TCC_CRITICAL_SECTION_LEAVE();
2524}
2525
2526static inline hri_tcc_fctrlb_reg_t hri_tcc_read_FCTRLB_SRC_bf(const void *const hw)
2527{
2528 uint32_t tmp;
2529 tmp = ((Tcc *)hw)->FCTRLB.reg;
2530 tmp = (tmp & TCC_FCTRLB_SRC_Msk) >> TCC_FCTRLB_SRC_Pos;
2531 return tmp;
2532}
2533
2534static inline void hri_tcc_set_FCTRLB_BLANK_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2535{
2536 TCC_CRITICAL_SECTION_ENTER();
2537 ((Tcc *)hw)->FCTRLB.reg |= TCC_FCTRLB_BLANK(mask);
2538 TCC_CRITICAL_SECTION_LEAVE();
2539}
2540
2541static inline hri_tcc_fctrlb_reg_t hri_tcc_get_FCTRLB_BLANK_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2542{
2543 uint32_t tmp;
2544 tmp = ((Tcc *)hw)->FCTRLB.reg;
2545 tmp = (tmp & TCC_FCTRLB_BLANK(mask)) >> TCC_FCTRLB_BLANK_Pos;
2546 return tmp;
2547}
2548
2549static inline void hri_tcc_write_FCTRLB_BLANK_bf(const void *const hw, hri_tcc_fctrlb_reg_t data)
2550{
2551 uint32_t tmp;
2552 TCC_CRITICAL_SECTION_ENTER();
2553 tmp = ((Tcc *)hw)->FCTRLB.reg;
2554 tmp &= ~TCC_FCTRLB_BLANK_Msk;
2555 tmp |= TCC_FCTRLB_BLANK(data);
2556 ((Tcc *)hw)->FCTRLB.reg = tmp;
2557 TCC_CRITICAL_SECTION_LEAVE();
2558}
2559
2560static inline void hri_tcc_clear_FCTRLB_BLANK_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2561{
2562 TCC_CRITICAL_SECTION_ENTER();
2563 ((Tcc *)hw)->FCTRLB.reg &= ~TCC_FCTRLB_BLANK(mask);
2564 TCC_CRITICAL_SECTION_LEAVE();
2565}
2566
2567static inline void hri_tcc_toggle_FCTRLB_BLANK_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2568{
2569 TCC_CRITICAL_SECTION_ENTER();
2570 ((Tcc *)hw)->FCTRLB.reg ^= TCC_FCTRLB_BLANK(mask);
2571 TCC_CRITICAL_SECTION_LEAVE();
2572}
2573
2574static inline hri_tcc_fctrlb_reg_t hri_tcc_read_FCTRLB_BLANK_bf(const void *const hw)
2575{
2576 uint32_t tmp;
2577 tmp = ((Tcc *)hw)->FCTRLB.reg;
2578 tmp = (tmp & TCC_FCTRLB_BLANK_Msk) >> TCC_FCTRLB_BLANK_Pos;
2579 return tmp;
2580}
2581
2582static inline void hri_tcc_set_FCTRLB_HALT_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2583{
2584 TCC_CRITICAL_SECTION_ENTER();
2585 ((Tcc *)hw)->FCTRLB.reg |= TCC_FCTRLB_HALT(mask);
2586 TCC_CRITICAL_SECTION_LEAVE();
2587}
2588
2589static inline hri_tcc_fctrlb_reg_t hri_tcc_get_FCTRLB_HALT_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2590{
2591 uint32_t tmp;
2592 tmp = ((Tcc *)hw)->FCTRLB.reg;
2593 tmp = (tmp & TCC_FCTRLB_HALT(mask)) >> TCC_FCTRLB_HALT_Pos;
2594 return tmp;
2595}
2596
2597static inline void hri_tcc_write_FCTRLB_HALT_bf(const void *const hw, hri_tcc_fctrlb_reg_t data)
2598{
2599 uint32_t tmp;
2600 TCC_CRITICAL_SECTION_ENTER();
2601 tmp = ((Tcc *)hw)->FCTRLB.reg;
2602 tmp &= ~TCC_FCTRLB_HALT_Msk;
2603 tmp |= TCC_FCTRLB_HALT(data);
2604 ((Tcc *)hw)->FCTRLB.reg = tmp;
2605 TCC_CRITICAL_SECTION_LEAVE();
2606}
2607
2608static inline void hri_tcc_clear_FCTRLB_HALT_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2609{
2610 TCC_CRITICAL_SECTION_ENTER();
2611 ((Tcc *)hw)->FCTRLB.reg &= ~TCC_FCTRLB_HALT(mask);
2612 TCC_CRITICAL_SECTION_LEAVE();
2613}
2614
2615static inline void hri_tcc_toggle_FCTRLB_HALT_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2616{
2617 TCC_CRITICAL_SECTION_ENTER();
2618 ((Tcc *)hw)->FCTRLB.reg ^= TCC_FCTRLB_HALT(mask);
2619 TCC_CRITICAL_SECTION_LEAVE();
2620}
2621
2622static inline hri_tcc_fctrlb_reg_t hri_tcc_read_FCTRLB_HALT_bf(const void *const hw)
2623{
2624 uint32_t tmp;
2625 tmp = ((Tcc *)hw)->FCTRLB.reg;
2626 tmp = (tmp & TCC_FCTRLB_HALT_Msk) >> TCC_FCTRLB_HALT_Pos;
2627 return tmp;
2628}
2629
2630static inline void hri_tcc_set_FCTRLB_CHSEL_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2631{
2632 TCC_CRITICAL_SECTION_ENTER();
2633 ((Tcc *)hw)->FCTRLB.reg |= TCC_FCTRLB_CHSEL(mask);
2634 TCC_CRITICAL_SECTION_LEAVE();
2635}
2636
2637static inline hri_tcc_fctrlb_reg_t hri_tcc_get_FCTRLB_CHSEL_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2638{
2639 uint32_t tmp;
2640 tmp = ((Tcc *)hw)->FCTRLB.reg;
2641 tmp = (tmp & TCC_FCTRLB_CHSEL(mask)) >> TCC_FCTRLB_CHSEL_Pos;
2642 return tmp;
2643}
2644
2645static inline void hri_tcc_write_FCTRLB_CHSEL_bf(const void *const hw, hri_tcc_fctrlb_reg_t data)
2646{
2647 uint32_t tmp;
2648 TCC_CRITICAL_SECTION_ENTER();
2649 tmp = ((Tcc *)hw)->FCTRLB.reg;
2650 tmp &= ~TCC_FCTRLB_CHSEL_Msk;
2651 tmp |= TCC_FCTRLB_CHSEL(data);
2652 ((Tcc *)hw)->FCTRLB.reg = tmp;
2653 TCC_CRITICAL_SECTION_LEAVE();
2654}
2655
2656static inline void hri_tcc_clear_FCTRLB_CHSEL_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2657{
2658 TCC_CRITICAL_SECTION_ENTER();
2659 ((Tcc *)hw)->FCTRLB.reg &= ~TCC_FCTRLB_CHSEL(mask);
2660 TCC_CRITICAL_SECTION_LEAVE();
2661}
2662
2663static inline void hri_tcc_toggle_FCTRLB_CHSEL_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2664{
2665 TCC_CRITICAL_SECTION_ENTER();
2666 ((Tcc *)hw)->FCTRLB.reg ^= TCC_FCTRLB_CHSEL(mask);
2667 TCC_CRITICAL_SECTION_LEAVE();
2668}
2669
2670static inline hri_tcc_fctrlb_reg_t hri_tcc_read_FCTRLB_CHSEL_bf(const void *const hw)
2671{
2672 uint32_t tmp;
2673 tmp = ((Tcc *)hw)->FCTRLB.reg;
2674 tmp = (tmp & TCC_FCTRLB_CHSEL_Msk) >> TCC_FCTRLB_CHSEL_Pos;
2675 return tmp;
2676}
2677
2678static inline void hri_tcc_set_FCTRLB_CAPTURE_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2679{
2680 TCC_CRITICAL_SECTION_ENTER();
2681 ((Tcc *)hw)->FCTRLB.reg |= TCC_FCTRLB_CAPTURE(mask);
2682 TCC_CRITICAL_SECTION_LEAVE();
2683}
2684
2685static inline hri_tcc_fctrlb_reg_t hri_tcc_get_FCTRLB_CAPTURE_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2686{
2687 uint32_t tmp;
2688 tmp = ((Tcc *)hw)->FCTRLB.reg;
2689 tmp = (tmp & TCC_FCTRLB_CAPTURE(mask)) >> TCC_FCTRLB_CAPTURE_Pos;
2690 return tmp;
2691}
2692
2693static inline void hri_tcc_write_FCTRLB_CAPTURE_bf(const void *const hw, hri_tcc_fctrlb_reg_t data)
2694{
2695 uint32_t tmp;
2696 TCC_CRITICAL_SECTION_ENTER();
2697 tmp = ((Tcc *)hw)->FCTRLB.reg;
2698 tmp &= ~TCC_FCTRLB_CAPTURE_Msk;
2699 tmp |= TCC_FCTRLB_CAPTURE(data);
2700 ((Tcc *)hw)->FCTRLB.reg = tmp;
2701 TCC_CRITICAL_SECTION_LEAVE();
2702}
2703
2704static inline void hri_tcc_clear_FCTRLB_CAPTURE_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2705{
2706 TCC_CRITICAL_SECTION_ENTER();
2707 ((Tcc *)hw)->FCTRLB.reg &= ~TCC_FCTRLB_CAPTURE(mask);
2708 TCC_CRITICAL_SECTION_LEAVE();
2709}
2710
2711static inline void hri_tcc_toggle_FCTRLB_CAPTURE_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2712{
2713 TCC_CRITICAL_SECTION_ENTER();
2714 ((Tcc *)hw)->FCTRLB.reg ^= TCC_FCTRLB_CAPTURE(mask);
2715 TCC_CRITICAL_SECTION_LEAVE();
2716}
2717
2718static inline hri_tcc_fctrlb_reg_t hri_tcc_read_FCTRLB_CAPTURE_bf(const void *const hw)
2719{
2720 uint32_t tmp;
2721 tmp = ((Tcc *)hw)->FCTRLB.reg;
2722 tmp = (tmp & TCC_FCTRLB_CAPTURE_Msk) >> TCC_FCTRLB_CAPTURE_Pos;
2723 return tmp;
2724}
2725
2726static inline void hri_tcc_set_FCTRLB_BLANKVAL_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2727{
2728 TCC_CRITICAL_SECTION_ENTER();
2729 ((Tcc *)hw)->FCTRLB.reg |= TCC_FCTRLB_BLANKVAL(mask);
2730 TCC_CRITICAL_SECTION_LEAVE();
2731}
2732
2733static inline hri_tcc_fctrlb_reg_t hri_tcc_get_FCTRLB_BLANKVAL_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2734{
2735 uint32_t tmp;
2736 tmp = ((Tcc *)hw)->FCTRLB.reg;
2737 tmp = (tmp & TCC_FCTRLB_BLANKVAL(mask)) >> TCC_FCTRLB_BLANKVAL_Pos;
2738 return tmp;
2739}
2740
2741static inline void hri_tcc_write_FCTRLB_BLANKVAL_bf(const void *const hw, hri_tcc_fctrlb_reg_t data)
2742{
2743 uint32_t tmp;
2744 TCC_CRITICAL_SECTION_ENTER();
2745 tmp = ((Tcc *)hw)->FCTRLB.reg;
2746 tmp &= ~TCC_FCTRLB_BLANKVAL_Msk;
2747 tmp |= TCC_FCTRLB_BLANKVAL(data);
2748 ((Tcc *)hw)->FCTRLB.reg = tmp;
2749 TCC_CRITICAL_SECTION_LEAVE();
2750}
2751
2752static inline void hri_tcc_clear_FCTRLB_BLANKVAL_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2753{
2754 TCC_CRITICAL_SECTION_ENTER();
2755 ((Tcc *)hw)->FCTRLB.reg &= ~TCC_FCTRLB_BLANKVAL(mask);
2756 TCC_CRITICAL_SECTION_LEAVE();
2757}
2758
2759static inline void hri_tcc_toggle_FCTRLB_BLANKVAL_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2760{
2761 TCC_CRITICAL_SECTION_ENTER();
2762 ((Tcc *)hw)->FCTRLB.reg ^= TCC_FCTRLB_BLANKVAL(mask);
2763 TCC_CRITICAL_SECTION_LEAVE();
2764}
2765
2766static inline hri_tcc_fctrlb_reg_t hri_tcc_read_FCTRLB_BLANKVAL_bf(const void *const hw)
2767{
2768 uint32_t tmp;
2769 tmp = ((Tcc *)hw)->FCTRLB.reg;
2770 tmp = (tmp & TCC_FCTRLB_BLANKVAL_Msk) >> TCC_FCTRLB_BLANKVAL_Pos;
2771 return tmp;
2772}
2773
2774static inline void hri_tcc_set_FCTRLB_FILTERVAL_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2775{
2776 TCC_CRITICAL_SECTION_ENTER();
2777 ((Tcc *)hw)->FCTRLB.reg |= TCC_FCTRLB_FILTERVAL(mask);
2778 TCC_CRITICAL_SECTION_LEAVE();
2779}
2780
2781static inline hri_tcc_fctrlb_reg_t hri_tcc_get_FCTRLB_FILTERVAL_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2782{
2783 uint32_t tmp;
2784 tmp = ((Tcc *)hw)->FCTRLB.reg;
2785 tmp = (tmp & TCC_FCTRLB_FILTERVAL(mask)) >> TCC_FCTRLB_FILTERVAL_Pos;
2786 return tmp;
2787}
2788
2789static inline void hri_tcc_write_FCTRLB_FILTERVAL_bf(const void *const hw, hri_tcc_fctrlb_reg_t data)
2790{
2791 uint32_t tmp;
2792 TCC_CRITICAL_SECTION_ENTER();
2793 tmp = ((Tcc *)hw)->FCTRLB.reg;
2794 tmp &= ~TCC_FCTRLB_FILTERVAL_Msk;
2795 tmp |= TCC_FCTRLB_FILTERVAL(data);
2796 ((Tcc *)hw)->FCTRLB.reg = tmp;
2797 TCC_CRITICAL_SECTION_LEAVE();
2798}
2799
2800static inline void hri_tcc_clear_FCTRLB_FILTERVAL_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2801{
2802 TCC_CRITICAL_SECTION_ENTER();
2803 ((Tcc *)hw)->FCTRLB.reg &= ~TCC_FCTRLB_FILTERVAL(mask);
2804 TCC_CRITICAL_SECTION_LEAVE();
2805}
2806
2807static inline void hri_tcc_toggle_FCTRLB_FILTERVAL_bf(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2808{
2809 TCC_CRITICAL_SECTION_ENTER();
2810 ((Tcc *)hw)->FCTRLB.reg ^= TCC_FCTRLB_FILTERVAL(mask);
2811 TCC_CRITICAL_SECTION_LEAVE();
2812}
2813
2814static inline hri_tcc_fctrlb_reg_t hri_tcc_read_FCTRLB_FILTERVAL_bf(const void *const hw)
2815{
2816 uint32_t tmp;
2817 tmp = ((Tcc *)hw)->FCTRLB.reg;
2818 tmp = (tmp & TCC_FCTRLB_FILTERVAL_Msk) >> TCC_FCTRLB_FILTERVAL_Pos;
2819 return tmp;
2820}
2821
2822static inline void hri_tcc_set_FCTRLB_reg(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2823{
2824 TCC_CRITICAL_SECTION_ENTER();
2825 ((Tcc *)hw)->FCTRLB.reg |= mask;
2826 TCC_CRITICAL_SECTION_LEAVE();
2827}
2828
2829static inline hri_tcc_fctrlb_reg_t hri_tcc_get_FCTRLB_reg(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2830{
2831 uint32_t tmp;
2832 tmp = ((Tcc *)hw)->FCTRLB.reg;
2833 tmp &= mask;
2834 return tmp;
2835}
2836
2837static inline void hri_tcc_write_FCTRLB_reg(const void *const hw, hri_tcc_fctrlb_reg_t data)
2838{
2839 TCC_CRITICAL_SECTION_ENTER();
2840 ((Tcc *)hw)->FCTRLB.reg = data;
2841 TCC_CRITICAL_SECTION_LEAVE();
2842}
2843
2844static inline void hri_tcc_clear_FCTRLB_reg(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2845{
2846 TCC_CRITICAL_SECTION_ENTER();
2847 ((Tcc *)hw)->FCTRLB.reg &= ~mask;
2848 TCC_CRITICAL_SECTION_LEAVE();
2849}
2850
2851static inline void hri_tcc_toggle_FCTRLB_reg(const void *const hw, hri_tcc_fctrlb_reg_t mask)
2852{
2853 TCC_CRITICAL_SECTION_ENTER();
2854 ((Tcc *)hw)->FCTRLB.reg ^= mask;
2855 TCC_CRITICAL_SECTION_LEAVE();
2856}
2857
2858static inline hri_tcc_fctrlb_reg_t hri_tcc_read_FCTRLB_reg(const void *const hw)
2859{
2860 return ((Tcc *)hw)->FCTRLB.reg;
2861}
2862
2863static inline void hri_tcc_set_WEXCTRL_DTIEN0_bit(const void *const hw)
2864{
2865 TCC_CRITICAL_SECTION_ENTER();
2866 ((Tcc *)hw)->WEXCTRL.reg |= TCC_WEXCTRL_DTIEN0;
2867 TCC_CRITICAL_SECTION_LEAVE();
2868}
2869
2870static inline bool hri_tcc_get_WEXCTRL_DTIEN0_bit(const void *const hw)
2871{
2872 uint32_t tmp;
2873 tmp = ((Tcc *)hw)->WEXCTRL.reg;
2874 tmp = (tmp & TCC_WEXCTRL_DTIEN0) >> TCC_WEXCTRL_DTIEN0_Pos;
2875 return (bool)tmp;
2876}
2877
2878static inline void hri_tcc_write_WEXCTRL_DTIEN0_bit(const void *const hw, bool value)
2879{
2880 uint32_t tmp;
2881 TCC_CRITICAL_SECTION_ENTER();
2882 tmp = ((Tcc *)hw)->WEXCTRL.reg;
2883 tmp &= ~TCC_WEXCTRL_DTIEN0;
2884 tmp |= value << TCC_WEXCTRL_DTIEN0_Pos;
2885 ((Tcc *)hw)->WEXCTRL.reg = tmp;
2886 TCC_CRITICAL_SECTION_LEAVE();
2887}
2888
2889static inline void hri_tcc_clear_WEXCTRL_DTIEN0_bit(const void *const hw)
2890{
2891 TCC_CRITICAL_SECTION_ENTER();
2892 ((Tcc *)hw)->WEXCTRL.reg &= ~TCC_WEXCTRL_DTIEN0;
2893 TCC_CRITICAL_SECTION_LEAVE();
2894}
2895
2896static inline void hri_tcc_toggle_WEXCTRL_DTIEN0_bit(const void *const hw)
2897{
2898 TCC_CRITICAL_SECTION_ENTER();
2899 ((Tcc *)hw)->WEXCTRL.reg ^= TCC_WEXCTRL_DTIEN0;
2900 TCC_CRITICAL_SECTION_LEAVE();
2901}
2902
2903static inline void hri_tcc_set_WEXCTRL_DTIEN1_bit(const void *const hw)
2904{
2905 TCC_CRITICAL_SECTION_ENTER();
2906 ((Tcc *)hw)->WEXCTRL.reg |= TCC_WEXCTRL_DTIEN1;
2907 TCC_CRITICAL_SECTION_LEAVE();
2908}
2909
2910static inline bool hri_tcc_get_WEXCTRL_DTIEN1_bit(const void *const hw)
2911{
2912 uint32_t tmp;
2913 tmp = ((Tcc *)hw)->WEXCTRL.reg;
2914 tmp = (tmp & TCC_WEXCTRL_DTIEN1) >> TCC_WEXCTRL_DTIEN1_Pos;
2915 return (bool)tmp;
2916}
2917
2918static inline void hri_tcc_write_WEXCTRL_DTIEN1_bit(const void *const hw, bool value)
2919{
2920 uint32_t tmp;
2921 TCC_CRITICAL_SECTION_ENTER();
2922 tmp = ((Tcc *)hw)->WEXCTRL.reg;
2923 tmp &= ~TCC_WEXCTRL_DTIEN1;
2924 tmp |= value << TCC_WEXCTRL_DTIEN1_Pos;
2925 ((Tcc *)hw)->WEXCTRL.reg = tmp;
2926 TCC_CRITICAL_SECTION_LEAVE();
2927}
2928
2929static inline void hri_tcc_clear_WEXCTRL_DTIEN1_bit(const void *const hw)
2930{
2931 TCC_CRITICAL_SECTION_ENTER();
2932 ((Tcc *)hw)->WEXCTRL.reg &= ~TCC_WEXCTRL_DTIEN1;
2933 TCC_CRITICAL_SECTION_LEAVE();
2934}
2935
2936static inline void hri_tcc_toggle_WEXCTRL_DTIEN1_bit(const void *const hw)
2937{
2938 TCC_CRITICAL_SECTION_ENTER();
2939 ((Tcc *)hw)->WEXCTRL.reg ^= TCC_WEXCTRL_DTIEN1;
2940 TCC_CRITICAL_SECTION_LEAVE();
2941}
2942
2943static inline void hri_tcc_set_WEXCTRL_DTIEN2_bit(const void *const hw)
2944{
2945 TCC_CRITICAL_SECTION_ENTER();
2946 ((Tcc *)hw)->WEXCTRL.reg |= TCC_WEXCTRL_DTIEN2;
2947 TCC_CRITICAL_SECTION_LEAVE();
2948}
2949
2950static inline bool hri_tcc_get_WEXCTRL_DTIEN2_bit(const void *const hw)
2951{
2952 uint32_t tmp;
2953 tmp = ((Tcc *)hw)->WEXCTRL.reg;
2954 tmp = (tmp & TCC_WEXCTRL_DTIEN2) >> TCC_WEXCTRL_DTIEN2_Pos;
2955 return (bool)tmp;
2956}
2957
2958static inline void hri_tcc_write_WEXCTRL_DTIEN2_bit(const void *const hw, bool value)
2959{
2960 uint32_t tmp;
2961 TCC_CRITICAL_SECTION_ENTER();
2962 tmp = ((Tcc *)hw)->WEXCTRL.reg;
2963 tmp &= ~TCC_WEXCTRL_DTIEN2;
2964 tmp |= value << TCC_WEXCTRL_DTIEN2_Pos;
2965 ((Tcc *)hw)->WEXCTRL.reg = tmp;
2966 TCC_CRITICAL_SECTION_LEAVE();
2967}
2968
2969static inline void hri_tcc_clear_WEXCTRL_DTIEN2_bit(const void *const hw)
2970{
2971 TCC_CRITICAL_SECTION_ENTER();
2972 ((Tcc *)hw)->WEXCTRL.reg &= ~TCC_WEXCTRL_DTIEN2;
2973 TCC_CRITICAL_SECTION_LEAVE();
2974}
2975
2976static inline void hri_tcc_toggle_WEXCTRL_DTIEN2_bit(const void *const hw)
2977{
2978 TCC_CRITICAL_SECTION_ENTER();
2979 ((Tcc *)hw)->WEXCTRL.reg ^= TCC_WEXCTRL_DTIEN2;
2980 TCC_CRITICAL_SECTION_LEAVE();
2981}
2982
2983static inline void hri_tcc_set_WEXCTRL_DTIEN3_bit(const void *const hw)
2984{
2985 TCC_CRITICAL_SECTION_ENTER();
2986 ((Tcc *)hw)->WEXCTRL.reg |= TCC_WEXCTRL_DTIEN3;
2987 TCC_CRITICAL_SECTION_LEAVE();
2988}
2989
2990static inline bool hri_tcc_get_WEXCTRL_DTIEN3_bit(const void *const hw)
2991{
2992 uint32_t tmp;
2993 tmp = ((Tcc *)hw)->WEXCTRL.reg;
2994 tmp = (tmp & TCC_WEXCTRL_DTIEN3) >> TCC_WEXCTRL_DTIEN3_Pos;
2995 return (bool)tmp;
2996}
2997
2998static inline void hri_tcc_write_WEXCTRL_DTIEN3_bit(const void *const hw, bool value)
2999{
3000 uint32_t tmp;
3001 TCC_CRITICAL_SECTION_ENTER();
3002 tmp = ((Tcc *)hw)->WEXCTRL.reg;
3003 tmp &= ~TCC_WEXCTRL_DTIEN3;
3004 tmp |= value << TCC_WEXCTRL_DTIEN3_Pos;
3005 ((Tcc *)hw)->WEXCTRL.reg = tmp;
3006 TCC_CRITICAL_SECTION_LEAVE();
3007}
3008
3009static inline void hri_tcc_clear_WEXCTRL_DTIEN3_bit(const void *const hw)
3010{
3011 TCC_CRITICAL_SECTION_ENTER();
3012 ((Tcc *)hw)->WEXCTRL.reg &= ~TCC_WEXCTRL_DTIEN3;
3013 TCC_CRITICAL_SECTION_LEAVE();
3014}
3015
3016static inline void hri_tcc_toggle_WEXCTRL_DTIEN3_bit(const void *const hw)
3017{
3018 TCC_CRITICAL_SECTION_ENTER();
3019 ((Tcc *)hw)->WEXCTRL.reg ^= TCC_WEXCTRL_DTIEN3;
3020 TCC_CRITICAL_SECTION_LEAVE();
3021}
3022
3023static inline void hri_tcc_set_WEXCTRL_OTMX_bf(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3024{
3025 TCC_CRITICAL_SECTION_ENTER();
3026 ((Tcc *)hw)->WEXCTRL.reg |= TCC_WEXCTRL_OTMX(mask);
3027 TCC_CRITICAL_SECTION_LEAVE();
3028}
3029
3030static inline hri_tcc_wexctrl_reg_t hri_tcc_get_WEXCTRL_OTMX_bf(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3031{
3032 uint32_t tmp;
3033 tmp = ((Tcc *)hw)->WEXCTRL.reg;
3034 tmp = (tmp & TCC_WEXCTRL_OTMX(mask)) >> TCC_WEXCTRL_OTMX_Pos;
3035 return tmp;
3036}
3037
3038static inline void hri_tcc_write_WEXCTRL_OTMX_bf(const void *const hw, hri_tcc_wexctrl_reg_t data)
3039{
3040 uint32_t tmp;
3041 TCC_CRITICAL_SECTION_ENTER();
3042 tmp = ((Tcc *)hw)->WEXCTRL.reg;
3043 tmp &= ~TCC_WEXCTRL_OTMX_Msk;
3044 tmp |= TCC_WEXCTRL_OTMX(data);
3045 ((Tcc *)hw)->WEXCTRL.reg = tmp;
3046 TCC_CRITICAL_SECTION_LEAVE();
3047}
3048
3049static inline void hri_tcc_clear_WEXCTRL_OTMX_bf(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3050{
3051 TCC_CRITICAL_SECTION_ENTER();
3052 ((Tcc *)hw)->WEXCTRL.reg &= ~TCC_WEXCTRL_OTMX(mask);
3053 TCC_CRITICAL_SECTION_LEAVE();
3054}
3055
3056static inline void hri_tcc_toggle_WEXCTRL_OTMX_bf(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3057{
3058 TCC_CRITICAL_SECTION_ENTER();
3059 ((Tcc *)hw)->WEXCTRL.reg ^= TCC_WEXCTRL_OTMX(mask);
3060 TCC_CRITICAL_SECTION_LEAVE();
3061}
3062
3063static inline hri_tcc_wexctrl_reg_t hri_tcc_read_WEXCTRL_OTMX_bf(const void *const hw)
3064{
3065 uint32_t tmp;
3066 tmp = ((Tcc *)hw)->WEXCTRL.reg;
3067 tmp = (tmp & TCC_WEXCTRL_OTMX_Msk) >> TCC_WEXCTRL_OTMX_Pos;
3068 return tmp;
3069}
3070
3071static inline void hri_tcc_set_WEXCTRL_DTLS_bf(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3072{
3073 TCC_CRITICAL_SECTION_ENTER();
3074 ((Tcc *)hw)->WEXCTRL.reg |= TCC_WEXCTRL_DTLS(mask);
3075 TCC_CRITICAL_SECTION_LEAVE();
3076}
3077
3078static inline hri_tcc_wexctrl_reg_t hri_tcc_get_WEXCTRL_DTLS_bf(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3079{
3080 uint32_t tmp;
3081 tmp = ((Tcc *)hw)->WEXCTRL.reg;
3082 tmp = (tmp & TCC_WEXCTRL_DTLS(mask)) >> TCC_WEXCTRL_DTLS_Pos;
3083 return tmp;
3084}
3085
3086static inline void hri_tcc_write_WEXCTRL_DTLS_bf(const void *const hw, hri_tcc_wexctrl_reg_t data)
3087{
3088 uint32_t tmp;
3089 TCC_CRITICAL_SECTION_ENTER();
3090 tmp = ((Tcc *)hw)->WEXCTRL.reg;
3091 tmp &= ~TCC_WEXCTRL_DTLS_Msk;
3092 tmp |= TCC_WEXCTRL_DTLS(data);
3093 ((Tcc *)hw)->WEXCTRL.reg = tmp;
3094 TCC_CRITICAL_SECTION_LEAVE();
3095}
3096
3097static inline void hri_tcc_clear_WEXCTRL_DTLS_bf(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3098{
3099 TCC_CRITICAL_SECTION_ENTER();
3100 ((Tcc *)hw)->WEXCTRL.reg &= ~TCC_WEXCTRL_DTLS(mask);
3101 TCC_CRITICAL_SECTION_LEAVE();
3102}
3103
3104static inline void hri_tcc_toggle_WEXCTRL_DTLS_bf(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3105{
3106 TCC_CRITICAL_SECTION_ENTER();
3107 ((Tcc *)hw)->WEXCTRL.reg ^= TCC_WEXCTRL_DTLS(mask);
3108 TCC_CRITICAL_SECTION_LEAVE();
3109}
3110
3111static inline hri_tcc_wexctrl_reg_t hri_tcc_read_WEXCTRL_DTLS_bf(const void *const hw)
3112{
3113 uint32_t tmp;
3114 tmp = ((Tcc *)hw)->WEXCTRL.reg;
3115 tmp = (tmp & TCC_WEXCTRL_DTLS_Msk) >> TCC_WEXCTRL_DTLS_Pos;
3116 return tmp;
3117}
3118
3119static inline void hri_tcc_set_WEXCTRL_DTHS_bf(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3120{
3121 TCC_CRITICAL_SECTION_ENTER();
3122 ((Tcc *)hw)->WEXCTRL.reg |= TCC_WEXCTRL_DTHS(mask);
3123 TCC_CRITICAL_SECTION_LEAVE();
3124}
3125
3126static inline hri_tcc_wexctrl_reg_t hri_tcc_get_WEXCTRL_DTHS_bf(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3127{
3128 uint32_t tmp;
3129 tmp = ((Tcc *)hw)->WEXCTRL.reg;
3130 tmp = (tmp & TCC_WEXCTRL_DTHS(mask)) >> TCC_WEXCTRL_DTHS_Pos;
3131 return tmp;
3132}
3133
3134static inline void hri_tcc_write_WEXCTRL_DTHS_bf(const void *const hw, hri_tcc_wexctrl_reg_t data)
3135{
3136 uint32_t tmp;
3137 TCC_CRITICAL_SECTION_ENTER();
3138 tmp = ((Tcc *)hw)->WEXCTRL.reg;
3139 tmp &= ~TCC_WEXCTRL_DTHS_Msk;
3140 tmp |= TCC_WEXCTRL_DTHS(data);
3141 ((Tcc *)hw)->WEXCTRL.reg = tmp;
3142 TCC_CRITICAL_SECTION_LEAVE();
3143}
3144
3145static inline void hri_tcc_clear_WEXCTRL_DTHS_bf(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3146{
3147 TCC_CRITICAL_SECTION_ENTER();
3148 ((Tcc *)hw)->WEXCTRL.reg &= ~TCC_WEXCTRL_DTHS(mask);
3149 TCC_CRITICAL_SECTION_LEAVE();
3150}
3151
3152static inline void hri_tcc_toggle_WEXCTRL_DTHS_bf(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3153{
3154 TCC_CRITICAL_SECTION_ENTER();
3155 ((Tcc *)hw)->WEXCTRL.reg ^= TCC_WEXCTRL_DTHS(mask);
3156 TCC_CRITICAL_SECTION_LEAVE();
3157}
3158
3159static inline hri_tcc_wexctrl_reg_t hri_tcc_read_WEXCTRL_DTHS_bf(const void *const hw)
3160{
3161 uint32_t tmp;
3162 tmp = ((Tcc *)hw)->WEXCTRL.reg;
3163 tmp = (tmp & TCC_WEXCTRL_DTHS_Msk) >> TCC_WEXCTRL_DTHS_Pos;
3164 return tmp;
3165}
3166
3167static inline void hri_tcc_set_WEXCTRL_reg(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3168{
3169 TCC_CRITICAL_SECTION_ENTER();
3170 ((Tcc *)hw)->WEXCTRL.reg |= mask;
3171 TCC_CRITICAL_SECTION_LEAVE();
3172}
3173
3174static inline hri_tcc_wexctrl_reg_t hri_tcc_get_WEXCTRL_reg(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3175{
3176 uint32_t tmp;
3177 tmp = ((Tcc *)hw)->WEXCTRL.reg;
3178 tmp &= mask;
3179 return tmp;
3180}
3181
3182static inline void hri_tcc_write_WEXCTRL_reg(const void *const hw, hri_tcc_wexctrl_reg_t data)
3183{
3184 TCC_CRITICAL_SECTION_ENTER();
3185 ((Tcc *)hw)->WEXCTRL.reg = data;
3186 TCC_CRITICAL_SECTION_LEAVE();
3187}
3188
3189static inline void hri_tcc_clear_WEXCTRL_reg(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3190{
3191 TCC_CRITICAL_SECTION_ENTER();
3192 ((Tcc *)hw)->WEXCTRL.reg &= ~mask;
3193 TCC_CRITICAL_SECTION_LEAVE();
3194}
3195
3196static inline void hri_tcc_toggle_WEXCTRL_reg(const void *const hw, hri_tcc_wexctrl_reg_t mask)
3197{
3198 TCC_CRITICAL_SECTION_ENTER();
3199 ((Tcc *)hw)->WEXCTRL.reg ^= mask;
3200 TCC_CRITICAL_SECTION_LEAVE();
3201}
3202
3203static inline hri_tcc_wexctrl_reg_t hri_tcc_read_WEXCTRL_reg(const void *const hw)
3204{
3205 return ((Tcc *)hw)->WEXCTRL.reg;
3206}
3207
3208static inline void hri_tcc_set_DRVCTRL_NRE0_bit(const void *const hw)
3209{
3210 TCC_CRITICAL_SECTION_ENTER();
3211 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRE0;
3212 TCC_CRITICAL_SECTION_LEAVE();
3213}
3214
3215static inline bool hri_tcc_get_DRVCTRL_NRE0_bit(const void *const hw)
3216{
3217 uint32_t tmp;
3218 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3219 tmp = (tmp & TCC_DRVCTRL_NRE0) >> TCC_DRVCTRL_NRE0_Pos;
3220 return (bool)tmp;
3221}
3222
3223static inline void hri_tcc_write_DRVCTRL_NRE0_bit(const void *const hw, bool value)
3224{
3225 uint32_t tmp;
3226 TCC_CRITICAL_SECTION_ENTER();
3227 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3228 tmp &= ~TCC_DRVCTRL_NRE0;
3229 tmp |= value << TCC_DRVCTRL_NRE0_Pos;
3230 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3231 TCC_CRITICAL_SECTION_LEAVE();
3232}
3233
3234static inline void hri_tcc_clear_DRVCTRL_NRE0_bit(const void *const hw)
3235{
3236 TCC_CRITICAL_SECTION_ENTER();
3237 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRE0;
3238 TCC_CRITICAL_SECTION_LEAVE();
3239}
3240
3241static inline void hri_tcc_toggle_DRVCTRL_NRE0_bit(const void *const hw)
3242{
3243 TCC_CRITICAL_SECTION_ENTER();
3244 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRE0;
3245 TCC_CRITICAL_SECTION_LEAVE();
3246}
3247
3248static inline void hri_tcc_set_DRVCTRL_NRE1_bit(const void *const hw)
3249{
3250 TCC_CRITICAL_SECTION_ENTER();
3251 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRE1;
3252 TCC_CRITICAL_SECTION_LEAVE();
3253}
3254
3255static inline bool hri_tcc_get_DRVCTRL_NRE1_bit(const void *const hw)
3256{
3257 uint32_t tmp;
3258 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3259 tmp = (tmp & TCC_DRVCTRL_NRE1) >> TCC_DRVCTRL_NRE1_Pos;
3260 return (bool)tmp;
3261}
3262
3263static inline void hri_tcc_write_DRVCTRL_NRE1_bit(const void *const hw, bool value)
3264{
3265 uint32_t tmp;
3266 TCC_CRITICAL_SECTION_ENTER();
3267 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3268 tmp &= ~TCC_DRVCTRL_NRE1;
3269 tmp |= value << TCC_DRVCTRL_NRE1_Pos;
3270 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3271 TCC_CRITICAL_SECTION_LEAVE();
3272}
3273
3274static inline void hri_tcc_clear_DRVCTRL_NRE1_bit(const void *const hw)
3275{
3276 TCC_CRITICAL_SECTION_ENTER();
3277 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRE1;
3278 TCC_CRITICAL_SECTION_LEAVE();
3279}
3280
3281static inline void hri_tcc_toggle_DRVCTRL_NRE1_bit(const void *const hw)
3282{
3283 TCC_CRITICAL_SECTION_ENTER();
3284 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRE1;
3285 TCC_CRITICAL_SECTION_LEAVE();
3286}
3287
3288static inline void hri_tcc_set_DRVCTRL_NRE2_bit(const void *const hw)
3289{
3290 TCC_CRITICAL_SECTION_ENTER();
3291 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRE2;
3292 TCC_CRITICAL_SECTION_LEAVE();
3293}
3294
3295static inline bool hri_tcc_get_DRVCTRL_NRE2_bit(const void *const hw)
3296{
3297 uint32_t tmp;
3298 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3299 tmp = (tmp & TCC_DRVCTRL_NRE2) >> TCC_DRVCTRL_NRE2_Pos;
3300 return (bool)tmp;
3301}
3302
3303static inline void hri_tcc_write_DRVCTRL_NRE2_bit(const void *const hw, bool value)
3304{
3305 uint32_t tmp;
3306 TCC_CRITICAL_SECTION_ENTER();
3307 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3308 tmp &= ~TCC_DRVCTRL_NRE2;
3309 tmp |= value << TCC_DRVCTRL_NRE2_Pos;
3310 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3311 TCC_CRITICAL_SECTION_LEAVE();
3312}
3313
3314static inline void hri_tcc_clear_DRVCTRL_NRE2_bit(const void *const hw)
3315{
3316 TCC_CRITICAL_SECTION_ENTER();
3317 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRE2;
3318 TCC_CRITICAL_SECTION_LEAVE();
3319}
3320
3321static inline void hri_tcc_toggle_DRVCTRL_NRE2_bit(const void *const hw)
3322{
3323 TCC_CRITICAL_SECTION_ENTER();
3324 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRE2;
3325 TCC_CRITICAL_SECTION_LEAVE();
3326}
3327
3328static inline void hri_tcc_set_DRVCTRL_NRE3_bit(const void *const hw)
3329{
3330 TCC_CRITICAL_SECTION_ENTER();
3331 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRE3;
3332 TCC_CRITICAL_SECTION_LEAVE();
3333}
3334
3335static inline bool hri_tcc_get_DRVCTRL_NRE3_bit(const void *const hw)
3336{
3337 uint32_t tmp;
3338 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3339 tmp = (tmp & TCC_DRVCTRL_NRE3) >> TCC_DRVCTRL_NRE3_Pos;
3340 return (bool)tmp;
3341}
3342
3343static inline void hri_tcc_write_DRVCTRL_NRE3_bit(const void *const hw, bool value)
3344{
3345 uint32_t tmp;
3346 TCC_CRITICAL_SECTION_ENTER();
3347 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3348 tmp &= ~TCC_DRVCTRL_NRE3;
3349 tmp |= value << TCC_DRVCTRL_NRE3_Pos;
3350 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3351 TCC_CRITICAL_SECTION_LEAVE();
3352}
3353
3354static inline void hri_tcc_clear_DRVCTRL_NRE3_bit(const void *const hw)
3355{
3356 TCC_CRITICAL_SECTION_ENTER();
3357 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRE3;
3358 TCC_CRITICAL_SECTION_LEAVE();
3359}
3360
3361static inline void hri_tcc_toggle_DRVCTRL_NRE3_bit(const void *const hw)
3362{
3363 TCC_CRITICAL_SECTION_ENTER();
3364 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRE3;
3365 TCC_CRITICAL_SECTION_LEAVE();
3366}
3367
3368static inline void hri_tcc_set_DRVCTRL_NRE4_bit(const void *const hw)
3369{
3370 TCC_CRITICAL_SECTION_ENTER();
3371 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRE4;
3372 TCC_CRITICAL_SECTION_LEAVE();
3373}
3374
3375static inline bool hri_tcc_get_DRVCTRL_NRE4_bit(const void *const hw)
3376{
3377 uint32_t tmp;
3378 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3379 tmp = (tmp & TCC_DRVCTRL_NRE4) >> TCC_DRVCTRL_NRE4_Pos;
3380 return (bool)tmp;
3381}
3382
3383static inline void hri_tcc_write_DRVCTRL_NRE4_bit(const void *const hw, bool value)
3384{
3385 uint32_t tmp;
3386 TCC_CRITICAL_SECTION_ENTER();
3387 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3388 tmp &= ~TCC_DRVCTRL_NRE4;
3389 tmp |= value << TCC_DRVCTRL_NRE4_Pos;
3390 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3391 TCC_CRITICAL_SECTION_LEAVE();
3392}
3393
3394static inline void hri_tcc_clear_DRVCTRL_NRE4_bit(const void *const hw)
3395{
3396 TCC_CRITICAL_SECTION_ENTER();
3397 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRE4;
3398 TCC_CRITICAL_SECTION_LEAVE();
3399}
3400
3401static inline void hri_tcc_toggle_DRVCTRL_NRE4_bit(const void *const hw)
3402{
3403 TCC_CRITICAL_SECTION_ENTER();
3404 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRE4;
3405 TCC_CRITICAL_SECTION_LEAVE();
3406}
3407
3408static inline void hri_tcc_set_DRVCTRL_NRE5_bit(const void *const hw)
3409{
3410 TCC_CRITICAL_SECTION_ENTER();
3411 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRE5;
3412 TCC_CRITICAL_SECTION_LEAVE();
3413}
3414
3415static inline bool hri_tcc_get_DRVCTRL_NRE5_bit(const void *const hw)
3416{
3417 uint32_t tmp;
3418 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3419 tmp = (tmp & TCC_DRVCTRL_NRE5) >> TCC_DRVCTRL_NRE5_Pos;
3420 return (bool)tmp;
3421}
3422
3423static inline void hri_tcc_write_DRVCTRL_NRE5_bit(const void *const hw, bool value)
3424{
3425 uint32_t tmp;
3426 TCC_CRITICAL_SECTION_ENTER();
3427 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3428 tmp &= ~TCC_DRVCTRL_NRE5;
3429 tmp |= value << TCC_DRVCTRL_NRE5_Pos;
3430 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3431 TCC_CRITICAL_SECTION_LEAVE();
3432}
3433
3434static inline void hri_tcc_clear_DRVCTRL_NRE5_bit(const void *const hw)
3435{
3436 TCC_CRITICAL_SECTION_ENTER();
3437 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRE5;
3438 TCC_CRITICAL_SECTION_LEAVE();
3439}
3440
3441static inline void hri_tcc_toggle_DRVCTRL_NRE5_bit(const void *const hw)
3442{
3443 TCC_CRITICAL_SECTION_ENTER();
3444 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRE5;
3445 TCC_CRITICAL_SECTION_LEAVE();
3446}
3447
3448static inline void hri_tcc_set_DRVCTRL_NRE6_bit(const void *const hw)
3449{
3450 TCC_CRITICAL_SECTION_ENTER();
3451 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRE6;
3452 TCC_CRITICAL_SECTION_LEAVE();
3453}
3454
3455static inline bool hri_tcc_get_DRVCTRL_NRE6_bit(const void *const hw)
3456{
3457 uint32_t tmp;
3458 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3459 tmp = (tmp & TCC_DRVCTRL_NRE6) >> TCC_DRVCTRL_NRE6_Pos;
3460 return (bool)tmp;
3461}
3462
3463static inline void hri_tcc_write_DRVCTRL_NRE6_bit(const void *const hw, bool value)
3464{
3465 uint32_t tmp;
3466 TCC_CRITICAL_SECTION_ENTER();
3467 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3468 tmp &= ~TCC_DRVCTRL_NRE6;
3469 tmp |= value << TCC_DRVCTRL_NRE6_Pos;
3470 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3471 TCC_CRITICAL_SECTION_LEAVE();
3472}
3473
3474static inline void hri_tcc_clear_DRVCTRL_NRE6_bit(const void *const hw)
3475{
3476 TCC_CRITICAL_SECTION_ENTER();
3477 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRE6;
3478 TCC_CRITICAL_SECTION_LEAVE();
3479}
3480
3481static inline void hri_tcc_toggle_DRVCTRL_NRE6_bit(const void *const hw)
3482{
3483 TCC_CRITICAL_SECTION_ENTER();
3484 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRE6;
3485 TCC_CRITICAL_SECTION_LEAVE();
3486}
3487
3488static inline void hri_tcc_set_DRVCTRL_NRE7_bit(const void *const hw)
3489{
3490 TCC_CRITICAL_SECTION_ENTER();
3491 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRE7;
3492 TCC_CRITICAL_SECTION_LEAVE();
3493}
3494
3495static inline bool hri_tcc_get_DRVCTRL_NRE7_bit(const void *const hw)
3496{
3497 uint32_t tmp;
3498 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3499 tmp = (tmp & TCC_DRVCTRL_NRE7) >> TCC_DRVCTRL_NRE7_Pos;
3500 return (bool)tmp;
3501}
3502
3503static inline void hri_tcc_write_DRVCTRL_NRE7_bit(const void *const hw, bool value)
3504{
3505 uint32_t tmp;
3506 TCC_CRITICAL_SECTION_ENTER();
3507 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3508 tmp &= ~TCC_DRVCTRL_NRE7;
3509 tmp |= value << TCC_DRVCTRL_NRE7_Pos;
3510 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3511 TCC_CRITICAL_SECTION_LEAVE();
3512}
3513
3514static inline void hri_tcc_clear_DRVCTRL_NRE7_bit(const void *const hw)
3515{
3516 TCC_CRITICAL_SECTION_ENTER();
3517 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRE7;
3518 TCC_CRITICAL_SECTION_LEAVE();
3519}
3520
3521static inline void hri_tcc_toggle_DRVCTRL_NRE7_bit(const void *const hw)
3522{
3523 TCC_CRITICAL_SECTION_ENTER();
3524 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRE7;
3525 TCC_CRITICAL_SECTION_LEAVE();
3526}
3527
3528static inline void hri_tcc_set_DRVCTRL_NRV0_bit(const void *const hw)
3529{
3530 TCC_CRITICAL_SECTION_ENTER();
3531 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRV0;
3532 TCC_CRITICAL_SECTION_LEAVE();
3533}
3534
3535static inline bool hri_tcc_get_DRVCTRL_NRV0_bit(const void *const hw)
3536{
3537 uint32_t tmp;
3538 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3539 tmp = (tmp & TCC_DRVCTRL_NRV0) >> TCC_DRVCTRL_NRV0_Pos;
3540 return (bool)tmp;
3541}
3542
3543static inline void hri_tcc_write_DRVCTRL_NRV0_bit(const void *const hw, bool value)
3544{
3545 uint32_t tmp;
3546 TCC_CRITICAL_SECTION_ENTER();
3547 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3548 tmp &= ~TCC_DRVCTRL_NRV0;
3549 tmp |= value << TCC_DRVCTRL_NRV0_Pos;
3550 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3551 TCC_CRITICAL_SECTION_LEAVE();
3552}
3553
3554static inline void hri_tcc_clear_DRVCTRL_NRV0_bit(const void *const hw)
3555{
3556 TCC_CRITICAL_SECTION_ENTER();
3557 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRV0;
3558 TCC_CRITICAL_SECTION_LEAVE();
3559}
3560
3561static inline void hri_tcc_toggle_DRVCTRL_NRV0_bit(const void *const hw)
3562{
3563 TCC_CRITICAL_SECTION_ENTER();
3564 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRV0;
3565 TCC_CRITICAL_SECTION_LEAVE();
3566}
3567
3568static inline void hri_tcc_set_DRVCTRL_NRV1_bit(const void *const hw)
3569{
3570 TCC_CRITICAL_SECTION_ENTER();
3571 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRV1;
3572 TCC_CRITICAL_SECTION_LEAVE();
3573}
3574
3575static inline bool hri_tcc_get_DRVCTRL_NRV1_bit(const void *const hw)
3576{
3577 uint32_t tmp;
3578 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3579 tmp = (tmp & TCC_DRVCTRL_NRV1) >> TCC_DRVCTRL_NRV1_Pos;
3580 return (bool)tmp;
3581}
3582
3583static inline void hri_tcc_write_DRVCTRL_NRV1_bit(const void *const hw, bool value)
3584{
3585 uint32_t tmp;
3586 TCC_CRITICAL_SECTION_ENTER();
3587 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3588 tmp &= ~TCC_DRVCTRL_NRV1;
3589 tmp |= value << TCC_DRVCTRL_NRV1_Pos;
3590 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3591 TCC_CRITICAL_SECTION_LEAVE();
3592}
3593
3594static inline void hri_tcc_clear_DRVCTRL_NRV1_bit(const void *const hw)
3595{
3596 TCC_CRITICAL_SECTION_ENTER();
3597 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRV1;
3598 TCC_CRITICAL_SECTION_LEAVE();
3599}
3600
3601static inline void hri_tcc_toggle_DRVCTRL_NRV1_bit(const void *const hw)
3602{
3603 TCC_CRITICAL_SECTION_ENTER();
3604 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRV1;
3605 TCC_CRITICAL_SECTION_LEAVE();
3606}
3607
3608static inline void hri_tcc_set_DRVCTRL_NRV2_bit(const void *const hw)
3609{
3610 TCC_CRITICAL_SECTION_ENTER();
3611 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRV2;
3612 TCC_CRITICAL_SECTION_LEAVE();
3613}
3614
3615static inline bool hri_tcc_get_DRVCTRL_NRV2_bit(const void *const hw)
3616{
3617 uint32_t tmp;
3618 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3619 tmp = (tmp & TCC_DRVCTRL_NRV2) >> TCC_DRVCTRL_NRV2_Pos;
3620 return (bool)tmp;
3621}
3622
3623static inline void hri_tcc_write_DRVCTRL_NRV2_bit(const void *const hw, bool value)
3624{
3625 uint32_t tmp;
3626 TCC_CRITICAL_SECTION_ENTER();
3627 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3628 tmp &= ~TCC_DRVCTRL_NRV2;
3629 tmp |= value << TCC_DRVCTRL_NRV2_Pos;
3630 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3631 TCC_CRITICAL_SECTION_LEAVE();
3632}
3633
3634static inline void hri_tcc_clear_DRVCTRL_NRV2_bit(const void *const hw)
3635{
3636 TCC_CRITICAL_SECTION_ENTER();
3637 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRV2;
3638 TCC_CRITICAL_SECTION_LEAVE();
3639}
3640
3641static inline void hri_tcc_toggle_DRVCTRL_NRV2_bit(const void *const hw)
3642{
3643 TCC_CRITICAL_SECTION_ENTER();
3644 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRV2;
3645 TCC_CRITICAL_SECTION_LEAVE();
3646}
3647
3648static inline void hri_tcc_set_DRVCTRL_NRV3_bit(const void *const hw)
3649{
3650 TCC_CRITICAL_SECTION_ENTER();
3651 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRV3;
3652 TCC_CRITICAL_SECTION_LEAVE();
3653}
3654
3655static inline bool hri_tcc_get_DRVCTRL_NRV3_bit(const void *const hw)
3656{
3657 uint32_t tmp;
3658 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3659 tmp = (tmp & TCC_DRVCTRL_NRV3) >> TCC_DRVCTRL_NRV3_Pos;
3660 return (bool)tmp;
3661}
3662
3663static inline void hri_tcc_write_DRVCTRL_NRV3_bit(const void *const hw, bool value)
3664{
3665 uint32_t tmp;
3666 TCC_CRITICAL_SECTION_ENTER();
3667 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3668 tmp &= ~TCC_DRVCTRL_NRV3;
3669 tmp |= value << TCC_DRVCTRL_NRV3_Pos;
3670 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3671 TCC_CRITICAL_SECTION_LEAVE();
3672}
3673
3674static inline void hri_tcc_clear_DRVCTRL_NRV3_bit(const void *const hw)
3675{
3676 TCC_CRITICAL_SECTION_ENTER();
3677 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRV3;
3678 TCC_CRITICAL_SECTION_LEAVE();
3679}
3680
3681static inline void hri_tcc_toggle_DRVCTRL_NRV3_bit(const void *const hw)
3682{
3683 TCC_CRITICAL_SECTION_ENTER();
3684 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRV3;
3685 TCC_CRITICAL_SECTION_LEAVE();
3686}
3687
3688static inline void hri_tcc_set_DRVCTRL_NRV4_bit(const void *const hw)
3689{
3690 TCC_CRITICAL_SECTION_ENTER();
3691 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRV4;
3692 TCC_CRITICAL_SECTION_LEAVE();
3693}
3694
3695static inline bool hri_tcc_get_DRVCTRL_NRV4_bit(const void *const hw)
3696{
3697 uint32_t tmp;
3698 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3699 tmp = (tmp & TCC_DRVCTRL_NRV4) >> TCC_DRVCTRL_NRV4_Pos;
3700 return (bool)tmp;
3701}
3702
3703static inline void hri_tcc_write_DRVCTRL_NRV4_bit(const void *const hw, bool value)
3704{
3705 uint32_t tmp;
3706 TCC_CRITICAL_SECTION_ENTER();
3707 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3708 tmp &= ~TCC_DRVCTRL_NRV4;
3709 tmp |= value << TCC_DRVCTRL_NRV4_Pos;
3710 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3711 TCC_CRITICAL_SECTION_LEAVE();
3712}
3713
3714static inline void hri_tcc_clear_DRVCTRL_NRV4_bit(const void *const hw)
3715{
3716 TCC_CRITICAL_SECTION_ENTER();
3717 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRV4;
3718 TCC_CRITICAL_SECTION_LEAVE();
3719}
3720
3721static inline void hri_tcc_toggle_DRVCTRL_NRV4_bit(const void *const hw)
3722{
3723 TCC_CRITICAL_SECTION_ENTER();
3724 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRV4;
3725 TCC_CRITICAL_SECTION_LEAVE();
3726}
3727
3728static inline void hri_tcc_set_DRVCTRL_NRV5_bit(const void *const hw)
3729{
3730 TCC_CRITICAL_SECTION_ENTER();
3731 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRV5;
3732 TCC_CRITICAL_SECTION_LEAVE();
3733}
3734
3735static inline bool hri_tcc_get_DRVCTRL_NRV5_bit(const void *const hw)
3736{
3737 uint32_t tmp;
3738 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3739 tmp = (tmp & TCC_DRVCTRL_NRV5) >> TCC_DRVCTRL_NRV5_Pos;
3740 return (bool)tmp;
3741}
3742
3743static inline void hri_tcc_write_DRVCTRL_NRV5_bit(const void *const hw, bool value)
3744{
3745 uint32_t tmp;
3746 TCC_CRITICAL_SECTION_ENTER();
3747 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3748 tmp &= ~TCC_DRVCTRL_NRV5;
3749 tmp |= value << TCC_DRVCTRL_NRV5_Pos;
3750 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3751 TCC_CRITICAL_SECTION_LEAVE();
3752}
3753
3754static inline void hri_tcc_clear_DRVCTRL_NRV5_bit(const void *const hw)
3755{
3756 TCC_CRITICAL_SECTION_ENTER();
3757 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRV5;
3758 TCC_CRITICAL_SECTION_LEAVE();
3759}
3760
3761static inline void hri_tcc_toggle_DRVCTRL_NRV5_bit(const void *const hw)
3762{
3763 TCC_CRITICAL_SECTION_ENTER();
3764 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRV5;
3765 TCC_CRITICAL_SECTION_LEAVE();
3766}
3767
3768static inline void hri_tcc_set_DRVCTRL_NRV6_bit(const void *const hw)
3769{
3770 TCC_CRITICAL_SECTION_ENTER();
3771 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRV6;
3772 TCC_CRITICAL_SECTION_LEAVE();
3773}
3774
3775static inline bool hri_tcc_get_DRVCTRL_NRV6_bit(const void *const hw)
3776{
3777 uint32_t tmp;
3778 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3779 tmp = (tmp & TCC_DRVCTRL_NRV6) >> TCC_DRVCTRL_NRV6_Pos;
3780 return (bool)tmp;
3781}
3782
3783static inline void hri_tcc_write_DRVCTRL_NRV6_bit(const void *const hw, bool value)
3784{
3785 uint32_t tmp;
3786 TCC_CRITICAL_SECTION_ENTER();
3787 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3788 tmp &= ~TCC_DRVCTRL_NRV6;
3789 tmp |= value << TCC_DRVCTRL_NRV6_Pos;
3790 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3791 TCC_CRITICAL_SECTION_LEAVE();
3792}
3793
3794static inline void hri_tcc_clear_DRVCTRL_NRV6_bit(const void *const hw)
3795{
3796 TCC_CRITICAL_SECTION_ENTER();
3797 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRV6;
3798 TCC_CRITICAL_SECTION_LEAVE();
3799}
3800
3801static inline void hri_tcc_toggle_DRVCTRL_NRV6_bit(const void *const hw)
3802{
3803 TCC_CRITICAL_SECTION_ENTER();
3804 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRV6;
3805 TCC_CRITICAL_SECTION_LEAVE();
3806}
3807
3808static inline void hri_tcc_set_DRVCTRL_NRV7_bit(const void *const hw)
3809{
3810 TCC_CRITICAL_SECTION_ENTER();
3811 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_NRV7;
3812 TCC_CRITICAL_SECTION_LEAVE();
3813}
3814
3815static inline bool hri_tcc_get_DRVCTRL_NRV7_bit(const void *const hw)
3816{
3817 uint32_t tmp;
3818 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3819 tmp = (tmp & TCC_DRVCTRL_NRV7) >> TCC_DRVCTRL_NRV7_Pos;
3820 return (bool)tmp;
3821}
3822
3823static inline void hri_tcc_write_DRVCTRL_NRV7_bit(const void *const hw, bool value)
3824{
3825 uint32_t tmp;
3826 TCC_CRITICAL_SECTION_ENTER();
3827 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3828 tmp &= ~TCC_DRVCTRL_NRV7;
3829 tmp |= value << TCC_DRVCTRL_NRV7_Pos;
3830 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3831 TCC_CRITICAL_SECTION_LEAVE();
3832}
3833
3834static inline void hri_tcc_clear_DRVCTRL_NRV7_bit(const void *const hw)
3835{
3836 TCC_CRITICAL_SECTION_ENTER();
3837 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_NRV7;
3838 TCC_CRITICAL_SECTION_LEAVE();
3839}
3840
3841static inline void hri_tcc_toggle_DRVCTRL_NRV7_bit(const void *const hw)
3842{
3843 TCC_CRITICAL_SECTION_ENTER();
3844 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_NRV7;
3845 TCC_CRITICAL_SECTION_LEAVE();
3846}
3847
3848static inline void hri_tcc_set_DRVCTRL_INVEN0_bit(const void *const hw)
3849{
3850 TCC_CRITICAL_SECTION_ENTER();
3851 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_INVEN0;
3852 TCC_CRITICAL_SECTION_LEAVE();
3853}
3854
3855static inline bool hri_tcc_get_DRVCTRL_INVEN0_bit(const void *const hw)
3856{
3857 uint32_t tmp;
3858 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3859 tmp = (tmp & TCC_DRVCTRL_INVEN0) >> TCC_DRVCTRL_INVEN0_Pos;
3860 return (bool)tmp;
3861}
3862
3863static inline void hri_tcc_write_DRVCTRL_INVEN0_bit(const void *const hw, bool value)
3864{
3865 uint32_t tmp;
3866 TCC_CRITICAL_SECTION_ENTER();
3867 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3868 tmp &= ~TCC_DRVCTRL_INVEN0;
3869 tmp |= value << TCC_DRVCTRL_INVEN0_Pos;
3870 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3871 TCC_CRITICAL_SECTION_LEAVE();
3872}
3873
3874static inline void hri_tcc_clear_DRVCTRL_INVEN0_bit(const void *const hw)
3875{
3876 TCC_CRITICAL_SECTION_ENTER();
3877 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_INVEN0;
3878 TCC_CRITICAL_SECTION_LEAVE();
3879}
3880
3881static inline void hri_tcc_toggle_DRVCTRL_INVEN0_bit(const void *const hw)
3882{
3883 TCC_CRITICAL_SECTION_ENTER();
3884 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_INVEN0;
3885 TCC_CRITICAL_SECTION_LEAVE();
3886}
3887
3888static inline void hri_tcc_set_DRVCTRL_INVEN1_bit(const void *const hw)
3889{
3890 TCC_CRITICAL_SECTION_ENTER();
3891 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_INVEN1;
3892 TCC_CRITICAL_SECTION_LEAVE();
3893}
3894
3895static inline bool hri_tcc_get_DRVCTRL_INVEN1_bit(const void *const hw)
3896{
3897 uint32_t tmp;
3898 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3899 tmp = (tmp & TCC_DRVCTRL_INVEN1) >> TCC_DRVCTRL_INVEN1_Pos;
3900 return (bool)tmp;
3901}
3902
3903static inline void hri_tcc_write_DRVCTRL_INVEN1_bit(const void *const hw, bool value)
3904{
3905 uint32_t tmp;
3906 TCC_CRITICAL_SECTION_ENTER();
3907 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3908 tmp &= ~TCC_DRVCTRL_INVEN1;
3909 tmp |= value << TCC_DRVCTRL_INVEN1_Pos;
3910 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3911 TCC_CRITICAL_SECTION_LEAVE();
3912}
3913
3914static inline void hri_tcc_clear_DRVCTRL_INVEN1_bit(const void *const hw)
3915{
3916 TCC_CRITICAL_SECTION_ENTER();
3917 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_INVEN1;
3918 TCC_CRITICAL_SECTION_LEAVE();
3919}
3920
3921static inline void hri_tcc_toggle_DRVCTRL_INVEN1_bit(const void *const hw)
3922{
3923 TCC_CRITICAL_SECTION_ENTER();
3924 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_INVEN1;
3925 TCC_CRITICAL_SECTION_LEAVE();
3926}
3927
3928static inline void hri_tcc_set_DRVCTRL_INVEN2_bit(const void *const hw)
3929{
3930 TCC_CRITICAL_SECTION_ENTER();
3931 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_INVEN2;
3932 TCC_CRITICAL_SECTION_LEAVE();
3933}
3934
3935static inline bool hri_tcc_get_DRVCTRL_INVEN2_bit(const void *const hw)
3936{
3937 uint32_t tmp;
3938 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3939 tmp = (tmp & TCC_DRVCTRL_INVEN2) >> TCC_DRVCTRL_INVEN2_Pos;
3940 return (bool)tmp;
3941}
3942
3943static inline void hri_tcc_write_DRVCTRL_INVEN2_bit(const void *const hw, bool value)
3944{
3945 uint32_t tmp;
3946 TCC_CRITICAL_SECTION_ENTER();
3947 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3948 tmp &= ~TCC_DRVCTRL_INVEN2;
3949 tmp |= value << TCC_DRVCTRL_INVEN2_Pos;
3950 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3951 TCC_CRITICAL_SECTION_LEAVE();
3952}
3953
3954static inline void hri_tcc_clear_DRVCTRL_INVEN2_bit(const void *const hw)
3955{
3956 TCC_CRITICAL_SECTION_ENTER();
3957 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_INVEN2;
3958 TCC_CRITICAL_SECTION_LEAVE();
3959}
3960
3961static inline void hri_tcc_toggle_DRVCTRL_INVEN2_bit(const void *const hw)
3962{
3963 TCC_CRITICAL_SECTION_ENTER();
3964 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_INVEN2;
3965 TCC_CRITICAL_SECTION_LEAVE();
3966}
3967
3968static inline void hri_tcc_set_DRVCTRL_INVEN3_bit(const void *const hw)
3969{
3970 TCC_CRITICAL_SECTION_ENTER();
3971 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_INVEN3;
3972 TCC_CRITICAL_SECTION_LEAVE();
3973}
3974
3975static inline bool hri_tcc_get_DRVCTRL_INVEN3_bit(const void *const hw)
3976{
3977 uint32_t tmp;
3978 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3979 tmp = (tmp & TCC_DRVCTRL_INVEN3) >> TCC_DRVCTRL_INVEN3_Pos;
3980 return (bool)tmp;
3981}
3982
3983static inline void hri_tcc_write_DRVCTRL_INVEN3_bit(const void *const hw, bool value)
3984{
3985 uint32_t tmp;
3986 TCC_CRITICAL_SECTION_ENTER();
3987 tmp = ((Tcc *)hw)->DRVCTRL.reg;
3988 tmp &= ~TCC_DRVCTRL_INVEN3;
3989 tmp |= value << TCC_DRVCTRL_INVEN3_Pos;
3990 ((Tcc *)hw)->DRVCTRL.reg = tmp;
3991 TCC_CRITICAL_SECTION_LEAVE();
3992}
3993
3994static inline void hri_tcc_clear_DRVCTRL_INVEN3_bit(const void *const hw)
3995{
3996 TCC_CRITICAL_SECTION_ENTER();
3997 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_INVEN3;
3998 TCC_CRITICAL_SECTION_LEAVE();
3999}
4000
4001static inline void hri_tcc_toggle_DRVCTRL_INVEN3_bit(const void *const hw)
4002{
4003 TCC_CRITICAL_SECTION_ENTER();
4004 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_INVEN3;
4005 TCC_CRITICAL_SECTION_LEAVE();
4006}
4007
4008static inline void hri_tcc_set_DRVCTRL_INVEN4_bit(const void *const hw)
4009{
4010 TCC_CRITICAL_SECTION_ENTER();
4011 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_INVEN4;
4012 TCC_CRITICAL_SECTION_LEAVE();
4013}
4014
4015static inline bool hri_tcc_get_DRVCTRL_INVEN4_bit(const void *const hw)
4016{
4017 uint32_t tmp;
4018 tmp = ((Tcc *)hw)->DRVCTRL.reg;
4019 tmp = (tmp & TCC_DRVCTRL_INVEN4) >> TCC_DRVCTRL_INVEN4_Pos;
4020 return (bool)tmp;
4021}
4022
4023static inline void hri_tcc_write_DRVCTRL_INVEN4_bit(const void *const hw, bool value)
4024{
4025 uint32_t tmp;
4026 TCC_CRITICAL_SECTION_ENTER();
4027 tmp = ((Tcc *)hw)->DRVCTRL.reg;
4028 tmp &= ~TCC_DRVCTRL_INVEN4;
4029 tmp |= value << TCC_DRVCTRL_INVEN4_Pos;
4030 ((Tcc *)hw)->DRVCTRL.reg = tmp;
4031 TCC_CRITICAL_SECTION_LEAVE();
4032}
4033
4034static inline void hri_tcc_clear_DRVCTRL_INVEN4_bit(const void *const hw)
4035{
4036 TCC_CRITICAL_SECTION_ENTER();
4037 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_INVEN4;
4038 TCC_CRITICAL_SECTION_LEAVE();
4039}
4040
4041static inline void hri_tcc_toggle_DRVCTRL_INVEN4_bit(const void *const hw)
4042{
4043 TCC_CRITICAL_SECTION_ENTER();
4044 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_INVEN4;
4045 TCC_CRITICAL_SECTION_LEAVE();
4046}
4047
4048static inline void hri_tcc_set_DRVCTRL_INVEN5_bit(const void *const hw)
4049{
4050 TCC_CRITICAL_SECTION_ENTER();
4051 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_INVEN5;
4052 TCC_CRITICAL_SECTION_LEAVE();
4053}
4054
4055static inline bool hri_tcc_get_DRVCTRL_INVEN5_bit(const void *const hw)
4056{
4057 uint32_t tmp;
4058 tmp = ((Tcc *)hw)->DRVCTRL.reg;
4059 tmp = (tmp & TCC_DRVCTRL_INVEN5) >> TCC_DRVCTRL_INVEN5_Pos;
4060 return (bool)tmp;
4061}
4062
4063static inline void hri_tcc_write_DRVCTRL_INVEN5_bit(const void *const hw, bool value)
4064{
4065 uint32_t tmp;
4066 TCC_CRITICAL_SECTION_ENTER();
4067 tmp = ((Tcc *)hw)->DRVCTRL.reg;
4068 tmp &= ~TCC_DRVCTRL_INVEN5;
4069 tmp |= value << TCC_DRVCTRL_INVEN5_Pos;
4070 ((Tcc *)hw)->DRVCTRL.reg = tmp;
4071 TCC_CRITICAL_SECTION_LEAVE();
4072}
4073
4074static inline void hri_tcc_clear_DRVCTRL_INVEN5_bit(const void *const hw)
4075{
4076 TCC_CRITICAL_SECTION_ENTER();
4077 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_INVEN5;
4078 TCC_CRITICAL_SECTION_LEAVE();
4079}
4080
4081static inline void hri_tcc_toggle_DRVCTRL_INVEN5_bit(const void *const hw)
4082{
4083 TCC_CRITICAL_SECTION_ENTER();
4084 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_INVEN5;
4085 TCC_CRITICAL_SECTION_LEAVE();
4086}
4087
4088static inline void hri_tcc_set_DRVCTRL_INVEN6_bit(const void *const hw)
4089{
4090 TCC_CRITICAL_SECTION_ENTER();
4091 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_INVEN6;
4092 TCC_CRITICAL_SECTION_LEAVE();
4093}
4094
4095static inline bool hri_tcc_get_DRVCTRL_INVEN6_bit(const void *const hw)
4096{
4097 uint32_t tmp;
4098 tmp = ((Tcc *)hw)->DRVCTRL.reg;
4099 tmp = (tmp & TCC_DRVCTRL_INVEN6) >> TCC_DRVCTRL_INVEN6_Pos;
4100 return (bool)tmp;
4101}
4102
4103static inline void hri_tcc_write_DRVCTRL_INVEN6_bit(const void *const hw, bool value)
4104{
4105 uint32_t tmp;
4106 TCC_CRITICAL_SECTION_ENTER();
4107 tmp = ((Tcc *)hw)->DRVCTRL.reg;
4108 tmp &= ~TCC_DRVCTRL_INVEN6;
4109 tmp |= value << TCC_DRVCTRL_INVEN6_Pos;
4110 ((Tcc *)hw)->DRVCTRL.reg = tmp;
4111 TCC_CRITICAL_SECTION_LEAVE();
4112}
4113
4114static inline void hri_tcc_clear_DRVCTRL_INVEN6_bit(const void *const hw)
4115{
4116 TCC_CRITICAL_SECTION_ENTER();
4117 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_INVEN6;
4118 TCC_CRITICAL_SECTION_LEAVE();
4119}
4120
4121static inline void hri_tcc_toggle_DRVCTRL_INVEN6_bit(const void *const hw)
4122{
4123 TCC_CRITICAL_SECTION_ENTER();
4124 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_INVEN6;
4125 TCC_CRITICAL_SECTION_LEAVE();
4126}
4127
4128static inline void hri_tcc_set_DRVCTRL_INVEN7_bit(const void *const hw)
4129{
4130 TCC_CRITICAL_SECTION_ENTER();
4131 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_INVEN7;
4132 TCC_CRITICAL_SECTION_LEAVE();
4133}
4134
4135static inline bool hri_tcc_get_DRVCTRL_INVEN7_bit(const void *const hw)
4136{
4137 uint32_t tmp;
4138 tmp = ((Tcc *)hw)->DRVCTRL.reg;
4139 tmp = (tmp & TCC_DRVCTRL_INVEN7) >> TCC_DRVCTRL_INVEN7_Pos;
4140 return (bool)tmp;
4141}
4142
4143static inline void hri_tcc_write_DRVCTRL_INVEN7_bit(const void *const hw, bool value)
4144{
4145 uint32_t tmp;
4146 TCC_CRITICAL_SECTION_ENTER();
4147 tmp = ((Tcc *)hw)->DRVCTRL.reg;
4148 tmp &= ~TCC_DRVCTRL_INVEN7;
4149 tmp |= value << TCC_DRVCTRL_INVEN7_Pos;
4150 ((Tcc *)hw)->DRVCTRL.reg = tmp;
4151 TCC_CRITICAL_SECTION_LEAVE();
4152}
4153
4154static inline void hri_tcc_clear_DRVCTRL_INVEN7_bit(const void *const hw)
4155{
4156 TCC_CRITICAL_SECTION_ENTER();
4157 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_INVEN7;
4158 TCC_CRITICAL_SECTION_LEAVE();
4159}
4160
4161static inline void hri_tcc_toggle_DRVCTRL_INVEN7_bit(const void *const hw)
4162{
4163 TCC_CRITICAL_SECTION_ENTER();
4164 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_INVEN7;
4165 TCC_CRITICAL_SECTION_LEAVE();
4166}
4167
4168static inline void hri_tcc_set_DRVCTRL_FILTERVAL0_bf(const void *const hw, hri_tcc_drvctrl_reg_t mask)
4169{
4170 TCC_CRITICAL_SECTION_ENTER();
4171 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_FILTERVAL0(mask);
4172 TCC_CRITICAL_SECTION_LEAVE();
4173}
4174
4175static inline hri_tcc_drvctrl_reg_t hri_tcc_get_DRVCTRL_FILTERVAL0_bf(const void *const hw, hri_tcc_drvctrl_reg_t mask)
4176{
4177 uint32_t tmp;
4178 tmp = ((Tcc *)hw)->DRVCTRL.reg;
4179 tmp = (tmp & TCC_DRVCTRL_FILTERVAL0(mask)) >> TCC_DRVCTRL_FILTERVAL0_Pos;
4180 return tmp;
4181}
4182
4183static inline void hri_tcc_write_DRVCTRL_FILTERVAL0_bf(const void *const hw, hri_tcc_drvctrl_reg_t data)
4184{
4185 uint32_t tmp;
4186 TCC_CRITICAL_SECTION_ENTER();
4187 tmp = ((Tcc *)hw)->DRVCTRL.reg;
4188 tmp &= ~TCC_DRVCTRL_FILTERVAL0_Msk;
4189 tmp |= TCC_DRVCTRL_FILTERVAL0(data);
4190 ((Tcc *)hw)->DRVCTRL.reg = tmp;
4191 TCC_CRITICAL_SECTION_LEAVE();
4192}
4193
4194static inline void hri_tcc_clear_DRVCTRL_FILTERVAL0_bf(const void *const hw, hri_tcc_drvctrl_reg_t mask)
4195{
4196 TCC_CRITICAL_SECTION_ENTER();
4197 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_FILTERVAL0(mask);
4198 TCC_CRITICAL_SECTION_LEAVE();
4199}
4200
4201static inline void hri_tcc_toggle_DRVCTRL_FILTERVAL0_bf(const void *const hw, hri_tcc_drvctrl_reg_t mask)
4202{
4203 TCC_CRITICAL_SECTION_ENTER();
4204 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_FILTERVAL0(mask);
4205 TCC_CRITICAL_SECTION_LEAVE();
4206}
4207
4208static inline hri_tcc_drvctrl_reg_t hri_tcc_read_DRVCTRL_FILTERVAL0_bf(const void *const hw)
4209{
4210 uint32_t tmp;
4211 tmp = ((Tcc *)hw)->DRVCTRL.reg;
4212 tmp = (tmp & TCC_DRVCTRL_FILTERVAL0_Msk) >> TCC_DRVCTRL_FILTERVAL0_Pos;
4213 return tmp;
4214}
4215
4216static inline void hri_tcc_set_DRVCTRL_FILTERVAL1_bf(const void *const hw, hri_tcc_drvctrl_reg_t mask)
4217{
4218 TCC_CRITICAL_SECTION_ENTER();
4219 ((Tcc *)hw)->DRVCTRL.reg |= TCC_DRVCTRL_FILTERVAL1(mask);
4220 TCC_CRITICAL_SECTION_LEAVE();
4221}
4222
4223static inline hri_tcc_drvctrl_reg_t hri_tcc_get_DRVCTRL_FILTERVAL1_bf(const void *const hw, hri_tcc_drvctrl_reg_t mask)
4224{
4225 uint32_t tmp;
4226 tmp = ((Tcc *)hw)->DRVCTRL.reg;
4227 tmp = (tmp & TCC_DRVCTRL_FILTERVAL1(mask)) >> TCC_DRVCTRL_FILTERVAL1_Pos;
4228 return tmp;
4229}
4230
4231static inline void hri_tcc_write_DRVCTRL_FILTERVAL1_bf(const void *const hw, hri_tcc_drvctrl_reg_t data)
4232{
4233 uint32_t tmp;
4234 TCC_CRITICAL_SECTION_ENTER();
4235 tmp = ((Tcc *)hw)->DRVCTRL.reg;
4236 tmp &= ~TCC_DRVCTRL_FILTERVAL1_Msk;
4237 tmp |= TCC_DRVCTRL_FILTERVAL1(data);
4238 ((Tcc *)hw)->DRVCTRL.reg = tmp;
4239 TCC_CRITICAL_SECTION_LEAVE();
4240}
4241
4242static inline void hri_tcc_clear_DRVCTRL_FILTERVAL1_bf(const void *const hw, hri_tcc_drvctrl_reg_t mask)
4243{
4244 TCC_CRITICAL_SECTION_ENTER();
4245 ((Tcc *)hw)->DRVCTRL.reg &= ~TCC_DRVCTRL_FILTERVAL1(mask);
4246 TCC_CRITICAL_SECTION_LEAVE();
4247}
4248
4249static inline void hri_tcc_toggle_DRVCTRL_FILTERVAL1_bf(const void *const hw, hri_tcc_drvctrl_reg_t mask)
4250{
4251 TCC_CRITICAL_SECTION_ENTER();
4252 ((Tcc *)hw)->DRVCTRL.reg ^= TCC_DRVCTRL_FILTERVAL1(mask);
4253 TCC_CRITICAL_SECTION_LEAVE();
4254}
4255
4256static inline hri_tcc_drvctrl_reg_t hri_tcc_read_DRVCTRL_FILTERVAL1_bf(const void *const hw)
4257{
4258 uint32_t tmp;
4259 tmp = ((Tcc *)hw)->DRVCTRL.reg;
4260 tmp = (tmp & TCC_DRVCTRL_FILTERVAL1_Msk) >> TCC_DRVCTRL_FILTERVAL1_Pos;
4261 return tmp;
4262}
4263
4264static inline void hri_tcc_set_DRVCTRL_reg(const void *const hw, hri_tcc_drvctrl_reg_t mask)
4265{
4266 TCC_CRITICAL_SECTION_ENTER();
4267 ((Tcc *)hw)->DRVCTRL.reg |= mask;
4268 TCC_CRITICAL_SECTION_LEAVE();
4269}
4270
4271static inline hri_tcc_drvctrl_reg_t hri_tcc_get_DRVCTRL_reg(const void *const hw, hri_tcc_drvctrl_reg_t mask)
4272{
4273 uint32_t tmp;
4274 tmp = ((Tcc *)hw)->DRVCTRL.reg;
4275 tmp &= mask;
4276 return tmp;
4277}
4278
4279static inline void hri_tcc_write_DRVCTRL_reg(const void *const hw, hri_tcc_drvctrl_reg_t data)
4280{
4281 TCC_CRITICAL_SECTION_ENTER();
4282 ((Tcc *)hw)->DRVCTRL.reg = data;
4283 TCC_CRITICAL_SECTION_LEAVE();
4284}
4285
4286static inline void hri_tcc_clear_DRVCTRL_reg(const void *const hw, hri_tcc_drvctrl_reg_t mask)
4287{
4288 TCC_CRITICAL_SECTION_ENTER();
4289 ((Tcc *)hw)->DRVCTRL.reg &= ~mask;
4290 TCC_CRITICAL_SECTION_LEAVE();
4291}
4292
4293static inline void hri_tcc_toggle_DRVCTRL_reg(const void *const hw, hri_tcc_drvctrl_reg_t mask)
4294{
4295 TCC_CRITICAL_SECTION_ENTER();
4296 ((Tcc *)hw)->DRVCTRL.reg ^= mask;
4297 TCC_CRITICAL_SECTION_LEAVE();
4298}
4299
4300static inline hri_tcc_drvctrl_reg_t hri_tcc_read_DRVCTRL_reg(const void *const hw)
4301{
4302 return ((Tcc *)hw)->DRVCTRL.reg;
4303}
4304
4305static inline void hri_tcc_set_DBGCTRL_DBGRUN_bit(const void *const hw)
4306{
4307 TCC_CRITICAL_SECTION_ENTER();
4308 ((Tcc *)hw)->DBGCTRL.reg |= TCC_DBGCTRL_DBGRUN;
4309 TCC_CRITICAL_SECTION_LEAVE();
4310}
4311
4312static inline bool hri_tcc_get_DBGCTRL_DBGRUN_bit(const void *const hw)
4313{
4314 uint8_t tmp;
4315 tmp = ((Tcc *)hw)->DBGCTRL.reg;
4316 tmp = (tmp & TCC_DBGCTRL_DBGRUN) >> TCC_DBGCTRL_DBGRUN_Pos;
4317 return (bool)tmp;
4318}
4319
4320static inline void hri_tcc_write_DBGCTRL_DBGRUN_bit(const void *const hw, bool value)
4321{
4322 uint8_t tmp;
4323 TCC_CRITICAL_SECTION_ENTER();
4324 tmp = ((Tcc *)hw)->DBGCTRL.reg;
4325 tmp &= ~TCC_DBGCTRL_DBGRUN;
4326 tmp |= value << TCC_DBGCTRL_DBGRUN_Pos;
4327 ((Tcc *)hw)->DBGCTRL.reg = tmp;
4328 TCC_CRITICAL_SECTION_LEAVE();
4329}
4330
4331static inline void hri_tcc_clear_DBGCTRL_DBGRUN_bit(const void *const hw)
4332{
4333 TCC_CRITICAL_SECTION_ENTER();
4334 ((Tcc *)hw)->DBGCTRL.reg &= ~TCC_DBGCTRL_DBGRUN;
4335 TCC_CRITICAL_SECTION_LEAVE();
4336}
4337
4338static inline void hri_tcc_toggle_DBGCTRL_DBGRUN_bit(const void *const hw)
4339{
4340 TCC_CRITICAL_SECTION_ENTER();
4341 ((Tcc *)hw)->DBGCTRL.reg ^= TCC_DBGCTRL_DBGRUN;
4342 TCC_CRITICAL_SECTION_LEAVE();
4343}
4344
4345static inline void hri_tcc_set_DBGCTRL_FDDBD_bit(const void *const hw)
4346{
4347 TCC_CRITICAL_SECTION_ENTER();
4348 ((Tcc *)hw)->DBGCTRL.reg |= TCC_DBGCTRL_FDDBD;
4349 TCC_CRITICAL_SECTION_LEAVE();
4350}
4351
4352static inline bool hri_tcc_get_DBGCTRL_FDDBD_bit(const void *const hw)
4353{
4354 uint8_t tmp;
4355 tmp = ((Tcc *)hw)->DBGCTRL.reg;
4356 tmp = (tmp & TCC_DBGCTRL_FDDBD) >> TCC_DBGCTRL_FDDBD_Pos;
4357 return (bool)tmp;
4358}
4359
4360static inline void hri_tcc_write_DBGCTRL_FDDBD_bit(const void *const hw, bool value)
4361{
4362 uint8_t tmp;
4363 TCC_CRITICAL_SECTION_ENTER();
4364 tmp = ((Tcc *)hw)->DBGCTRL.reg;
4365 tmp &= ~TCC_DBGCTRL_FDDBD;
4366 tmp |= value << TCC_DBGCTRL_FDDBD_Pos;
4367 ((Tcc *)hw)->DBGCTRL.reg = tmp;
4368 TCC_CRITICAL_SECTION_LEAVE();
4369}
4370
4371static inline void hri_tcc_clear_DBGCTRL_FDDBD_bit(const void *const hw)
4372{
4373 TCC_CRITICAL_SECTION_ENTER();
4374 ((Tcc *)hw)->DBGCTRL.reg &= ~TCC_DBGCTRL_FDDBD;
4375 TCC_CRITICAL_SECTION_LEAVE();
4376}
4377
4378static inline void hri_tcc_toggle_DBGCTRL_FDDBD_bit(const void *const hw)
4379{
4380 TCC_CRITICAL_SECTION_ENTER();
4381 ((Tcc *)hw)->DBGCTRL.reg ^= TCC_DBGCTRL_FDDBD;
4382 TCC_CRITICAL_SECTION_LEAVE();
4383}
4384
4385static inline void hri_tcc_set_DBGCTRL_reg(const void *const hw, hri_tcc_dbgctrl_reg_t mask)
4386{
4387 TCC_CRITICAL_SECTION_ENTER();
4388 ((Tcc *)hw)->DBGCTRL.reg |= mask;
4389 TCC_CRITICAL_SECTION_LEAVE();
4390}
4391
4392static inline hri_tcc_dbgctrl_reg_t hri_tcc_get_DBGCTRL_reg(const void *const hw, hri_tcc_dbgctrl_reg_t mask)
4393{
4394 uint8_t tmp;
4395 tmp = ((Tcc *)hw)->DBGCTRL.reg;
4396 tmp &= mask;
4397 return tmp;
4398}
4399
4400static inline void hri_tcc_write_DBGCTRL_reg(const void *const hw, hri_tcc_dbgctrl_reg_t data)
4401{
4402 TCC_CRITICAL_SECTION_ENTER();
4403 ((Tcc *)hw)->DBGCTRL.reg = data;
4404 TCC_CRITICAL_SECTION_LEAVE();
4405}
4406
4407static inline void hri_tcc_clear_DBGCTRL_reg(const void *const hw, hri_tcc_dbgctrl_reg_t mask)
4408{
4409 TCC_CRITICAL_SECTION_ENTER();
4410 ((Tcc *)hw)->DBGCTRL.reg &= ~mask;
4411 TCC_CRITICAL_SECTION_LEAVE();
4412}
4413
4414static inline void hri_tcc_toggle_DBGCTRL_reg(const void *const hw, hri_tcc_dbgctrl_reg_t mask)
4415{
4416 TCC_CRITICAL_SECTION_ENTER();
4417 ((Tcc *)hw)->DBGCTRL.reg ^= mask;
4418 TCC_CRITICAL_SECTION_LEAVE();
4419}
4420
4421static inline hri_tcc_dbgctrl_reg_t hri_tcc_read_DBGCTRL_reg(const void *const hw)
4422{
4423 return ((Tcc *)hw)->DBGCTRL.reg;
4424}
4425
4426static inline void hri_tcc_set_EVCTRL_OVFEO_bit(const void *const hw)
4427{
4428 TCC_CRITICAL_SECTION_ENTER();
4429 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_OVFEO;
4430 TCC_CRITICAL_SECTION_LEAVE();
4431}
4432
4433static inline bool hri_tcc_get_EVCTRL_OVFEO_bit(const void *const hw)
4434{
4435 uint32_t tmp;
4436 tmp = ((Tcc *)hw)->EVCTRL.reg;
4437 tmp = (tmp & TCC_EVCTRL_OVFEO) >> TCC_EVCTRL_OVFEO_Pos;
4438 return (bool)tmp;
4439}
4440
4441static inline void hri_tcc_write_EVCTRL_OVFEO_bit(const void *const hw, bool value)
4442{
4443 uint32_t tmp;
4444 TCC_CRITICAL_SECTION_ENTER();
4445 tmp = ((Tcc *)hw)->EVCTRL.reg;
4446 tmp &= ~TCC_EVCTRL_OVFEO;
4447 tmp |= value << TCC_EVCTRL_OVFEO_Pos;
4448 ((Tcc *)hw)->EVCTRL.reg = tmp;
4449 TCC_CRITICAL_SECTION_LEAVE();
4450}
4451
4452static inline void hri_tcc_clear_EVCTRL_OVFEO_bit(const void *const hw)
4453{
4454 TCC_CRITICAL_SECTION_ENTER();
4455 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_OVFEO;
4456 TCC_CRITICAL_SECTION_LEAVE();
4457}
4458
4459static inline void hri_tcc_toggle_EVCTRL_OVFEO_bit(const void *const hw)
4460{
4461 TCC_CRITICAL_SECTION_ENTER();
4462 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_OVFEO;
4463 TCC_CRITICAL_SECTION_LEAVE();
4464}
4465
4466static inline void hri_tcc_set_EVCTRL_TRGEO_bit(const void *const hw)
4467{
4468 TCC_CRITICAL_SECTION_ENTER();
4469 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_TRGEO;
4470 TCC_CRITICAL_SECTION_LEAVE();
4471}
4472
4473static inline bool hri_tcc_get_EVCTRL_TRGEO_bit(const void *const hw)
4474{
4475 uint32_t tmp;
4476 tmp = ((Tcc *)hw)->EVCTRL.reg;
4477 tmp = (tmp & TCC_EVCTRL_TRGEO) >> TCC_EVCTRL_TRGEO_Pos;
4478 return (bool)tmp;
4479}
4480
4481static inline void hri_tcc_write_EVCTRL_TRGEO_bit(const void *const hw, bool value)
4482{
4483 uint32_t tmp;
4484 TCC_CRITICAL_SECTION_ENTER();
4485 tmp = ((Tcc *)hw)->EVCTRL.reg;
4486 tmp &= ~TCC_EVCTRL_TRGEO;
4487 tmp |= value << TCC_EVCTRL_TRGEO_Pos;
4488 ((Tcc *)hw)->EVCTRL.reg = tmp;
4489 TCC_CRITICAL_SECTION_LEAVE();
4490}
4491
4492static inline void hri_tcc_clear_EVCTRL_TRGEO_bit(const void *const hw)
4493{
4494 TCC_CRITICAL_SECTION_ENTER();
4495 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_TRGEO;
4496 TCC_CRITICAL_SECTION_LEAVE();
4497}
4498
4499static inline void hri_tcc_toggle_EVCTRL_TRGEO_bit(const void *const hw)
4500{
4501 TCC_CRITICAL_SECTION_ENTER();
4502 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_TRGEO;
4503 TCC_CRITICAL_SECTION_LEAVE();
4504}
4505
4506static inline void hri_tcc_set_EVCTRL_CNTEO_bit(const void *const hw)
4507{
4508 TCC_CRITICAL_SECTION_ENTER();
4509 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_CNTEO;
4510 TCC_CRITICAL_SECTION_LEAVE();
4511}
4512
4513static inline bool hri_tcc_get_EVCTRL_CNTEO_bit(const void *const hw)
4514{
4515 uint32_t tmp;
4516 tmp = ((Tcc *)hw)->EVCTRL.reg;
4517 tmp = (tmp & TCC_EVCTRL_CNTEO) >> TCC_EVCTRL_CNTEO_Pos;
4518 return (bool)tmp;
4519}
4520
4521static inline void hri_tcc_write_EVCTRL_CNTEO_bit(const void *const hw, bool value)
4522{
4523 uint32_t tmp;
4524 TCC_CRITICAL_SECTION_ENTER();
4525 tmp = ((Tcc *)hw)->EVCTRL.reg;
4526 tmp &= ~TCC_EVCTRL_CNTEO;
4527 tmp |= value << TCC_EVCTRL_CNTEO_Pos;
4528 ((Tcc *)hw)->EVCTRL.reg = tmp;
4529 TCC_CRITICAL_SECTION_LEAVE();
4530}
4531
4532static inline void hri_tcc_clear_EVCTRL_CNTEO_bit(const void *const hw)
4533{
4534 TCC_CRITICAL_SECTION_ENTER();
4535 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_CNTEO;
4536 TCC_CRITICAL_SECTION_LEAVE();
4537}
4538
4539static inline void hri_tcc_toggle_EVCTRL_CNTEO_bit(const void *const hw)
4540{
4541 TCC_CRITICAL_SECTION_ENTER();
4542 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_CNTEO;
4543 TCC_CRITICAL_SECTION_LEAVE();
4544}
4545
4546static inline void hri_tcc_set_EVCTRL_TCINV0_bit(const void *const hw)
4547{
4548 TCC_CRITICAL_SECTION_ENTER();
4549 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_TCINV0;
4550 TCC_CRITICAL_SECTION_LEAVE();
4551}
4552
4553static inline bool hri_tcc_get_EVCTRL_TCINV0_bit(const void *const hw)
4554{
4555 uint32_t tmp;
4556 tmp = ((Tcc *)hw)->EVCTRL.reg;
4557 tmp = (tmp & TCC_EVCTRL_TCINV0) >> TCC_EVCTRL_TCINV0_Pos;
4558 return (bool)tmp;
4559}
4560
4561static inline void hri_tcc_write_EVCTRL_TCINV0_bit(const void *const hw, bool value)
4562{
4563 uint32_t tmp;
4564 TCC_CRITICAL_SECTION_ENTER();
4565 tmp = ((Tcc *)hw)->EVCTRL.reg;
4566 tmp &= ~TCC_EVCTRL_TCINV0;
4567 tmp |= value << TCC_EVCTRL_TCINV0_Pos;
4568 ((Tcc *)hw)->EVCTRL.reg = tmp;
4569 TCC_CRITICAL_SECTION_LEAVE();
4570}
4571
4572static inline void hri_tcc_clear_EVCTRL_TCINV0_bit(const void *const hw)
4573{
4574 TCC_CRITICAL_SECTION_ENTER();
4575 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_TCINV0;
4576 TCC_CRITICAL_SECTION_LEAVE();
4577}
4578
4579static inline void hri_tcc_toggle_EVCTRL_TCINV0_bit(const void *const hw)
4580{
4581 TCC_CRITICAL_SECTION_ENTER();
4582 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_TCINV0;
4583 TCC_CRITICAL_SECTION_LEAVE();
4584}
4585
4586static inline void hri_tcc_set_EVCTRL_TCINV1_bit(const void *const hw)
4587{
4588 TCC_CRITICAL_SECTION_ENTER();
4589 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_TCINV1;
4590 TCC_CRITICAL_SECTION_LEAVE();
4591}
4592
4593static inline bool hri_tcc_get_EVCTRL_TCINV1_bit(const void *const hw)
4594{
4595 uint32_t tmp;
4596 tmp = ((Tcc *)hw)->EVCTRL.reg;
4597 tmp = (tmp & TCC_EVCTRL_TCINV1) >> TCC_EVCTRL_TCINV1_Pos;
4598 return (bool)tmp;
4599}
4600
4601static inline void hri_tcc_write_EVCTRL_TCINV1_bit(const void *const hw, bool value)
4602{
4603 uint32_t tmp;
4604 TCC_CRITICAL_SECTION_ENTER();
4605 tmp = ((Tcc *)hw)->EVCTRL.reg;
4606 tmp &= ~TCC_EVCTRL_TCINV1;
4607 tmp |= value << TCC_EVCTRL_TCINV1_Pos;
4608 ((Tcc *)hw)->EVCTRL.reg = tmp;
4609 TCC_CRITICAL_SECTION_LEAVE();
4610}
4611
4612static inline void hri_tcc_clear_EVCTRL_TCINV1_bit(const void *const hw)
4613{
4614 TCC_CRITICAL_SECTION_ENTER();
4615 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_TCINV1;
4616 TCC_CRITICAL_SECTION_LEAVE();
4617}
4618
4619static inline void hri_tcc_toggle_EVCTRL_TCINV1_bit(const void *const hw)
4620{
4621 TCC_CRITICAL_SECTION_ENTER();
4622 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_TCINV1;
4623 TCC_CRITICAL_SECTION_LEAVE();
4624}
4625
4626static inline void hri_tcc_set_EVCTRL_TCEI0_bit(const void *const hw)
4627{
4628 TCC_CRITICAL_SECTION_ENTER();
4629 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_TCEI0;
4630 TCC_CRITICAL_SECTION_LEAVE();
4631}
4632
4633static inline bool hri_tcc_get_EVCTRL_TCEI0_bit(const void *const hw)
4634{
4635 uint32_t tmp;
4636 tmp = ((Tcc *)hw)->EVCTRL.reg;
4637 tmp = (tmp & TCC_EVCTRL_TCEI0) >> TCC_EVCTRL_TCEI0_Pos;
4638 return (bool)tmp;
4639}
4640
4641static inline void hri_tcc_write_EVCTRL_TCEI0_bit(const void *const hw, bool value)
4642{
4643 uint32_t tmp;
4644 TCC_CRITICAL_SECTION_ENTER();
4645 tmp = ((Tcc *)hw)->EVCTRL.reg;
4646 tmp &= ~TCC_EVCTRL_TCEI0;
4647 tmp |= value << TCC_EVCTRL_TCEI0_Pos;
4648 ((Tcc *)hw)->EVCTRL.reg = tmp;
4649 TCC_CRITICAL_SECTION_LEAVE();
4650}
4651
4652static inline void hri_tcc_clear_EVCTRL_TCEI0_bit(const void *const hw)
4653{
4654 TCC_CRITICAL_SECTION_ENTER();
4655 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_TCEI0;
4656 TCC_CRITICAL_SECTION_LEAVE();
4657}
4658
4659static inline void hri_tcc_toggle_EVCTRL_TCEI0_bit(const void *const hw)
4660{
4661 TCC_CRITICAL_SECTION_ENTER();
4662 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_TCEI0;
4663 TCC_CRITICAL_SECTION_LEAVE();
4664}
4665
4666static inline void hri_tcc_set_EVCTRL_TCEI1_bit(const void *const hw)
4667{
4668 TCC_CRITICAL_SECTION_ENTER();
4669 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_TCEI1;
4670 TCC_CRITICAL_SECTION_LEAVE();
4671}
4672
4673static inline bool hri_tcc_get_EVCTRL_TCEI1_bit(const void *const hw)
4674{
4675 uint32_t tmp;
4676 tmp = ((Tcc *)hw)->EVCTRL.reg;
4677 tmp = (tmp & TCC_EVCTRL_TCEI1) >> TCC_EVCTRL_TCEI1_Pos;
4678 return (bool)tmp;
4679}
4680
4681static inline void hri_tcc_write_EVCTRL_TCEI1_bit(const void *const hw, bool value)
4682{
4683 uint32_t tmp;
4684 TCC_CRITICAL_SECTION_ENTER();
4685 tmp = ((Tcc *)hw)->EVCTRL.reg;
4686 tmp &= ~TCC_EVCTRL_TCEI1;
4687 tmp |= value << TCC_EVCTRL_TCEI1_Pos;
4688 ((Tcc *)hw)->EVCTRL.reg = tmp;
4689 TCC_CRITICAL_SECTION_LEAVE();
4690}
4691
4692static inline void hri_tcc_clear_EVCTRL_TCEI1_bit(const void *const hw)
4693{
4694 TCC_CRITICAL_SECTION_ENTER();
4695 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_TCEI1;
4696 TCC_CRITICAL_SECTION_LEAVE();
4697}
4698
4699static inline void hri_tcc_toggle_EVCTRL_TCEI1_bit(const void *const hw)
4700{
4701 TCC_CRITICAL_SECTION_ENTER();
4702 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_TCEI1;
4703 TCC_CRITICAL_SECTION_LEAVE();
4704}
4705
4706static inline void hri_tcc_set_EVCTRL_MCEI0_bit(const void *const hw)
4707{
4708 TCC_CRITICAL_SECTION_ENTER();
4709 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_MCEI0;
4710 TCC_CRITICAL_SECTION_LEAVE();
4711}
4712
4713static inline bool hri_tcc_get_EVCTRL_MCEI0_bit(const void *const hw)
4714{
4715 uint32_t tmp;
4716 tmp = ((Tcc *)hw)->EVCTRL.reg;
4717 tmp = (tmp & TCC_EVCTRL_MCEI0) >> TCC_EVCTRL_MCEI0_Pos;
4718 return (bool)tmp;
4719}
4720
4721static inline void hri_tcc_write_EVCTRL_MCEI0_bit(const void *const hw, bool value)
4722{
4723 uint32_t tmp;
4724 TCC_CRITICAL_SECTION_ENTER();
4725 tmp = ((Tcc *)hw)->EVCTRL.reg;
4726 tmp &= ~TCC_EVCTRL_MCEI0;
4727 tmp |= value << TCC_EVCTRL_MCEI0_Pos;
4728 ((Tcc *)hw)->EVCTRL.reg = tmp;
4729 TCC_CRITICAL_SECTION_LEAVE();
4730}
4731
4732static inline void hri_tcc_clear_EVCTRL_MCEI0_bit(const void *const hw)
4733{
4734 TCC_CRITICAL_SECTION_ENTER();
4735 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_MCEI0;
4736 TCC_CRITICAL_SECTION_LEAVE();
4737}
4738
4739static inline void hri_tcc_toggle_EVCTRL_MCEI0_bit(const void *const hw)
4740{
4741 TCC_CRITICAL_SECTION_ENTER();
4742 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_MCEI0;
4743 TCC_CRITICAL_SECTION_LEAVE();
4744}
4745
4746static inline void hri_tcc_set_EVCTRL_MCEI1_bit(const void *const hw)
4747{
4748 TCC_CRITICAL_SECTION_ENTER();
4749 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_MCEI1;
4750 TCC_CRITICAL_SECTION_LEAVE();
4751}
4752
4753static inline bool hri_tcc_get_EVCTRL_MCEI1_bit(const void *const hw)
4754{
4755 uint32_t tmp;
4756 tmp = ((Tcc *)hw)->EVCTRL.reg;
4757 tmp = (tmp & TCC_EVCTRL_MCEI1) >> TCC_EVCTRL_MCEI1_Pos;
4758 return (bool)tmp;
4759}
4760
4761static inline void hri_tcc_write_EVCTRL_MCEI1_bit(const void *const hw, bool value)
4762{
4763 uint32_t tmp;
4764 TCC_CRITICAL_SECTION_ENTER();
4765 tmp = ((Tcc *)hw)->EVCTRL.reg;
4766 tmp &= ~TCC_EVCTRL_MCEI1;
4767 tmp |= value << TCC_EVCTRL_MCEI1_Pos;
4768 ((Tcc *)hw)->EVCTRL.reg = tmp;
4769 TCC_CRITICAL_SECTION_LEAVE();
4770}
4771
4772static inline void hri_tcc_clear_EVCTRL_MCEI1_bit(const void *const hw)
4773{
4774 TCC_CRITICAL_SECTION_ENTER();
4775 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_MCEI1;
4776 TCC_CRITICAL_SECTION_LEAVE();
4777}
4778
4779static inline void hri_tcc_toggle_EVCTRL_MCEI1_bit(const void *const hw)
4780{
4781 TCC_CRITICAL_SECTION_ENTER();
4782 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_MCEI1;
4783 TCC_CRITICAL_SECTION_LEAVE();
4784}
4785
4786static inline void hri_tcc_set_EVCTRL_MCEI2_bit(const void *const hw)
4787{
4788 TCC_CRITICAL_SECTION_ENTER();
4789 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_MCEI2;
4790 TCC_CRITICAL_SECTION_LEAVE();
4791}
4792
4793static inline bool hri_tcc_get_EVCTRL_MCEI2_bit(const void *const hw)
4794{
4795 uint32_t tmp;
4796 tmp = ((Tcc *)hw)->EVCTRL.reg;
4797 tmp = (tmp & TCC_EVCTRL_MCEI2) >> TCC_EVCTRL_MCEI2_Pos;
4798 return (bool)tmp;
4799}
4800
4801static inline void hri_tcc_write_EVCTRL_MCEI2_bit(const void *const hw, bool value)
4802{
4803 uint32_t tmp;
4804 TCC_CRITICAL_SECTION_ENTER();
4805 tmp = ((Tcc *)hw)->EVCTRL.reg;
4806 tmp &= ~TCC_EVCTRL_MCEI2;
4807 tmp |= value << TCC_EVCTRL_MCEI2_Pos;
4808 ((Tcc *)hw)->EVCTRL.reg = tmp;
4809 TCC_CRITICAL_SECTION_LEAVE();
4810}
4811
4812static inline void hri_tcc_clear_EVCTRL_MCEI2_bit(const void *const hw)
4813{
4814 TCC_CRITICAL_SECTION_ENTER();
4815 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_MCEI2;
4816 TCC_CRITICAL_SECTION_LEAVE();
4817}
4818
4819static inline void hri_tcc_toggle_EVCTRL_MCEI2_bit(const void *const hw)
4820{
4821 TCC_CRITICAL_SECTION_ENTER();
4822 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_MCEI2;
4823 TCC_CRITICAL_SECTION_LEAVE();
4824}
4825
4826static inline void hri_tcc_set_EVCTRL_MCEI3_bit(const void *const hw)
4827{
4828 TCC_CRITICAL_SECTION_ENTER();
4829 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_MCEI3;
4830 TCC_CRITICAL_SECTION_LEAVE();
4831}
4832
4833static inline bool hri_tcc_get_EVCTRL_MCEI3_bit(const void *const hw)
4834{
4835 uint32_t tmp;
4836 tmp = ((Tcc *)hw)->EVCTRL.reg;
4837 tmp = (tmp & TCC_EVCTRL_MCEI3) >> TCC_EVCTRL_MCEI3_Pos;
4838 return (bool)tmp;
4839}
4840
4841static inline void hri_tcc_write_EVCTRL_MCEI3_bit(const void *const hw, bool value)
4842{
4843 uint32_t tmp;
4844 TCC_CRITICAL_SECTION_ENTER();
4845 tmp = ((Tcc *)hw)->EVCTRL.reg;
4846 tmp &= ~TCC_EVCTRL_MCEI3;
4847 tmp |= value << TCC_EVCTRL_MCEI3_Pos;
4848 ((Tcc *)hw)->EVCTRL.reg = tmp;
4849 TCC_CRITICAL_SECTION_LEAVE();
4850}
4851
4852static inline void hri_tcc_clear_EVCTRL_MCEI3_bit(const void *const hw)
4853{
4854 TCC_CRITICAL_SECTION_ENTER();
4855 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_MCEI3;
4856 TCC_CRITICAL_SECTION_LEAVE();
4857}
4858
4859static inline void hri_tcc_toggle_EVCTRL_MCEI3_bit(const void *const hw)
4860{
4861 TCC_CRITICAL_SECTION_ENTER();
4862 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_MCEI3;
4863 TCC_CRITICAL_SECTION_LEAVE();
4864}
4865
4866static inline void hri_tcc_set_EVCTRL_MCEI4_bit(const void *const hw)
4867{
4868 TCC_CRITICAL_SECTION_ENTER();
4869 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_MCEI4;
4870 TCC_CRITICAL_SECTION_LEAVE();
4871}
4872
4873static inline bool hri_tcc_get_EVCTRL_MCEI4_bit(const void *const hw)
4874{
4875 uint32_t tmp;
4876 tmp = ((Tcc *)hw)->EVCTRL.reg;
4877 tmp = (tmp & TCC_EVCTRL_MCEI4) >> TCC_EVCTRL_MCEI4_Pos;
4878 return (bool)tmp;
4879}
4880
4881static inline void hri_tcc_write_EVCTRL_MCEI4_bit(const void *const hw, bool value)
4882{
4883 uint32_t tmp;
4884 TCC_CRITICAL_SECTION_ENTER();
4885 tmp = ((Tcc *)hw)->EVCTRL.reg;
4886 tmp &= ~TCC_EVCTRL_MCEI4;
4887 tmp |= value << TCC_EVCTRL_MCEI4_Pos;
4888 ((Tcc *)hw)->EVCTRL.reg = tmp;
4889 TCC_CRITICAL_SECTION_LEAVE();
4890}
4891
4892static inline void hri_tcc_clear_EVCTRL_MCEI4_bit(const void *const hw)
4893{
4894 TCC_CRITICAL_SECTION_ENTER();
4895 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_MCEI4;
4896 TCC_CRITICAL_SECTION_LEAVE();
4897}
4898
4899static inline void hri_tcc_toggle_EVCTRL_MCEI4_bit(const void *const hw)
4900{
4901 TCC_CRITICAL_SECTION_ENTER();
4902 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_MCEI4;
4903 TCC_CRITICAL_SECTION_LEAVE();
4904}
4905
4906static inline void hri_tcc_set_EVCTRL_MCEI5_bit(const void *const hw)
4907{
4908 TCC_CRITICAL_SECTION_ENTER();
4909 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_MCEI5;
4910 TCC_CRITICAL_SECTION_LEAVE();
4911}
4912
4913static inline bool hri_tcc_get_EVCTRL_MCEI5_bit(const void *const hw)
4914{
4915 uint32_t tmp;
4916 tmp = ((Tcc *)hw)->EVCTRL.reg;
4917 tmp = (tmp & TCC_EVCTRL_MCEI5) >> TCC_EVCTRL_MCEI5_Pos;
4918 return (bool)tmp;
4919}
4920
4921static inline void hri_tcc_write_EVCTRL_MCEI5_bit(const void *const hw, bool value)
4922{
4923 uint32_t tmp;
4924 TCC_CRITICAL_SECTION_ENTER();
4925 tmp = ((Tcc *)hw)->EVCTRL.reg;
4926 tmp &= ~TCC_EVCTRL_MCEI5;
4927 tmp |= value << TCC_EVCTRL_MCEI5_Pos;
4928 ((Tcc *)hw)->EVCTRL.reg = tmp;
4929 TCC_CRITICAL_SECTION_LEAVE();
4930}
4931
4932static inline void hri_tcc_clear_EVCTRL_MCEI5_bit(const void *const hw)
4933{
4934 TCC_CRITICAL_SECTION_ENTER();
4935 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_MCEI5;
4936 TCC_CRITICAL_SECTION_LEAVE();
4937}
4938
4939static inline void hri_tcc_toggle_EVCTRL_MCEI5_bit(const void *const hw)
4940{
4941 TCC_CRITICAL_SECTION_ENTER();
4942 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_MCEI5;
4943 TCC_CRITICAL_SECTION_LEAVE();
4944}
4945
4946static inline void hri_tcc_set_EVCTRL_MCEO0_bit(const void *const hw)
4947{
4948 TCC_CRITICAL_SECTION_ENTER();
4949 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_MCEO0;
4950 TCC_CRITICAL_SECTION_LEAVE();
4951}
4952
4953static inline bool hri_tcc_get_EVCTRL_MCEO0_bit(const void *const hw)
4954{
4955 uint32_t tmp;
4956 tmp = ((Tcc *)hw)->EVCTRL.reg;
4957 tmp = (tmp & TCC_EVCTRL_MCEO0) >> TCC_EVCTRL_MCEO0_Pos;
4958 return (bool)tmp;
4959}
4960
4961static inline void hri_tcc_write_EVCTRL_MCEO0_bit(const void *const hw, bool value)
4962{
4963 uint32_t tmp;
4964 TCC_CRITICAL_SECTION_ENTER();
4965 tmp = ((Tcc *)hw)->EVCTRL.reg;
4966 tmp &= ~TCC_EVCTRL_MCEO0;
4967 tmp |= value << TCC_EVCTRL_MCEO0_Pos;
4968 ((Tcc *)hw)->EVCTRL.reg = tmp;
4969 TCC_CRITICAL_SECTION_LEAVE();
4970}
4971
4972static inline void hri_tcc_clear_EVCTRL_MCEO0_bit(const void *const hw)
4973{
4974 TCC_CRITICAL_SECTION_ENTER();
4975 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_MCEO0;
4976 TCC_CRITICAL_SECTION_LEAVE();
4977}
4978
4979static inline void hri_tcc_toggle_EVCTRL_MCEO0_bit(const void *const hw)
4980{
4981 TCC_CRITICAL_SECTION_ENTER();
4982 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_MCEO0;
4983 TCC_CRITICAL_SECTION_LEAVE();
4984}
4985
4986static inline void hri_tcc_set_EVCTRL_MCEO1_bit(const void *const hw)
4987{
4988 TCC_CRITICAL_SECTION_ENTER();
4989 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_MCEO1;
4990 TCC_CRITICAL_SECTION_LEAVE();
4991}
4992
4993static inline bool hri_tcc_get_EVCTRL_MCEO1_bit(const void *const hw)
4994{
4995 uint32_t tmp;
4996 tmp = ((Tcc *)hw)->EVCTRL.reg;
4997 tmp = (tmp & TCC_EVCTRL_MCEO1) >> TCC_EVCTRL_MCEO1_Pos;
4998 return (bool)tmp;
4999}
5000
5001static inline void hri_tcc_write_EVCTRL_MCEO1_bit(const void *const hw, bool value)
5002{
5003 uint32_t tmp;
5004 TCC_CRITICAL_SECTION_ENTER();
5005 tmp = ((Tcc *)hw)->EVCTRL.reg;
5006 tmp &= ~TCC_EVCTRL_MCEO1;
5007 tmp |= value << TCC_EVCTRL_MCEO1_Pos;
5008 ((Tcc *)hw)->EVCTRL.reg = tmp;
5009 TCC_CRITICAL_SECTION_LEAVE();
5010}
5011
5012static inline void hri_tcc_clear_EVCTRL_MCEO1_bit(const void *const hw)
5013{
5014 TCC_CRITICAL_SECTION_ENTER();
5015 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_MCEO1;
5016 TCC_CRITICAL_SECTION_LEAVE();
5017}
5018
5019static inline void hri_tcc_toggle_EVCTRL_MCEO1_bit(const void *const hw)
5020{
5021 TCC_CRITICAL_SECTION_ENTER();
5022 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_MCEO1;
5023 TCC_CRITICAL_SECTION_LEAVE();
5024}
5025
5026static inline void hri_tcc_set_EVCTRL_MCEO2_bit(const void *const hw)
5027{
5028 TCC_CRITICAL_SECTION_ENTER();
5029 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_MCEO2;
5030 TCC_CRITICAL_SECTION_LEAVE();
5031}
5032
5033static inline bool hri_tcc_get_EVCTRL_MCEO2_bit(const void *const hw)
5034{
5035 uint32_t tmp;
5036 tmp = ((Tcc *)hw)->EVCTRL.reg;
5037 tmp = (tmp & TCC_EVCTRL_MCEO2) >> TCC_EVCTRL_MCEO2_Pos;
5038 return (bool)tmp;
5039}
5040
5041static inline void hri_tcc_write_EVCTRL_MCEO2_bit(const void *const hw, bool value)
5042{
5043 uint32_t tmp;
5044 TCC_CRITICAL_SECTION_ENTER();
5045 tmp = ((Tcc *)hw)->EVCTRL.reg;
5046 tmp &= ~TCC_EVCTRL_MCEO2;
5047 tmp |= value << TCC_EVCTRL_MCEO2_Pos;
5048 ((Tcc *)hw)->EVCTRL.reg = tmp;
5049 TCC_CRITICAL_SECTION_LEAVE();
5050}
5051
5052static inline void hri_tcc_clear_EVCTRL_MCEO2_bit(const void *const hw)
5053{
5054 TCC_CRITICAL_SECTION_ENTER();
5055 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_MCEO2;
5056 TCC_CRITICAL_SECTION_LEAVE();
5057}
5058
5059static inline void hri_tcc_toggle_EVCTRL_MCEO2_bit(const void *const hw)
5060{
5061 TCC_CRITICAL_SECTION_ENTER();
5062 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_MCEO2;
5063 TCC_CRITICAL_SECTION_LEAVE();
5064}
5065
5066static inline void hri_tcc_set_EVCTRL_MCEO3_bit(const void *const hw)
5067{
5068 TCC_CRITICAL_SECTION_ENTER();
5069 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_MCEO3;
5070 TCC_CRITICAL_SECTION_LEAVE();
5071}
5072
5073static inline bool hri_tcc_get_EVCTRL_MCEO3_bit(const void *const hw)
5074{
5075 uint32_t tmp;
5076 tmp = ((Tcc *)hw)->EVCTRL.reg;
5077 tmp = (tmp & TCC_EVCTRL_MCEO3) >> TCC_EVCTRL_MCEO3_Pos;
5078 return (bool)tmp;
5079}
5080
5081static inline void hri_tcc_write_EVCTRL_MCEO3_bit(const void *const hw, bool value)
5082{
5083 uint32_t tmp;
5084 TCC_CRITICAL_SECTION_ENTER();
5085 tmp = ((Tcc *)hw)->EVCTRL.reg;
5086 tmp &= ~TCC_EVCTRL_MCEO3;
5087 tmp |= value << TCC_EVCTRL_MCEO3_Pos;
5088 ((Tcc *)hw)->EVCTRL.reg = tmp;
5089 TCC_CRITICAL_SECTION_LEAVE();
5090}
5091
5092static inline void hri_tcc_clear_EVCTRL_MCEO3_bit(const void *const hw)
5093{
5094 TCC_CRITICAL_SECTION_ENTER();
5095 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_MCEO3;
5096 TCC_CRITICAL_SECTION_LEAVE();
5097}
5098
5099static inline void hri_tcc_toggle_EVCTRL_MCEO3_bit(const void *const hw)
5100{
5101 TCC_CRITICAL_SECTION_ENTER();
5102 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_MCEO3;
5103 TCC_CRITICAL_SECTION_LEAVE();
5104}
5105
5106static inline void hri_tcc_set_EVCTRL_MCEO4_bit(const void *const hw)
5107{
5108 TCC_CRITICAL_SECTION_ENTER();
5109 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_MCEO4;
5110 TCC_CRITICAL_SECTION_LEAVE();
5111}
5112
5113static inline bool hri_tcc_get_EVCTRL_MCEO4_bit(const void *const hw)
5114{
5115 uint32_t tmp;
5116 tmp = ((Tcc *)hw)->EVCTRL.reg;
5117 tmp = (tmp & TCC_EVCTRL_MCEO4) >> TCC_EVCTRL_MCEO4_Pos;
5118 return (bool)tmp;
5119}
5120
5121static inline void hri_tcc_write_EVCTRL_MCEO4_bit(const void *const hw, bool value)
5122{
5123 uint32_t tmp;
5124 TCC_CRITICAL_SECTION_ENTER();
5125 tmp = ((Tcc *)hw)->EVCTRL.reg;
5126 tmp &= ~TCC_EVCTRL_MCEO4;
5127 tmp |= value << TCC_EVCTRL_MCEO4_Pos;
5128 ((Tcc *)hw)->EVCTRL.reg = tmp;
5129 TCC_CRITICAL_SECTION_LEAVE();
5130}
5131
5132static inline void hri_tcc_clear_EVCTRL_MCEO4_bit(const void *const hw)
5133{
5134 TCC_CRITICAL_SECTION_ENTER();
5135 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_MCEO4;
5136 TCC_CRITICAL_SECTION_LEAVE();
5137}
5138
5139static inline void hri_tcc_toggle_EVCTRL_MCEO4_bit(const void *const hw)
5140{
5141 TCC_CRITICAL_SECTION_ENTER();
5142 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_MCEO4;
5143 TCC_CRITICAL_SECTION_LEAVE();
5144}
5145
5146static inline void hri_tcc_set_EVCTRL_MCEO5_bit(const void *const hw)
5147{
5148 TCC_CRITICAL_SECTION_ENTER();
5149 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_MCEO5;
5150 TCC_CRITICAL_SECTION_LEAVE();
5151}
5152
5153static inline bool hri_tcc_get_EVCTRL_MCEO5_bit(const void *const hw)
5154{
5155 uint32_t tmp;
5156 tmp = ((Tcc *)hw)->EVCTRL.reg;
5157 tmp = (tmp & TCC_EVCTRL_MCEO5) >> TCC_EVCTRL_MCEO5_Pos;
5158 return (bool)tmp;
5159}
5160
5161static inline void hri_tcc_write_EVCTRL_MCEO5_bit(const void *const hw, bool value)
5162{
5163 uint32_t tmp;
5164 TCC_CRITICAL_SECTION_ENTER();
5165 tmp = ((Tcc *)hw)->EVCTRL.reg;
5166 tmp &= ~TCC_EVCTRL_MCEO5;
5167 tmp |= value << TCC_EVCTRL_MCEO5_Pos;
5168 ((Tcc *)hw)->EVCTRL.reg = tmp;
5169 TCC_CRITICAL_SECTION_LEAVE();
5170}
5171
5172static inline void hri_tcc_clear_EVCTRL_MCEO5_bit(const void *const hw)
5173{
5174 TCC_CRITICAL_SECTION_ENTER();
5175 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_MCEO5;
5176 TCC_CRITICAL_SECTION_LEAVE();
5177}
5178
5179static inline void hri_tcc_toggle_EVCTRL_MCEO5_bit(const void *const hw)
5180{
5181 TCC_CRITICAL_SECTION_ENTER();
5182 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_MCEO5;
5183 TCC_CRITICAL_SECTION_LEAVE();
5184}
5185
5186static inline void hri_tcc_set_EVCTRL_EVACT0_bf(const void *const hw, hri_tcc_evctrl_reg_t mask)
5187{
5188 TCC_CRITICAL_SECTION_ENTER();
5189 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_EVACT0(mask);
5190 TCC_CRITICAL_SECTION_LEAVE();
5191}
5192
5193static inline hri_tcc_evctrl_reg_t hri_tcc_get_EVCTRL_EVACT0_bf(const void *const hw, hri_tcc_evctrl_reg_t mask)
5194{
5195 uint32_t tmp;
5196 tmp = ((Tcc *)hw)->EVCTRL.reg;
5197 tmp = (tmp & TCC_EVCTRL_EVACT0(mask)) >> TCC_EVCTRL_EVACT0_Pos;
5198 return tmp;
5199}
5200
5201static inline void hri_tcc_write_EVCTRL_EVACT0_bf(const void *const hw, hri_tcc_evctrl_reg_t data)
5202{
5203 uint32_t tmp;
5204 TCC_CRITICAL_SECTION_ENTER();
5205 tmp = ((Tcc *)hw)->EVCTRL.reg;
5206 tmp &= ~TCC_EVCTRL_EVACT0_Msk;
5207 tmp |= TCC_EVCTRL_EVACT0(data);
5208 ((Tcc *)hw)->EVCTRL.reg = tmp;
5209 TCC_CRITICAL_SECTION_LEAVE();
5210}
5211
5212static inline void hri_tcc_clear_EVCTRL_EVACT0_bf(const void *const hw, hri_tcc_evctrl_reg_t mask)
5213{
5214 TCC_CRITICAL_SECTION_ENTER();
5215 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_EVACT0(mask);
5216 TCC_CRITICAL_SECTION_LEAVE();
5217}
5218
5219static inline void hri_tcc_toggle_EVCTRL_EVACT0_bf(const void *const hw, hri_tcc_evctrl_reg_t mask)
5220{
5221 TCC_CRITICAL_SECTION_ENTER();
5222 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_EVACT0(mask);
5223 TCC_CRITICAL_SECTION_LEAVE();
5224}
5225
5226static inline hri_tcc_evctrl_reg_t hri_tcc_read_EVCTRL_EVACT0_bf(const void *const hw)
5227{
5228 uint32_t tmp;
5229 tmp = ((Tcc *)hw)->EVCTRL.reg;
5230 tmp = (tmp & TCC_EVCTRL_EVACT0_Msk) >> TCC_EVCTRL_EVACT0_Pos;
5231 return tmp;
5232}
5233
5234static inline void hri_tcc_set_EVCTRL_EVACT1_bf(const void *const hw, hri_tcc_evctrl_reg_t mask)
5235{
5236 TCC_CRITICAL_SECTION_ENTER();
5237 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_EVACT1(mask);
5238 TCC_CRITICAL_SECTION_LEAVE();
5239}
5240
5241static inline hri_tcc_evctrl_reg_t hri_tcc_get_EVCTRL_EVACT1_bf(const void *const hw, hri_tcc_evctrl_reg_t mask)
5242{
5243 uint32_t tmp;
5244 tmp = ((Tcc *)hw)->EVCTRL.reg;
5245 tmp = (tmp & TCC_EVCTRL_EVACT1(mask)) >> TCC_EVCTRL_EVACT1_Pos;
5246 return tmp;
5247}
5248
5249static inline void hri_tcc_write_EVCTRL_EVACT1_bf(const void *const hw, hri_tcc_evctrl_reg_t data)
5250{
5251 uint32_t tmp;
5252 TCC_CRITICAL_SECTION_ENTER();
5253 tmp = ((Tcc *)hw)->EVCTRL.reg;
5254 tmp &= ~TCC_EVCTRL_EVACT1_Msk;
5255 tmp |= TCC_EVCTRL_EVACT1(data);
5256 ((Tcc *)hw)->EVCTRL.reg = tmp;
5257 TCC_CRITICAL_SECTION_LEAVE();
5258}
5259
5260static inline void hri_tcc_clear_EVCTRL_EVACT1_bf(const void *const hw, hri_tcc_evctrl_reg_t mask)
5261{
5262 TCC_CRITICAL_SECTION_ENTER();
5263 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_EVACT1(mask);
5264 TCC_CRITICAL_SECTION_LEAVE();
5265}
5266
5267static inline void hri_tcc_toggle_EVCTRL_EVACT1_bf(const void *const hw, hri_tcc_evctrl_reg_t mask)
5268{
5269 TCC_CRITICAL_SECTION_ENTER();
5270 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_EVACT1(mask);
5271 TCC_CRITICAL_SECTION_LEAVE();
5272}
5273
5274static inline hri_tcc_evctrl_reg_t hri_tcc_read_EVCTRL_EVACT1_bf(const void *const hw)
5275{
5276 uint32_t tmp;
5277 tmp = ((Tcc *)hw)->EVCTRL.reg;
5278 tmp = (tmp & TCC_EVCTRL_EVACT1_Msk) >> TCC_EVCTRL_EVACT1_Pos;
5279 return tmp;
5280}
5281
5282static inline void hri_tcc_set_EVCTRL_CNTSEL_bf(const void *const hw, hri_tcc_evctrl_reg_t mask)
5283{
5284 TCC_CRITICAL_SECTION_ENTER();
5285 ((Tcc *)hw)->EVCTRL.reg |= TCC_EVCTRL_CNTSEL(mask);
5286 TCC_CRITICAL_SECTION_LEAVE();
5287}
5288
5289static inline hri_tcc_evctrl_reg_t hri_tcc_get_EVCTRL_CNTSEL_bf(const void *const hw, hri_tcc_evctrl_reg_t mask)
5290{
5291 uint32_t tmp;
5292 tmp = ((Tcc *)hw)->EVCTRL.reg;
5293 tmp = (tmp & TCC_EVCTRL_CNTSEL(mask)) >> TCC_EVCTRL_CNTSEL_Pos;
5294 return tmp;
5295}
5296
5297static inline void hri_tcc_write_EVCTRL_CNTSEL_bf(const void *const hw, hri_tcc_evctrl_reg_t data)
5298{
5299 uint32_t tmp;
5300 TCC_CRITICAL_SECTION_ENTER();
5301 tmp = ((Tcc *)hw)->EVCTRL.reg;
5302 tmp &= ~TCC_EVCTRL_CNTSEL_Msk;
5303 tmp |= TCC_EVCTRL_CNTSEL(data);
5304 ((Tcc *)hw)->EVCTRL.reg = tmp;
5305 TCC_CRITICAL_SECTION_LEAVE();
5306}
5307
5308static inline void hri_tcc_clear_EVCTRL_CNTSEL_bf(const void *const hw, hri_tcc_evctrl_reg_t mask)
5309{
5310 TCC_CRITICAL_SECTION_ENTER();
5311 ((Tcc *)hw)->EVCTRL.reg &= ~TCC_EVCTRL_CNTSEL(mask);
5312 TCC_CRITICAL_SECTION_LEAVE();
5313}
5314
5315static inline void hri_tcc_toggle_EVCTRL_CNTSEL_bf(const void *const hw, hri_tcc_evctrl_reg_t mask)
5316{
5317 TCC_CRITICAL_SECTION_ENTER();
5318 ((Tcc *)hw)->EVCTRL.reg ^= TCC_EVCTRL_CNTSEL(mask);
5319 TCC_CRITICAL_SECTION_LEAVE();
5320}
5321
5322static inline hri_tcc_evctrl_reg_t hri_tcc_read_EVCTRL_CNTSEL_bf(const void *const hw)
5323{
5324 uint32_t tmp;
5325 tmp = ((Tcc *)hw)->EVCTRL.reg;
5326 tmp = (tmp & TCC_EVCTRL_CNTSEL_Msk) >> TCC_EVCTRL_CNTSEL_Pos;
5327 return tmp;
5328}
5329
5330static inline void hri_tcc_set_EVCTRL_reg(const void *const hw, hri_tcc_evctrl_reg_t mask)
5331{
5332 TCC_CRITICAL_SECTION_ENTER();
5333 ((Tcc *)hw)->EVCTRL.reg |= mask;
5334 TCC_CRITICAL_SECTION_LEAVE();
5335}
5336
5337static inline hri_tcc_evctrl_reg_t hri_tcc_get_EVCTRL_reg(const void *const hw, hri_tcc_evctrl_reg_t mask)
5338{
5339 uint32_t tmp;
5340 tmp = ((Tcc *)hw)->EVCTRL.reg;
5341 tmp &= mask;
5342 return tmp;
5343}
5344
5345static inline void hri_tcc_write_EVCTRL_reg(const void *const hw, hri_tcc_evctrl_reg_t data)
5346{
5347 TCC_CRITICAL_SECTION_ENTER();
5348 ((Tcc *)hw)->EVCTRL.reg = data;
5349 TCC_CRITICAL_SECTION_LEAVE();
5350}
5351
5352static inline void hri_tcc_clear_EVCTRL_reg(const void *const hw, hri_tcc_evctrl_reg_t mask)
5353{
5354 TCC_CRITICAL_SECTION_ENTER();
5355 ((Tcc *)hw)->EVCTRL.reg &= ~mask;
5356 TCC_CRITICAL_SECTION_LEAVE();
5357}
5358
5359static inline void hri_tcc_toggle_EVCTRL_reg(const void *const hw, hri_tcc_evctrl_reg_t mask)
5360{
5361 TCC_CRITICAL_SECTION_ENTER();
5362 ((Tcc *)hw)->EVCTRL.reg ^= mask;
5363 TCC_CRITICAL_SECTION_LEAVE();
5364}
5365
5366static inline hri_tcc_evctrl_reg_t hri_tcc_read_EVCTRL_reg(const void *const hw)
5367{
5368 return ((Tcc *)hw)->EVCTRL.reg;
5369}
5370
5371static inline void hri_tcc_set_COUNT_DITH6_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5372{
5373 TCC_CRITICAL_SECTION_ENTER();
5374 ((Tcc *)hw)->COUNT.reg |= TCC_COUNT_COUNT(mask);
5375 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5376 TCC_CRITICAL_SECTION_LEAVE();
5377}
5378
5379static inline hri_tcc_count_reg_t hri_tcc_get_COUNT_DITH6_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5380{
5381 uint32_t tmp;
5382 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5383 tmp = ((Tcc *)hw)->COUNT.reg;
5384 tmp = (tmp & TCC_COUNT_COUNT(mask)) >> TCC_COUNT_COUNT_Pos;
5385 return tmp;
5386}
5387
5388static inline void hri_tcc_write_COUNT_DITH6_COUNT_bf(const void *const hw, hri_tcc_count_reg_t data)
5389{
5390 uint32_t tmp;
5391 TCC_CRITICAL_SECTION_ENTER();
5392 tmp = ((Tcc *)hw)->COUNT.reg;
5393 tmp &= ~TCC_COUNT_COUNT_Msk;
5394 tmp |= TCC_COUNT_COUNT(data);
5395 ((Tcc *)hw)->COUNT.reg = tmp;
5396 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5397 TCC_CRITICAL_SECTION_LEAVE();
5398}
5399
5400static inline void hri_tcc_clear_COUNT_DITH6_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5401{
5402 TCC_CRITICAL_SECTION_ENTER();
5403 ((Tcc *)hw)->COUNT.reg &= ~TCC_COUNT_COUNT(mask);
5404 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5405 TCC_CRITICAL_SECTION_LEAVE();
5406}
5407
5408static inline void hri_tcc_toggle_COUNT_DITH6_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5409{
5410 TCC_CRITICAL_SECTION_ENTER();
5411 ((Tcc *)hw)->COUNT.reg ^= TCC_COUNT_COUNT(mask);
5412 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5413 TCC_CRITICAL_SECTION_LEAVE();
5414}
5415
5416static inline hri_tcc_count_reg_t hri_tcc_read_COUNT_DITH6_COUNT_bf(const void *const hw)
5417{
5418 uint32_t tmp;
5419 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5420 tmp = ((Tcc *)hw)->COUNT.reg;
5421 tmp = (tmp & TCC_COUNT_COUNT_Msk) >> TCC_COUNT_COUNT_Pos;
5422 return tmp;
5423}
5424
5425static inline void hri_tcc_set_COUNT_DITH5_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5426{
5427 TCC_CRITICAL_SECTION_ENTER();
5428 ((Tcc *)hw)->COUNT.reg |= TCC_COUNT_COUNT(mask);
5429 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5430 TCC_CRITICAL_SECTION_LEAVE();
5431}
5432
5433static inline hri_tcc_count_reg_t hri_tcc_get_COUNT_DITH5_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5434{
5435 uint32_t tmp;
5436 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5437 tmp = ((Tcc *)hw)->COUNT.reg;
5438 tmp = (tmp & TCC_COUNT_COUNT(mask)) >> TCC_COUNT_COUNT_Pos;
5439 return tmp;
5440}
5441
5442static inline void hri_tcc_write_COUNT_DITH5_COUNT_bf(const void *const hw, hri_tcc_count_reg_t data)
5443{
5444 uint32_t tmp;
5445 TCC_CRITICAL_SECTION_ENTER();
5446 tmp = ((Tcc *)hw)->COUNT.reg;
5447 tmp &= ~TCC_COUNT_COUNT_Msk;
5448 tmp |= TCC_COUNT_COUNT(data);
5449 ((Tcc *)hw)->COUNT.reg = tmp;
5450 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5451 TCC_CRITICAL_SECTION_LEAVE();
5452}
5453
5454static inline void hri_tcc_clear_COUNT_DITH5_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5455{
5456 TCC_CRITICAL_SECTION_ENTER();
5457 ((Tcc *)hw)->COUNT.reg &= ~TCC_COUNT_COUNT(mask);
5458 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5459 TCC_CRITICAL_SECTION_LEAVE();
5460}
5461
5462static inline void hri_tcc_toggle_COUNT_DITH5_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5463{
5464 TCC_CRITICAL_SECTION_ENTER();
5465 ((Tcc *)hw)->COUNT.reg ^= TCC_COUNT_COUNT(mask);
5466 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5467 TCC_CRITICAL_SECTION_LEAVE();
5468}
5469
5470static inline hri_tcc_count_reg_t hri_tcc_read_COUNT_DITH5_COUNT_bf(const void *const hw)
5471{
5472 uint32_t tmp;
5473 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5474 tmp = ((Tcc *)hw)->COUNT.reg;
5475 tmp = (tmp & TCC_COUNT_COUNT_Msk) >> TCC_COUNT_COUNT_Pos;
5476 return tmp;
5477}
5478
5479static inline void hri_tcc_set_COUNT_DITH4_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5480{
5481 TCC_CRITICAL_SECTION_ENTER();
5482 ((Tcc *)hw)->COUNT.reg |= TCC_COUNT_COUNT(mask);
5483 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5484 TCC_CRITICAL_SECTION_LEAVE();
5485}
5486
5487static inline hri_tcc_count_reg_t hri_tcc_get_COUNT_DITH4_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5488{
5489 uint32_t tmp;
5490 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5491 tmp = ((Tcc *)hw)->COUNT.reg;
5492 tmp = (tmp & TCC_COUNT_COUNT(mask)) >> TCC_COUNT_COUNT_Pos;
5493 return tmp;
5494}
5495
5496static inline void hri_tcc_write_COUNT_DITH4_COUNT_bf(const void *const hw, hri_tcc_count_reg_t data)
5497{
5498 uint32_t tmp;
5499 TCC_CRITICAL_SECTION_ENTER();
5500 tmp = ((Tcc *)hw)->COUNT.reg;
5501 tmp &= ~TCC_COUNT_COUNT_Msk;
5502 tmp |= TCC_COUNT_COUNT(data);
5503 ((Tcc *)hw)->COUNT.reg = tmp;
5504 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5505 TCC_CRITICAL_SECTION_LEAVE();
5506}
5507
5508static inline void hri_tcc_clear_COUNT_DITH4_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5509{
5510 TCC_CRITICAL_SECTION_ENTER();
5511 ((Tcc *)hw)->COUNT.reg &= ~TCC_COUNT_COUNT(mask);
5512 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5513 TCC_CRITICAL_SECTION_LEAVE();
5514}
5515
5516static inline void hri_tcc_toggle_COUNT_DITH4_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5517{
5518 TCC_CRITICAL_SECTION_ENTER();
5519 ((Tcc *)hw)->COUNT.reg ^= TCC_COUNT_COUNT(mask);
5520 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5521 TCC_CRITICAL_SECTION_LEAVE();
5522}
5523
5524static inline hri_tcc_count_reg_t hri_tcc_read_COUNT_DITH4_COUNT_bf(const void *const hw)
5525{
5526 uint32_t tmp;
5527 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5528 tmp = ((Tcc *)hw)->COUNT.reg;
5529 tmp = (tmp & TCC_COUNT_COUNT_Msk) >> TCC_COUNT_COUNT_Pos;
5530 return tmp;
5531}
5532
5533static inline void hri_tcc_set_COUNT_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5534{
5535 TCC_CRITICAL_SECTION_ENTER();
5536 ((Tcc *)hw)->COUNT.reg |= TCC_COUNT_COUNT(mask);
5537 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5538 TCC_CRITICAL_SECTION_LEAVE();
5539}
5540
5541static inline hri_tcc_count_reg_t hri_tcc_get_COUNT_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5542{
5543 uint32_t tmp;
5544 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5545 tmp = ((Tcc *)hw)->COUNT.reg;
5546 tmp = (tmp & TCC_COUNT_COUNT(mask)) >> TCC_COUNT_COUNT_Pos;
5547 return tmp;
5548}
5549
5550static inline void hri_tcc_write_COUNT_COUNT_bf(const void *const hw, hri_tcc_count_reg_t data)
5551{
5552 uint32_t tmp;
5553 TCC_CRITICAL_SECTION_ENTER();
5554 tmp = ((Tcc *)hw)->COUNT.reg;
5555 tmp &= ~TCC_COUNT_COUNT_Msk;
5556 tmp |= TCC_COUNT_COUNT(data);
5557 ((Tcc *)hw)->COUNT.reg = tmp;
5558 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5559 TCC_CRITICAL_SECTION_LEAVE();
5560}
5561
5562static inline void hri_tcc_clear_COUNT_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5563{
5564 TCC_CRITICAL_SECTION_ENTER();
5565 ((Tcc *)hw)->COUNT.reg &= ~TCC_COUNT_COUNT(mask);
5566 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5567 TCC_CRITICAL_SECTION_LEAVE();
5568}
5569
5570static inline void hri_tcc_toggle_COUNT_COUNT_bf(const void *const hw, hri_tcc_count_reg_t mask)
5571{
5572 TCC_CRITICAL_SECTION_ENTER();
5573 ((Tcc *)hw)->COUNT.reg ^= TCC_COUNT_COUNT(mask);
5574 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5575 TCC_CRITICAL_SECTION_LEAVE();
5576}
5577
5578static inline hri_tcc_count_reg_t hri_tcc_read_COUNT_COUNT_bf(const void *const hw)
5579{
5580 uint32_t tmp;
5581 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5582 tmp = ((Tcc *)hw)->COUNT.reg;
5583 tmp = (tmp & TCC_COUNT_COUNT_Msk) >> TCC_COUNT_COUNT_Pos;
5584 return tmp;
5585}
5586
5587static inline void hri_tcc_set_COUNT_reg(const void *const hw, hri_tcc_count_reg_t mask)
5588{
5589 TCC_CRITICAL_SECTION_ENTER();
5590 ((Tcc *)hw)->COUNT.reg |= mask;
5591 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5592 TCC_CRITICAL_SECTION_LEAVE();
5593}
5594
5595static inline hri_tcc_count_reg_t hri_tcc_get_COUNT_reg(const void *const hw, hri_tcc_count_reg_t mask)
5596{
5597 uint32_t tmp;
5598 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5599 tmp = ((Tcc *)hw)->COUNT.reg;
5600 tmp &= mask;
5601 return tmp;
5602}
5603
5604static inline void hri_tcc_write_COUNT_reg(const void *const hw, hri_tcc_count_reg_t data)
5605{
5606 TCC_CRITICAL_SECTION_ENTER();
5607 ((Tcc *)hw)->COUNT.reg = data;
5608 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5609 TCC_CRITICAL_SECTION_LEAVE();
5610}
5611
5612static inline void hri_tcc_clear_COUNT_reg(const void *const hw, hri_tcc_count_reg_t mask)
5613{
5614 TCC_CRITICAL_SECTION_ENTER();
5615 ((Tcc *)hw)->COUNT.reg &= ~mask;
5616 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5617 TCC_CRITICAL_SECTION_LEAVE();
5618}
5619
5620static inline void hri_tcc_toggle_COUNT_reg(const void *const hw, hri_tcc_count_reg_t mask)
5621{
5622 TCC_CRITICAL_SECTION_ENTER();
5623 ((Tcc *)hw)->COUNT.reg ^= mask;
5624 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5625 TCC_CRITICAL_SECTION_LEAVE();
5626}
5627
5628static inline hri_tcc_count_reg_t hri_tcc_read_COUNT_reg(const void *const hw)
5629{
5630 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_COUNT);
5631 return ((Tcc *)hw)->COUNT.reg;
5632}
5633
5634static inline void hri_tcc_set_PATT_PGE0_bit(const void *const hw)
5635{
5636 TCC_CRITICAL_SECTION_ENTER();
5637 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGE0;
5638 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5639 TCC_CRITICAL_SECTION_LEAVE();
5640}
5641
5642static inline bool hri_tcc_get_PATT_PGE0_bit(const void *const hw)
5643{
5644 uint16_t tmp;
5645 tmp = ((Tcc *)hw)->PATT.reg;
5646 tmp = (tmp & TCC_PATT_PGE0) >> TCC_PATT_PGE0_Pos;
5647 return (bool)tmp;
5648}
5649
5650static inline void hri_tcc_write_PATT_PGE0_bit(const void *const hw, bool value)
5651{
5652 uint16_t tmp;
5653 TCC_CRITICAL_SECTION_ENTER();
5654 tmp = ((Tcc *)hw)->PATT.reg;
5655 tmp &= ~TCC_PATT_PGE0;
5656 tmp |= value << TCC_PATT_PGE0_Pos;
5657 ((Tcc *)hw)->PATT.reg = tmp;
5658 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5659 TCC_CRITICAL_SECTION_LEAVE();
5660}
5661
5662static inline void hri_tcc_clear_PATT_PGE0_bit(const void *const hw)
5663{
5664 TCC_CRITICAL_SECTION_ENTER();
5665 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGE0;
5666 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5667 TCC_CRITICAL_SECTION_LEAVE();
5668}
5669
5670static inline void hri_tcc_toggle_PATT_PGE0_bit(const void *const hw)
5671{
5672 TCC_CRITICAL_SECTION_ENTER();
5673 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGE0;
5674 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5675 TCC_CRITICAL_SECTION_LEAVE();
5676}
5677
5678static inline void hri_tcc_set_PATT_PGE1_bit(const void *const hw)
5679{
5680 TCC_CRITICAL_SECTION_ENTER();
5681 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGE1;
5682 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5683 TCC_CRITICAL_SECTION_LEAVE();
5684}
5685
5686static inline bool hri_tcc_get_PATT_PGE1_bit(const void *const hw)
5687{
5688 uint16_t tmp;
5689 tmp = ((Tcc *)hw)->PATT.reg;
5690 tmp = (tmp & TCC_PATT_PGE1) >> TCC_PATT_PGE1_Pos;
5691 return (bool)tmp;
5692}
5693
5694static inline void hri_tcc_write_PATT_PGE1_bit(const void *const hw, bool value)
5695{
5696 uint16_t tmp;
5697 TCC_CRITICAL_SECTION_ENTER();
5698 tmp = ((Tcc *)hw)->PATT.reg;
5699 tmp &= ~TCC_PATT_PGE1;
5700 tmp |= value << TCC_PATT_PGE1_Pos;
5701 ((Tcc *)hw)->PATT.reg = tmp;
5702 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5703 TCC_CRITICAL_SECTION_LEAVE();
5704}
5705
5706static inline void hri_tcc_clear_PATT_PGE1_bit(const void *const hw)
5707{
5708 TCC_CRITICAL_SECTION_ENTER();
5709 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGE1;
5710 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5711 TCC_CRITICAL_SECTION_LEAVE();
5712}
5713
5714static inline void hri_tcc_toggle_PATT_PGE1_bit(const void *const hw)
5715{
5716 TCC_CRITICAL_SECTION_ENTER();
5717 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGE1;
5718 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5719 TCC_CRITICAL_SECTION_LEAVE();
5720}
5721
5722static inline void hri_tcc_set_PATT_PGE2_bit(const void *const hw)
5723{
5724 TCC_CRITICAL_SECTION_ENTER();
5725 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGE2;
5726 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5727 TCC_CRITICAL_SECTION_LEAVE();
5728}
5729
5730static inline bool hri_tcc_get_PATT_PGE2_bit(const void *const hw)
5731{
5732 uint16_t tmp;
5733 tmp = ((Tcc *)hw)->PATT.reg;
5734 tmp = (tmp & TCC_PATT_PGE2) >> TCC_PATT_PGE2_Pos;
5735 return (bool)tmp;
5736}
5737
5738static inline void hri_tcc_write_PATT_PGE2_bit(const void *const hw, bool value)
5739{
5740 uint16_t tmp;
5741 TCC_CRITICAL_SECTION_ENTER();
5742 tmp = ((Tcc *)hw)->PATT.reg;
5743 tmp &= ~TCC_PATT_PGE2;
5744 tmp |= value << TCC_PATT_PGE2_Pos;
5745 ((Tcc *)hw)->PATT.reg = tmp;
5746 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5747 TCC_CRITICAL_SECTION_LEAVE();
5748}
5749
5750static inline void hri_tcc_clear_PATT_PGE2_bit(const void *const hw)
5751{
5752 TCC_CRITICAL_SECTION_ENTER();
5753 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGE2;
5754 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5755 TCC_CRITICAL_SECTION_LEAVE();
5756}
5757
5758static inline void hri_tcc_toggle_PATT_PGE2_bit(const void *const hw)
5759{
5760 TCC_CRITICAL_SECTION_ENTER();
5761 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGE2;
5762 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5763 TCC_CRITICAL_SECTION_LEAVE();
5764}
5765
5766static inline void hri_tcc_set_PATT_PGE3_bit(const void *const hw)
5767{
5768 TCC_CRITICAL_SECTION_ENTER();
5769 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGE3;
5770 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5771 TCC_CRITICAL_SECTION_LEAVE();
5772}
5773
5774static inline bool hri_tcc_get_PATT_PGE3_bit(const void *const hw)
5775{
5776 uint16_t tmp;
5777 tmp = ((Tcc *)hw)->PATT.reg;
5778 tmp = (tmp & TCC_PATT_PGE3) >> TCC_PATT_PGE3_Pos;
5779 return (bool)tmp;
5780}
5781
5782static inline void hri_tcc_write_PATT_PGE3_bit(const void *const hw, bool value)
5783{
5784 uint16_t tmp;
5785 TCC_CRITICAL_SECTION_ENTER();
5786 tmp = ((Tcc *)hw)->PATT.reg;
5787 tmp &= ~TCC_PATT_PGE3;
5788 tmp |= value << TCC_PATT_PGE3_Pos;
5789 ((Tcc *)hw)->PATT.reg = tmp;
5790 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5791 TCC_CRITICAL_SECTION_LEAVE();
5792}
5793
5794static inline void hri_tcc_clear_PATT_PGE3_bit(const void *const hw)
5795{
5796 TCC_CRITICAL_SECTION_ENTER();
5797 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGE3;
5798 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5799 TCC_CRITICAL_SECTION_LEAVE();
5800}
5801
5802static inline void hri_tcc_toggle_PATT_PGE3_bit(const void *const hw)
5803{
5804 TCC_CRITICAL_SECTION_ENTER();
5805 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGE3;
5806 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5807 TCC_CRITICAL_SECTION_LEAVE();
5808}
5809
5810static inline void hri_tcc_set_PATT_PGE4_bit(const void *const hw)
5811{
5812 TCC_CRITICAL_SECTION_ENTER();
5813 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGE4;
5814 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5815 TCC_CRITICAL_SECTION_LEAVE();
5816}
5817
5818static inline bool hri_tcc_get_PATT_PGE4_bit(const void *const hw)
5819{
5820 uint16_t tmp;
5821 tmp = ((Tcc *)hw)->PATT.reg;
5822 tmp = (tmp & TCC_PATT_PGE4) >> TCC_PATT_PGE4_Pos;
5823 return (bool)tmp;
5824}
5825
5826static inline void hri_tcc_write_PATT_PGE4_bit(const void *const hw, bool value)
5827{
5828 uint16_t tmp;
5829 TCC_CRITICAL_SECTION_ENTER();
5830 tmp = ((Tcc *)hw)->PATT.reg;
5831 tmp &= ~TCC_PATT_PGE4;
5832 tmp |= value << TCC_PATT_PGE4_Pos;
5833 ((Tcc *)hw)->PATT.reg = tmp;
5834 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5835 TCC_CRITICAL_SECTION_LEAVE();
5836}
5837
5838static inline void hri_tcc_clear_PATT_PGE4_bit(const void *const hw)
5839{
5840 TCC_CRITICAL_SECTION_ENTER();
5841 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGE4;
5842 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5843 TCC_CRITICAL_SECTION_LEAVE();
5844}
5845
5846static inline void hri_tcc_toggle_PATT_PGE4_bit(const void *const hw)
5847{
5848 TCC_CRITICAL_SECTION_ENTER();
5849 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGE4;
5850 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5851 TCC_CRITICAL_SECTION_LEAVE();
5852}
5853
5854static inline void hri_tcc_set_PATT_PGE5_bit(const void *const hw)
5855{
5856 TCC_CRITICAL_SECTION_ENTER();
5857 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGE5;
5858 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5859 TCC_CRITICAL_SECTION_LEAVE();
5860}
5861
5862static inline bool hri_tcc_get_PATT_PGE5_bit(const void *const hw)
5863{
5864 uint16_t tmp;
5865 tmp = ((Tcc *)hw)->PATT.reg;
5866 tmp = (tmp & TCC_PATT_PGE5) >> TCC_PATT_PGE5_Pos;
5867 return (bool)tmp;
5868}
5869
5870static inline void hri_tcc_write_PATT_PGE5_bit(const void *const hw, bool value)
5871{
5872 uint16_t tmp;
5873 TCC_CRITICAL_SECTION_ENTER();
5874 tmp = ((Tcc *)hw)->PATT.reg;
5875 tmp &= ~TCC_PATT_PGE5;
5876 tmp |= value << TCC_PATT_PGE5_Pos;
5877 ((Tcc *)hw)->PATT.reg = tmp;
5878 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5879 TCC_CRITICAL_SECTION_LEAVE();
5880}
5881
5882static inline void hri_tcc_clear_PATT_PGE5_bit(const void *const hw)
5883{
5884 TCC_CRITICAL_SECTION_ENTER();
5885 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGE5;
5886 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5887 TCC_CRITICAL_SECTION_LEAVE();
5888}
5889
5890static inline void hri_tcc_toggle_PATT_PGE5_bit(const void *const hw)
5891{
5892 TCC_CRITICAL_SECTION_ENTER();
5893 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGE5;
5894 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5895 TCC_CRITICAL_SECTION_LEAVE();
5896}
5897
5898static inline void hri_tcc_set_PATT_PGE6_bit(const void *const hw)
5899{
5900 TCC_CRITICAL_SECTION_ENTER();
5901 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGE6;
5902 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5903 TCC_CRITICAL_SECTION_LEAVE();
5904}
5905
5906static inline bool hri_tcc_get_PATT_PGE6_bit(const void *const hw)
5907{
5908 uint16_t tmp;
5909 tmp = ((Tcc *)hw)->PATT.reg;
5910 tmp = (tmp & TCC_PATT_PGE6) >> TCC_PATT_PGE6_Pos;
5911 return (bool)tmp;
5912}
5913
5914static inline void hri_tcc_write_PATT_PGE6_bit(const void *const hw, bool value)
5915{
5916 uint16_t tmp;
5917 TCC_CRITICAL_SECTION_ENTER();
5918 tmp = ((Tcc *)hw)->PATT.reg;
5919 tmp &= ~TCC_PATT_PGE6;
5920 tmp |= value << TCC_PATT_PGE6_Pos;
5921 ((Tcc *)hw)->PATT.reg = tmp;
5922 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5923 TCC_CRITICAL_SECTION_LEAVE();
5924}
5925
5926static inline void hri_tcc_clear_PATT_PGE6_bit(const void *const hw)
5927{
5928 TCC_CRITICAL_SECTION_ENTER();
5929 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGE6;
5930 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5931 TCC_CRITICAL_SECTION_LEAVE();
5932}
5933
5934static inline void hri_tcc_toggle_PATT_PGE6_bit(const void *const hw)
5935{
5936 TCC_CRITICAL_SECTION_ENTER();
5937 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGE6;
5938 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5939 TCC_CRITICAL_SECTION_LEAVE();
5940}
5941
5942static inline void hri_tcc_set_PATT_PGE7_bit(const void *const hw)
5943{
5944 TCC_CRITICAL_SECTION_ENTER();
5945 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGE7;
5946 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5947 TCC_CRITICAL_SECTION_LEAVE();
5948}
5949
5950static inline bool hri_tcc_get_PATT_PGE7_bit(const void *const hw)
5951{
5952 uint16_t tmp;
5953 tmp = ((Tcc *)hw)->PATT.reg;
5954 tmp = (tmp & TCC_PATT_PGE7) >> TCC_PATT_PGE7_Pos;
5955 return (bool)tmp;
5956}
5957
5958static inline void hri_tcc_write_PATT_PGE7_bit(const void *const hw, bool value)
5959{
5960 uint16_t tmp;
5961 TCC_CRITICAL_SECTION_ENTER();
5962 tmp = ((Tcc *)hw)->PATT.reg;
5963 tmp &= ~TCC_PATT_PGE7;
5964 tmp |= value << TCC_PATT_PGE7_Pos;
5965 ((Tcc *)hw)->PATT.reg = tmp;
5966 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5967 TCC_CRITICAL_SECTION_LEAVE();
5968}
5969
5970static inline void hri_tcc_clear_PATT_PGE7_bit(const void *const hw)
5971{
5972 TCC_CRITICAL_SECTION_ENTER();
5973 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGE7;
5974 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5975 TCC_CRITICAL_SECTION_LEAVE();
5976}
5977
5978static inline void hri_tcc_toggle_PATT_PGE7_bit(const void *const hw)
5979{
5980 TCC_CRITICAL_SECTION_ENTER();
5981 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGE7;
5982 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5983 TCC_CRITICAL_SECTION_LEAVE();
5984}
5985
5986static inline void hri_tcc_set_PATT_PGV0_bit(const void *const hw)
5987{
5988 TCC_CRITICAL_SECTION_ENTER();
5989 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGV0;
5990 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
5991 TCC_CRITICAL_SECTION_LEAVE();
5992}
5993
5994static inline bool hri_tcc_get_PATT_PGV0_bit(const void *const hw)
5995{
5996 uint16_t tmp;
5997 tmp = ((Tcc *)hw)->PATT.reg;
5998 tmp = (tmp & TCC_PATT_PGV0) >> TCC_PATT_PGV0_Pos;
5999 return (bool)tmp;
6000}
6001
6002static inline void hri_tcc_write_PATT_PGV0_bit(const void *const hw, bool value)
6003{
6004 uint16_t tmp;
6005 TCC_CRITICAL_SECTION_ENTER();
6006 tmp = ((Tcc *)hw)->PATT.reg;
6007 tmp &= ~TCC_PATT_PGV0;
6008 tmp |= value << TCC_PATT_PGV0_Pos;
6009 ((Tcc *)hw)->PATT.reg = tmp;
6010 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6011 TCC_CRITICAL_SECTION_LEAVE();
6012}
6013
6014static inline void hri_tcc_clear_PATT_PGV0_bit(const void *const hw)
6015{
6016 TCC_CRITICAL_SECTION_ENTER();
6017 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGV0;
6018 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6019 TCC_CRITICAL_SECTION_LEAVE();
6020}
6021
6022static inline void hri_tcc_toggle_PATT_PGV0_bit(const void *const hw)
6023{
6024 TCC_CRITICAL_SECTION_ENTER();
6025 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGV0;
6026 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6027 TCC_CRITICAL_SECTION_LEAVE();
6028}
6029
6030static inline void hri_tcc_set_PATT_PGV1_bit(const void *const hw)
6031{
6032 TCC_CRITICAL_SECTION_ENTER();
6033 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGV1;
6034 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6035 TCC_CRITICAL_SECTION_LEAVE();
6036}
6037
6038static inline bool hri_tcc_get_PATT_PGV1_bit(const void *const hw)
6039{
6040 uint16_t tmp;
6041 tmp = ((Tcc *)hw)->PATT.reg;
6042 tmp = (tmp & TCC_PATT_PGV1) >> TCC_PATT_PGV1_Pos;
6043 return (bool)tmp;
6044}
6045
6046static inline void hri_tcc_write_PATT_PGV1_bit(const void *const hw, bool value)
6047{
6048 uint16_t tmp;
6049 TCC_CRITICAL_SECTION_ENTER();
6050 tmp = ((Tcc *)hw)->PATT.reg;
6051 tmp &= ~TCC_PATT_PGV1;
6052 tmp |= value << TCC_PATT_PGV1_Pos;
6053 ((Tcc *)hw)->PATT.reg = tmp;
6054 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6055 TCC_CRITICAL_SECTION_LEAVE();
6056}
6057
6058static inline void hri_tcc_clear_PATT_PGV1_bit(const void *const hw)
6059{
6060 TCC_CRITICAL_SECTION_ENTER();
6061 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGV1;
6062 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6063 TCC_CRITICAL_SECTION_LEAVE();
6064}
6065
6066static inline void hri_tcc_toggle_PATT_PGV1_bit(const void *const hw)
6067{
6068 TCC_CRITICAL_SECTION_ENTER();
6069 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGV1;
6070 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6071 TCC_CRITICAL_SECTION_LEAVE();
6072}
6073
6074static inline void hri_tcc_set_PATT_PGV2_bit(const void *const hw)
6075{
6076 TCC_CRITICAL_SECTION_ENTER();
6077 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGV2;
6078 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6079 TCC_CRITICAL_SECTION_LEAVE();
6080}
6081
6082static inline bool hri_tcc_get_PATT_PGV2_bit(const void *const hw)
6083{
6084 uint16_t tmp;
6085 tmp = ((Tcc *)hw)->PATT.reg;
6086 tmp = (tmp & TCC_PATT_PGV2) >> TCC_PATT_PGV2_Pos;
6087 return (bool)tmp;
6088}
6089
6090static inline void hri_tcc_write_PATT_PGV2_bit(const void *const hw, bool value)
6091{
6092 uint16_t tmp;
6093 TCC_CRITICAL_SECTION_ENTER();
6094 tmp = ((Tcc *)hw)->PATT.reg;
6095 tmp &= ~TCC_PATT_PGV2;
6096 tmp |= value << TCC_PATT_PGV2_Pos;
6097 ((Tcc *)hw)->PATT.reg = tmp;
6098 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6099 TCC_CRITICAL_SECTION_LEAVE();
6100}
6101
6102static inline void hri_tcc_clear_PATT_PGV2_bit(const void *const hw)
6103{
6104 TCC_CRITICAL_SECTION_ENTER();
6105 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGV2;
6106 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6107 TCC_CRITICAL_SECTION_LEAVE();
6108}
6109
6110static inline void hri_tcc_toggle_PATT_PGV2_bit(const void *const hw)
6111{
6112 TCC_CRITICAL_SECTION_ENTER();
6113 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGV2;
6114 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6115 TCC_CRITICAL_SECTION_LEAVE();
6116}
6117
6118static inline void hri_tcc_set_PATT_PGV3_bit(const void *const hw)
6119{
6120 TCC_CRITICAL_SECTION_ENTER();
6121 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGV3;
6122 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6123 TCC_CRITICAL_SECTION_LEAVE();
6124}
6125
6126static inline bool hri_tcc_get_PATT_PGV3_bit(const void *const hw)
6127{
6128 uint16_t tmp;
6129 tmp = ((Tcc *)hw)->PATT.reg;
6130 tmp = (tmp & TCC_PATT_PGV3) >> TCC_PATT_PGV3_Pos;
6131 return (bool)tmp;
6132}
6133
6134static inline void hri_tcc_write_PATT_PGV3_bit(const void *const hw, bool value)
6135{
6136 uint16_t tmp;
6137 TCC_CRITICAL_SECTION_ENTER();
6138 tmp = ((Tcc *)hw)->PATT.reg;
6139 tmp &= ~TCC_PATT_PGV3;
6140 tmp |= value << TCC_PATT_PGV3_Pos;
6141 ((Tcc *)hw)->PATT.reg = tmp;
6142 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6143 TCC_CRITICAL_SECTION_LEAVE();
6144}
6145
6146static inline void hri_tcc_clear_PATT_PGV3_bit(const void *const hw)
6147{
6148 TCC_CRITICAL_SECTION_ENTER();
6149 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGV3;
6150 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6151 TCC_CRITICAL_SECTION_LEAVE();
6152}
6153
6154static inline void hri_tcc_toggle_PATT_PGV3_bit(const void *const hw)
6155{
6156 TCC_CRITICAL_SECTION_ENTER();
6157 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGV3;
6158 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6159 TCC_CRITICAL_SECTION_LEAVE();
6160}
6161
6162static inline void hri_tcc_set_PATT_PGV4_bit(const void *const hw)
6163{
6164 TCC_CRITICAL_SECTION_ENTER();
6165 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGV4;
6166 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6167 TCC_CRITICAL_SECTION_LEAVE();
6168}
6169
6170static inline bool hri_tcc_get_PATT_PGV4_bit(const void *const hw)
6171{
6172 uint16_t tmp;
6173 tmp = ((Tcc *)hw)->PATT.reg;
6174 tmp = (tmp & TCC_PATT_PGV4) >> TCC_PATT_PGV4_Pos;
6175 return (bool)tmp;
6176}
6177
6178static inline void hri_tcc_write_PATT_PGV4_bit(const void *const hw, bool value)
6179{
6180 uint16_t tmp;
6181 TCC_CRITICAL_SECTION_ENTER();
6182 tmp = ((Tcc *)hw)->PATT.reg;
6183 tmp &= ~TCC_PATT_PGV4;
6184 tmp |= value << TCC_PATT_PGV4_Pos;
6185 ((Tcc *)hw)->PATT.reg = tmp;
6186 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6187 TCC_CRITICAL_SECTION_LEAVE();
6188}
6189
6190static inline void hri_tcc_clear_PATT_PGV4_bit(const void *const hw)
6191{
6192 TCC_CRITICAL_SECTION_ENTER();
6193 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGV4;
6194 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6195 TCC_CRITICAL_SECTION_LEAVE();
6196}
6197
6198static inline void hri_tcc_toggle_PATT_PGV4_bit(const void *const hw)
6199{
6200 TCC_CRITICAL_SECTION_ENTER();
6201 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGV4;
6202 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6203 TCC_CRITICAL_SECTION_LEAVE();
6204}
6205
6206static inline void hri_tcc_set_PATT_PGV5_bit(const void *const hw)
6207{
6208 TCC_CRITICAL_SECTION_ENTER();
6209 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGV5;
6210 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6211 TCC_CRITICAL_SECTION_LEAVE();
6212}
6213
6214static inline bool hri_tcc_get_PATT_PGV5_bit(const void *const hw)
6215{
6216 uint16_t tmp;
6217 tmp = ((Tcc *)hw)->PATT.reg;
6218 tmp = (tmp & TCC_PATT_PGV5) >> TCC_PATT_PGV5_Pos;
6219 return (bool)tmp;
6220}
6221
6222static inline void hri_tcc_write_PATT_PGV5_bit(const void *const hw, bool value)
6223{
6224 uint16_t tmp;
6225 TCC_CRITICAL_SECTION_ENTER();
6226 tmp = ((Tcc *)hw)->PATT.reg;
6227 tmp &= ~TCC_PATT_PGV5;
6228 tmp |= value << TCC_PATT_PGV5_Pos;
6229 ((Tcc *)hw)->PATT.reg = tmp;
6230 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6231 TCC_CRITICAL_SECTION_LEAVE();
6232}
6233
6234static inline void hri_tcc_clear_PATT_PGV5_bit(const void *const hw)
6235{
6236 TCC_CRITICAL_SECTION_ENTER();
6237 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGV5;
6238 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6239 TCC_CRITICAL_SECTION_LEAVE();
6240}
6241
6242static inline void hri_tcc_toggle_PATT_PGV5_bit(const void *const hw)
6243{
6244 TCC_CRITICAL_SECTION_ENTER();
6245 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGV5;
6246 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6247 TCC_CRITICAL_SECTION_LEAVE();
6248}
6249
6250static inline void hri_tcc_set_PATT_PGV6_bit(const void *const hw)
6251{
6252 TCC_CRITICAL_SECTION_ENTER();
6253 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGV6;
6254 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6255 TCC_CRITICAL_SECTION_LEAVE();
6256}
6257
6258static inline bool hri_tcc_get_PATT_PGV6_bit(const void *const hw)
6259{
6260 uint16_t tmp;
6261 tmp = ((Tcc *)hw)->PATT.reg;
6262 tmp = (tmp & TCC_PATT_PGV6) >> TCC_PATT_PGV6_Pos;
6263 return (bool)tmp;
6264}
6265
6266static inline void hri_tcc_write_PATT_PGV6_bit(const void *const hw, bool value)
6267{
6268 uint16_t tmp;
6269 TCC_CRITICAL_SECTION_ENTER();
6270 tmp = ((Tcc *)hw)->PATT.reg;
6271 tmp &= ~TCC_PATT_PGV6;
6272 tmp |= value << TCC_PATT_PGV6_Pos;
6273 ((Tcc *)hw)->PATT.reg = tmp;
6274 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6275 TCC_CRITICAL_SECTION_LEAVE();
6276}
6277
6278static inline void hri_tcc_clear_PATT_PGV6_bit(const void *const hw)
6279{
6280 TCC_CRITICAL_SECTION_ENTER();
6281 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGV6;
6282 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6283 TCC_CRITICAL_SECTION_LEAVE();
6284}
6285
6286static inline void hri_tcc_toggle_PATT_PGV6_bit(const void *const hw)
6287{
6288 TCC_CRITICAL_SECTION_ENTER();
6289 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGV6;
6290 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6291 TCC_CRITICAL_SECTION_LEAVE();
6292}
6293
6294static inline void hri_tcc_set_PATT_PGV7_bit(const void *const hw)
6295{
6296 TCC_CRITICAL_SECTION_ENTER();
6297 ((Tcc *)hw)->PATT.reg |= TCC_PATT_PGV7;
6298 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6299 TCC_CRITICAL_SECTION_LEAVE();
6300}
6301
6302static inline bool hri_tcc_get_PATT_PGV7_bit(const void *const hw)
6303{
6304 uint16_t tmp;
6305 tmp = ((Tcc *)hw)->PATT.reg;
6306 tmp = (tmp & TCC_PATT_PGV7) >> TCC_PATT_PGV7_Pos;
6307 return (bool)tmp;
6308}
6309
6310static inline void hri_tcc_write_PATT_PGV7_bit(const void *const hw, bool value)
6311{
6312 uint16_t tmp;
6313 TCC_CRITICAL_SECTION_ENTER();
6314 tmp = ((Tcc *)hw)->PATT.reg;
6315 tmp &= ~TCC_PATT_PGV7;
6316 tmp |= value << TCC_PATT_PGV7_Pos;
6317 ((Tcc *)hw)->PATT.reg = tmp;
6318 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6319 TCC_CRITICAL_SECTION_LEAVE();
6320}
6321
6322static inline void hri_tcc_clear_PATT_PGV7_bit(const void *const hw)
6323{
6324 TCC_CRITICAL_SECTION_ENTER();
6325 ((Tcc *)hw)->PATT.reg &= ~TCC_PATT_PGV7;
6326 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6327 TCC_CRITICAL_SECTION_LEAVE();
6328}
6329
6330static inline void hri_tcc_toggle_PATT_PGV7_bit(const void *const hw)
6331{
6332 TCC_CRITICAL_SECTION_ENTER();
6333 ((Tcc *)hw)->PATT.reg ^= TCC_PATT_PGV7;
6334 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6335 TCC_CRITICAL_SECTION_LEAVE();
6336}
6337
6338static inline void hri_tcc_set_PATT_reg(const void *const hw, hri_tcc_patt_reg_t mask)
6339{
6340 TCC_CRITICAL_SECTION_ENTER();
6341 ((Tcc *)hw)->PATT.reg |= mask;
6342 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6343 TCC_CRITICAL_SECTION_LEAVE();
6344}
6345
6346static inline hri_tcc_patt_reg_t hri_tcc_get_PATT_reg(const void *const hw, hri_tcc_patt_reg_t mask)
6347{
6348 uint16_t tmp;
6349 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6350 tmp = ((Tcc *)hw)->PATT.reg;
6351 tmp &= mask;
6352 return tmp;
6353}
6354
6355static inline void hri_tcc_write_PATT_reg(const void *const hw, hri_tcc_patt_reg_t data)
6356{
6357 TCC_CRITICAL_SECTION_ENTER();
6358 ((Tcc *)hw)->PATT.reg = data;
6359 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6360 TCC_CRITICAL_SECTION_LEAVE();
6361}
6362
6363static inline void hri_tcc_clear_PATT_reg(const void *const hw, hri_tcc_patt_reg_t mask)
6364{
6365 TCC_CRITICAL_SECTION_ENTER();
6366 ((Tcc *)hw)->PATT.reg &= ~mask;
6367 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6368 TCC_CRITICAL_SECTION_LEAVE();
6369}
6370
6371static inline void hri_tcc_toggle_PATT_reg(const void *const hw, hri_tcc_patt_reg_t mask)
6372{
6373 TCC_CRITICAL_SECTION_ENTER();
6374 ((Tcc *)hw)->PATT.reg ^= mask;
6375 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6376 TCC_CRITICAL_SECTION_LEAVE();
6377}
6378
6379static inline hri_tcc_patt_reg_t hri_tcc_read_PATT_reg(const void *const hw)
6380{
6381 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6382 return ((Tcc *)hw)->PATT.reg;
6383}
6384
6385static inline void hri_tcc_set_WAVE_CIPEREN_bit(const void *const hw)
6386{
6387 TCC_CRITICAL_SECTION_ENTER();
6388 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_CIPEREN;
6389 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6390 TCC_CRITICAL_SECTION_LEAVE();
6391}
6392
6393static inline bool hri_tcc_get_WAVE_CIPEREN_bit(const void *const hw)
6394{
6395 uint32_t tmp;
6396 tmp = ((Tcc *)hw)->WAVE.reg;
6397 tmp = (tmp & TCC_WAVE_CIPEREN) >> TCC_WAVE_CIPEREN_Pos;
6398 return (bool)tmp;
6399}
6400
6401static inline void hri_tcc_write_WAVE_CIPEREN_bit(const void *const hw, bool value)
6402{
6403 uint32_t tmp;
6404 TCC_CRITICAL_SECTION_ENTER();
6405 tmp = ((Tcc *)hw)->WAVE.reg;
6406 tmp &= ~TCC_WAVE_CIPEREN;
6407 tmp |= value << TCC_WAVE_CIPEREN_Pos;
6408 ((Tcc *)hw)->WAVE.reg = tmp;
6409 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6410 TCC_CRITICAL_SECTION_LEAVE();
6411}
6412
6413static inline void hri_tcc_clear_WAVE_CIPEREN_bit(const void *const hw)
6414{
6415 TCC_CRITICAL_SECTION_ENTER();
6416 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_CIPEREN;
6417 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6418 TCC_CRITICAL_SECTION_LEAVE();
6419}
6420
6421static inline void hri_tcc_toggle_WAVE_CIPEREN_bit(const void *const hw)
6422{
6423 TCC_CRITICAL_SECTION_ENTER();
6424 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_CIPEREN;
6425 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6426 TCC_CRITICAL_SECTION_LEAVE();
6427}
6428
6429static inline void hri_tcc_set_WAVE_CICCEN0_bit(const void *const hw)
6430{
6431 TCC_CRITICAL_SECTION_ENTER();
6432 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_CICCEN0;
6433 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6434 TCC_CRITICAL_SECTION_LEAVE();
6435}
6436
6437static inline bool hri_tcc_get_WAVE_CICCEN0_bit(const void *const hw)
6438{
6439 uint32_t tmp;
6440 tmp = ((Tcc *)hw)->WAVE.reg;
6441 tmp = (tmp & TCC_WAVE_CICCEN0) >> TCC_WAVE_CICCEN0_Pos;
6442 return (bool)tmp;
6443}
6444
6445static inline void hri_tcc_write_WAVE_CICCEN0_bit(const void *const hw, bool value)
6446{
6447 uint32_t tmp;
6448 TCC_CRITICAL_SECTION_ENTER();
6449 tmp = ((Tcc *)hw)->WAVE.reg;
6450 tmp &= ~TCC_WAVE_CICCEN0;
6451 tmp |= value << TCC_WAVE_CICCEN0_Pos;
6452 ((Tcc *)hw)->WAVE.reg = tmp;
6453 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6454 TCC_CRITICAL_SECTION_LEAVE();
6455}
6456
6457static inline void hri_tcc_clear_WAVE_CICCEN0_bit(const void *const hw)
6458{
6459 TCC_CRITICAL_SECTION_ENTER();
6460 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_CICCEN0;
6461 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6462 TCC_CRITICAL_SECTION_LEAVE();
6463}
6464
6465static inline void hri_tcc_toggle_WAVE_CICCEN0_bit(const void *const hw)
6466{
6467 TCC_CRITICAL_SECTION_ENTER();
6468 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_CICCEN0;
6469 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6470 TCC_CRITICAL_SECTION_LEAVE();
6471}
6472
6473static inline void hri_tcc_set_WAVE_CICCEN1_bit(const void *const hw)
6474{
6475 TCC_CRITICAL_SECTION_ENTER();
6476 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_CICCEN1;
6477 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6478 TCC_CRITICAL_SECTION_LEAVE();
6479}
6480
6481static inline bool hri_tcc_get_WAVE_CICCEN1_bit(const void *const hw)
6482{
6483 uint32_t tmp;
6484 tmp = ((Tcc *)hw)->WAVE.reg;
6485 tmp = (tmp & TCC_WAVE_CICCEN1) >> TCC_WAVE_CICCEN1_Pos;
6486 return (bool)tmp;
6487}
6488
6489static inline void hri_tcc_write_WAVE_CICCEN1_bit(const void *const hw, bool value)
6490{
6491 uint32_t tmp;
6492 TCC_CRITICAL_SECTION_ENTER();
6493 tmp = ((Tcc *)hw)->WAVE.reg;
6494 tmp &= ~TCC_WAVE_CICCEN1;
6495 tmp |= value << TCC_WAVE_CICCEN1_Pos;
6496 ((Tcc *)hw)->WAVE.reg = tmp;
6497 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6498 TCC_CRITICAL_SECTION_LEAVE();
6499}
6500
6501static inline void hri_tcc_clear_WAVE_CICCEN1_bit(const void *const hw)
6502{
6503 TCC_CRITICAL_SECTION_ENTER();
6504 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_CICCEN1;
6505 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6506 TCC_CRITICAL_SECTION_LEAVE();
6507}
6508
6509static inline void hri_tcc_toggle_WAVE_CICCEN1_bit(const void *const hw)
6510{
6511 TCC_CRITICAL_SECTION_ENTER();
6512 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_CICCEN1;
6513 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6514 TCC_CRITICAL_SECTION_LEAVE();
6515}
6516
6517static inline void hri_tcc_set_WAVE_CICCEN2_bit(const void *const hw)
6518{
6519 TCC_CRITICAL_SECTION_ENTER();
6520 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_CICCEN2;
6521 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6522 TCC_CRITICAL_SECTION_LEAVE();
6523}
6524
6525static inline bool hri_tcc_get_WAVE_CICCEN2_bit(const void *const hw)
6526{
6527 uint32_t tmp;
6528 tmp = ((Tcc *)hw)->WAVE.reg;
6529 tmp = (tmp & TCC_WAVE_CICCEN2) >> TCC_WAVE_CICCEN2_Pos;
6530 return (bool)tmp;
6531}
6532
6533static inline void hri_tcc_write_WAVE_CICCEN2_bit(const void *const hw, bool value)
6534{
6535 uint32_t tmp;
6536 TCC_CRITICAL_SECTION_ENTER();
6537 tmp = ((Tcc *)hw)->WAVE.reg;
6538 tmp &= ~TCC_WAVE_CICCEN2;
6539 tmp |= value << TCC_WAVE_CICCEN2_Pos;
6540 ((Tcc *)hw)->WAVE.reg = tmp;
6541 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6542 TCC_CRITICAL_SECTION_LEAVE();
6543}
6544
6545static inline void hri_tcc_clear_WAVE_CICCEN2_bit(const void *const hw)
6546{
6547 TCC_CRITICAL_SECTION_ENTER();
6548 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_CICCEN2;
6549 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6550 TCC_CRITICAL_SECTION_LEAVE();
6551}
6552
6553static inline void hri_tcc_toggle_WAVE_CICCEN2_bit(const void *const hw)
6554{
6555 TCC_CRITICAL_SECTION_ENTER();
6556 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_CICCEN2;
6557 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6558 TCC_CRITICAL_SECTION_LEAVE();
6559}
6560
6561static inline void hri_tcc_set_WAVE_CICCEN3_bit(const void *const hw)
6562{
6563 TCC_CRITICAL_SECTION_ENTER();
6564 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_CICCEN3;
6565 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6566 TCC_CRITICAL_SECTION_LEAVE();
6567}
6568
6569static inline bool hri_tcc_get_WAVE_CICCEN3_bit(const void *const hw)
6570{
6571 uint32_t tmp;
6572 tmp = ((Tcc *)hw)->WAVE.reg;
6573 tmp = (tmp & TCC_WAVE_CICCEN3) >> TCC_WAVE_CICCEN3_Pos;
6574 return (bool)tmp;
6575}
6576
6577static inline void hri_tcc_write_WAVE_CICCEN3_bit(const void *const hw, bool value)
6578{
6579 uint32_t tmp;
6580 TCC_CRITICAL_SECTION_ENTER();
6581 tmp = ((Tcc *)hw)->WAVE.reg;
6582 tmp &= ~TCC_WAVE_CICCEN3;
6583 tmp |= value << TCC_WAVE_CICCEN3_Pos;
6584 ((Tcc *)hw)->WAVE.reg = tmp;
6585 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6586 TCC_CRITICAL_SECTION_LEAVE();
6587}
6588
6589static inline void hri_tcc_clear_WAVE_CICCEN3_bit(const void *const hw)
6590{
6591 TCC_CRITICAL_SECTION_ENTER();
6592 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_CICCEN3;
6593 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6594 TCC_CRITICAL_SECTION_LEAVE();
6595}
6596
6597static inline void hri_tcc_toggle_WAVE_CICCEN3_bit(const void *const hw)
6598{
6599 TCC_CRITICAL_SECTION_ENTER();
6600 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_CICCEN3;
6601 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6602 TCC_CRITICAL_SECTION_LEAVE();
6603}
6604
6605static inline void hri_tcc_set_WAVE_POL0_bit(const void *const hw)
6606{
6607 TCC_CRITICAL_SECTION_ENTER();
6608 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_POL0;
6609 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6610 TCC_CRITICAL_SECTION_LEAVE();
6611}
6612
6613static inline bool hri_tcc_get_WAVE_POL0_bit(const void *const hw)
6614{
6615 uint32_t tmp;
6616 tmp = ((Tcc *)hw)->WAVE.reg;
6617 tmp = (tmp & TCC_WAVE_POL0) >> TCC_WAVE_POL0_Pos;
6618 return (bool)tmp;
6619}
6620
6621static inline void hri_tcc_write_WAVE_POL0_bit(const void *const hw, bool value)
6622{
6623 uint32_t tmp;
6624 TCC_CRITICAL_SECTION_ENTER();
6625 tmp = ((Tcc *)hw)->WAVE.reg;
6626 tmp &= ~TCC_WAVE_POL0;
6627 tmp |= value << TCC_WAVE_POL0_Pos;
6628 ((Tcc *)hw)->WAVE.reg = tmp;
6629 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6630 TCC_CRITICAL_SECTION_LEAVE();
6631}
6632
6633static inline void hri_tcc_clear_WAVE_POL0_bit(const void *const hw)
6634{
6635 TCC_CRITICAL_SECTION_ENTER();
6636 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_POL0;
6637 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6638 TCC_CRITICAL_SECTION_LEAVE();
6639}
6640
6641static inline void hri_tcc_toggle_WAVE_POL0_bit(const void *const hw)
6642{
6643 TCC_CRITICAL_SECTION_ENTER();
6644 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_POL0;
6645 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6646 TCC_CRITICAL_SECTION_LEAVE();
6647}
6648
6649static inline void hri_tcc_set_WAVE_POL1_bit(const void *const hw)
6650{
6651 TCC_CRITICAL_SECTION_ENTER();
6652 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_POL1;
6653 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6654 TCC_CRITICAL_SECTION_LEAVE();
6655}
6656
6657static inline bool hri_tcc_get_WAVE_POL1_bit(const void *const hw)
6658{
6659 uint32_t tmp;
6660 tmp = ((Tcc *)hw)->WAVE.reg;
6661 tmp = (tmp & TCC_WAVE_POL1) >> TCC_WAVE_POL1_Pos;
6662 return (bool)tmp;
6663}
6664
6665static inline void hri_tcc_write_WAVE_POL1_bit(const void *const hw, bool value)
6666{
6667 uint32_t tmp;
6668 TCC_CRITICAL_SECTION_ENTER();
6669 tmp = ((Tcc *)hw)->WAVE.reg;
6670 tmp &= ~TCC_WAVE_POL1;
6671 tmp |= value << TCC_WAVE_POL1_Pos;
6672 ((Tcc *)hw)->WAVE.reg = tmp;
6673 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6674 TCC_CRITICAL_SECTION_LEAVE();
6675}
6676
6677static inline void hri_tcc_clear_WAVE_POL1_bit(const void *const hw)
6678{
6679 TCC_CRITICAL_SECTION_ENTER();
6680 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_POL1;
6681 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6682 TCC_CRITICAL_SECTION_LEAVE();
6683}
6684
6685static inline void hri_tcc_toggle_WAVE_POL1_bit(const void *const hw)
6686{
6687 TCC_CRITICAL_SECTION_ENTER();
6688 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_POL1;
6689 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6690 TCC_CRITICAL_SECTION_LEAVE();
6691}
6692
6693static inline void hri_tcc_set_WAVE_POL2_bit(const void *const hw)
6694{
6695 TCC_CRITICAL_SECTION_ENTER();
6696 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_POL2;
6697 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6698 TCC_CRITICAL_SECTION_LEAVE();
6699}
6700
6701static inline bool hri_tcc_get_WAVE_POL2_bit(const void *const hw)
6702{
6703 uint32_t tmp;
6704 tmp = ((Tcc *)hw)->WAVE.reg;
6705 tmp = (tmp & TCC_WAVE_POL2) >> TCC_WAVE_POL2_Pos;
6706 return (bool)tmp;
6707}
6708
6709static inline void hri_tcc_write_WAVE_POL2_bit(const void *const hw, bool value)
6710{
6711 uint32_t tmp;
6712 TCC_CRITICAL_SECTION_ENTER();
6713 tmp = ((Tcc *)hw)->WAVE.reg;
6714 tmp &= ~TCC_WAVE_POL2;
6715 tmp |= value << TCC_WAVE_POL2_Pos;
6716 ((Tcc *)hw)->WAVE.reg = tmp;
6717 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6718 TCC_CRITICAL_SECTION_LEAVE();
6719}
6720
6721static inline void hri_tcc_clear_WAVE_POL2_bit(const void *const hw)
6722{
6723 TCC_CRITICAL_SECTION_ENTER();
6724 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_POL2;
6725 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6726 TCC_CRITICAL_SECTION_LEAVE();
6727}
6728
6729static inline void hri_tcc_toggle_WAVE_POL2_bit(const void *const hw)
6730{
6731 TCC_CRITICAL_SECTION_ENTER();
6732 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_POL2;
6733 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6734 TCC_CRITICAL_SECTION_LEAVE();
6735}
6736
6737static inline void hri_tcc_set_WAVE_POL3_bit(const void *const hw)
6738{
6739 TCC_CRITICAL_SECTION_ENTER();
6740 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_POL3;
6741 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6742 TCC_CRITICAL_SECTION_LEAVE();
6743}
6744
6745static inline bool hri_tcc_get_WAVE_POL3_bit(const void *const hw)
6746{
6747 uint32_t tmp;
6748 tmp = ((Tcc *)hw)->WAVE.reg;
6749 tmp = (tmp & TCC_WAVE_POL3) >> TCC_WAVE_POL3_Pos;
6750 return (bool)tmp;
6751}
6752
6753static inline void hri_tcc_write_WAVE_POL3_bit(const void *const hw, bool value)
6754{
6755 uint32_t tmp;
6756 TCC_CRITICAL_SECTION_ENTER();
6757 tmp = ((Tcc *)hw)->WAVE.reg;
6758 tmp &= ~TCC_WAVE_POL3;
6759 tmp |= value << TCC_WAVE_POL3_Pos;
6760 ((Tcc *)hw)->WAVE.reg = tmp;
6761 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6762 TCC_CRITICAL_SECTION_LEAVE();
6763}
6764
6765static inline void hri_tcc_clear_WAVE_POL3_bit(const void *const hw)
6766{
6767 TCC_CRITICAL_SECTION_ENTER();
6768 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_POL3;
6769 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6770 TCC_CRITICAL_SECTION_LEAVE();
6771}
6772
6773static inline void hri_tcc_toggle_WAVE_POL3_bit(const void *const hw)
6774{
6775 TCC_CRITICAL_SECTION_ENTER();
6776 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_POL3;
6777 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6778 TCC_CRITICAL_SECTION_LEAVE();
6779}
6780
6781static inline void hri_tcc_set_WAVE_POL4_bit(const void *const hw)
6782{
6783 TCC_CRITICAL_SECTION_ENTER();
6784 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_POL4;
6785 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6786 TCC_CRITICAL_SECTION_LEAVE();
6787}
6788
6789static inline bool hri_tcc_get_WAVE_POL4_bit(const void *const hw)
6790{
6791 uint32_t tmp;
6792 tmp = ((Tcc *)hw)->WAVE.reg;
6793 tmp = (tmp & TCC_WAVE_POL4) >> TCC_WAVE_POL4_Pos;
6794 return (bool)tmp;
6795}
6796
6797static inline void hri_tcc_write_WAVE_POL4_bit(const void *const hw, bool value)
6798{
6799 uint32_t tmp;
6800 TCC_CRITICAL_SECTION_ENTER();
6801 tmp = ((Tcc *)hw)->WAVE.reg;
6802 tmp &= ~TCC_WAVE_POL4;
6803 tmp |= value << TCC_WAVE_POL4_Pos;
6804 ((Tcc *)hw)->WAVE.reg = tmp;
6805 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6806 TCC_CRITICAL_SECTION_LEAVE();
6807}
6808
6809static inline void hri_tcc_clear_WAVE_POL4_bit(const void *const hw)
6810{
6811 TCC_CRITICAL_SECTION_ENTER();
6812 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_POL4;
6813 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6814 TCC_CRITICAL_SECTION_LEAVE();
6815}
6816
6817static inline void hri_tcc_toggle_WAVE_POL4_bit(const void *const hw)
6818{
6819 TCC_CRITICAL_SECTION_ENTER();
6820 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_POL4;
6821 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6822 TCC_CRITICAL_SECTION_LEAVE();
6823}
6824
6825static inline void hri_tcc_set_WAVE_POL5_bit(const void *const hw)
6826{
6827 TCC_CRITICAL_SECTION_ENTER();
6828 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_POL5;
6829 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6830 TCC_CRITICAL_SECTION_LEAVE();
6831}
6832
6833static inline bool hri_tcc_get_WAVE_POL5_bit(const void *const hw)
6834{
6835 uint32_t tmp;
6836 tmp = ((Tcc *)hw)->WAVE.reg;
6837 tmp = (tmp & TCC_WAVE_POL5) >> TCC_WAVE_POL5_Pos;
6838 return (bool)tmp;
6839}
6840
6841static inline void hri_tcc_write_WAVE_POL5_bit(const void *const hw, bool value)
6842{
6843 uint32_t tmp;
6844 TCC_CRITICAL_SECTION_ENTER();
6845 tmp = ((Tcc *)hw)->WAVE.reg;
6846 tmp &= ~TCC_WAVE_POL5;
6847 tmp |= value << TCC_WAVE_POL5_Pos;
6848 ((Tcc *)hw)->WAVE.reg = tmp;
6849 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6850 TCC_CRITICAL_SECTION_LEAVE();
6851}
6852
6853static inline void hri_tcc_clear_WAVE_POL5_bit(const void *const hw)
6854{
6855 TCC_CRITICAL_SECTION_ENTER();
6856 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_POL5;
6857 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6858 TCC_CRITICAL_SECTION_LEAVE();
6859}
6860
6861static inline void hri_tcc_toggle_WAVE_POL5_bit(const void *const hw)
6862{
6863 TCC_CRITICAL_SECTION_ENTER();
6864 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_POL5;
6865 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6866 TCC_CRITICAL_SECTION_LEAVE();
6867}
6868
6869static inline void hri_tcc_set_WAVE_SWAP0_bit(const void *const hw)
6870{
6871 TCC_CRITICAL_SECTION_ENTER();
6872 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_SWAP0;
6873 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6874 TCC_CRITICAL_SECTION_LEAVE();
6875}
6876
6877static inline bool hri_tcc_get_WAVE_SWAP0_bit(const void *const hw)
6878{
6879 uint32_t tmp;
6880 tmp = ((Tcc *)hw)->WAVE.reg;
6881 tmp = (tmp & TCC_WAVE_SWAP0) >> TCC_WAVE_SWAP0_Pos;
6882 return (bool)tmp;
6883}
6884
6885static inline void hri_tcc_write_WAVE_SWAP0_bit(const void *const hw, bool value)
6886{
6887 uint32_t tmp;
6888 TCC_CRITICAL_SECTION_ENTER();
6889 tmp = ((Tcc *)hw)->WAVE.reg;
6890 tmp &= ~TCC_WAVE_SWAP0;
6891 tmp |= value << TCC_WAVE_SWAP0_Pos;
6892 ((Tcc *)hw)->WAVE.reg = tmp;
6893 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6894 TCC_CRITICAL_SECTION_LEAVE();
6895}
6896
6897static inline void hri_tcc_clear_WAVE_SWAP0_bit(const void *const hw)
6898{
6899 TCC_CRITICAL_SECTION_ENTER();
6900 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_SWAP0;
6901 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6902 TCC_CRITICAL_SECTION_LEAVE();
6903}
6904
6905static inline void hri_tcc_toggle_WAVE_SWAP0_bit(const void *const hw)
6906{
6907 TCC_CRITICAL_SECTION_ENTER();
6908 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_SWAP0;
6909 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6910 TCC_CRITICAL_SECTION_LEAVE();
6911}
6912
6913static inline void hri_tcc_set_WAVE_SWAP1_bit(const void *const hw)
6914{
6915 TCC_CRITICAL_SECTION_ENTER();
6916 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_SWAP1;
6917 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6918 TCC_CRITICAL_SECTION_LEAVE();
6919}
6920
6921static inline bool hri_tcc_get_WAVE_SWAP1_bit(const void *const hw)
6922{
6923 uint32_t tmp;
6924 tmp = ((Tcc *)hw)->WAVE.reg;
6925 tmp = (tmp & TCC_WAVE_SWAP1) >> TCC_WAVE_SWAP1_Pos;
6926 return (bool)tmp;
6927}
6928
6929static inline void hri_tcc_write_WAVE_SWAP1_bit(const void *const hw, bool value)
6930{
6931 uint32_t tmp;
6932 TCC_CRITICAL_SECTION_ENTER();
6933 tmp = ((Tcc *)hw)->WAVE.reg;
6934 tmp &= ~TCC_WAVE_SWAP1;
6935 tmp |= value << TCC_WAVE_SWAP1_Pos;
6936 ((Tcc *)hw)->WAVE.reg = tmp;
6937 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6938 TCC_CRITICAL_SECTION_LEAVE();
6939}
6940
6941static inline void hri_tcc_clear_WAVE_SWAP1_bit(const void *const hw)
6942{
6943 TCC_CRITICAL_SECTION_ENTER();
6944 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_SWAP1;
6945 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6946 TCC_CRITICAL_SECTION_LEAVE();
6947}
6948
6949static inline void hri_tcc_toggle_WAVE_SWAP1_bit(const void *const hw)
6950{
6951 TCC_CRITICAL_SECTION_ENTER();
6952 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_SWAP1;
6953 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6954 TCC_CRITICAL_SECTION_LEAVE();
6955}
6956
6957static inline void hri_tcc_set_WAVE_SWAP2_bit(const void *const hw)
6958{
6959 TCC_CRITICAL_SECTION_ENTER();
6960 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_SWAP2;
6961 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6962 TCC_CRITICAL_SECTION_LEAVE();
6963}
6964
6965static inline bool hri_tcc_get_WAVE_SWAP2_bit(const void *const hw)
6966{
6967 uint32_t tmp;
6968 tmp = ((Tcc *)hw)->WAVE.reg;
6969 tmp = (tmp & TCC_WAVE_SWAP2) >> TCC_WAVE_SWAP2_Pos;
6970 return (bool)tmp;
6971}
6972
6973static inline void hri_tcc_write_WAVE_SWAP2_bit(const void *const hw, bool value)
6974{
6975 uint32_t tmp;
6976 TCC_CRITICAL_SECTION_ENTER();
6977 tmp = ((Tcc *)hw)->WAVE.reg;
6978 tmp &= ~TCC_WAVE_SWAP2;
6979 tmp |= value << TCC_WAVE_SWAP2_Pos;
6980 ((Tcc *)hw)->WAVE.reg = tmp;
6981 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6982 TCC_CRITICAL_SECTION_LEAVE();
6983}
6984
6985static inline void hri_tcc_clear_WAVE_SWAP2_bit(const void *const hw)
6986{
6987 TCC_CRITICAL_SECTION_ENTER();
6988 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_SWAP2;
6989 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6990 TCC_CRITICAL_SECTION_LEAVE();
6991}
6992
6993static inline void hri_tcc_toggle_WAVE_SWAP2_bit(const void *const hw)
6994{
6995 TCC_CRITICAL_SECTION_ENTER();
6996 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_SWAP2;
6997 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
6998 TCC_CRITICAL_SECTION_LEAVE();
6999}
7000
7001static inline void hri_tcc_set_WAVE_SWAP3_bit(const void *const hw)
7002{
7003 TCC_CRITICAL_SECTION_ENTER();
7004 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_SWAP3;
7005 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7006 TCC_CRITICAL_SECTION_LEAVE();
7007}
7008
7009static inline bool hri_tcc_get_WAVE_SWAP3_bit(const void *const hw)
7010{
7011 uint32_t tmp;
7012 tmp = ((Tcc *)hw)->WAVE.reg;
7013 tmp = (tmp & TCC_WAVE_SWAP3) >> TCC_WAVE_SWAP3_Pos;
7014 return (bool)tmp;
7015}
7016
7017static inline void hri_tcc_write_WAVE_SWAP3_bit(const void *const hw, bool value)
7018{
7019 uint32_t tmp;
7020 TCC_CRITICAL_SECTION_ENTER();
7021 tmp = ((Tcc *)hw)->WAVE.reg;
7022 tmp &= ~TCC_WAVE_SWAP3;
7023 tmp |= value << TCC_WAVE_SWAP3_Pos;
7024 ((Tcc *)hw)->WAVE.reg = tmp;
7025 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7026 TCC_CRITICAL_SECTION_LEAVE();
7027}
7028
7029static inline void hri_tcc_clear_WAVE_SWAP3_bit(const void *const hw)
7030{
7031 TCC_CRITICAL_SECTION_ENTER();
7032 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_SWAP3;
7033 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7034 TCC_CRITICAL_SECTION_LEAVE();
7035}
7036
7037static inline void hri_tcc_toggle_WAVE_SWAP3_bit(const void *const hw)
7038{
7039 TCC_CRITICAL_SECTION_ENTER();
7040 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_SWAP3;
7041 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7042 TCC_CRITICAL_SECTION_LEAVE();
7043}
7044
7045static inline void hri_tcc_set_WAVE_WAVEGEN_bf(const void *const hw, hri_tcc_wave_reg_t mask)
7046{
7047 TCC_CRITICAL_SECTION_ENTER();
7048 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_WAVEGEN(mask);
7049 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7050 TCC_CRITICAL_SECTION_LEAVE();
7051}
7052
7053static inline hri_tcc_wave_reg_t hri_tcc_get_WAVE_WAVEGEN_bf(const void *const hw, hri_tcc_wave_reg_t mask)
7054{
7055 uint32_t tmp;
7056 tmp = ((Tcc *)hw)->WAVE.reg;
7057 tmp = (tmp & TCC_WAVE_WAVEGEN(mask)) >> TCC_WAVE_WAVEGEN_Pos;
7058 return tmp;
7059}
7060
7061static inline void hri_tcc_write_WAVE_WAVEGEN_bf(const void *const hw, hri_tcc_wave_reg_t data)
7062{
7063 uint32_t tmp;
7064 TCC_CRITICAL_SECTION_ENTER();
7065 tmp = ((Tcc *)hw)->WAVE.reg;
7066 tmp &= ~TCC_WAVE_WAVEGEN_Msk;
7067 tmp |= TCC_WAVE_WAVEGEN(data);
7068 ((Tcc *)hw)->WAVE.reg = tmp;
7069 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7070 TCC_CRITICAL_SECTION_LEAVE();
7071}
7072
7073static inline void hri_tcc_clear_WAVE_WAVEGEN_bf(const void *const hw, hri_tcc_wave_reg_t mask)
7074{
7075 TCC_CRITICAL_SECTION_ENTER();
7076 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_WAVEGEN(mask);
7077 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7078 TCC_CRITICAL_SECTION_LEAVE();
7079}
7080
7081static inline void hri_tcc_toggle_WAVE_WAVEGEN_bf(const void *const hw, hri_tcc_wave_reg_t mask)
7082{
7083 TCC_CRITICAL_SECTION_ENTER();
7084 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_WAVEGEN(mask);
7085 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7086 TCC_CRITICAL_SECTION_LEAVE();
7087}
7088
7089static inline hri_tcc_wave_reg_t hri_tcc_read_WAVE_WAVEGEN_bf(const void *const hw)
7090{
7091 uint32_t tmp;
7092 tmp = ((Tcc *)hw)->WAVE.reg;
7093 tmp = (tmp & TCC_WAVE_WAVEGEN_Msk) >> TCC_WAVE_WAVEGEN_Pos;
7094 return tmp;
7095}
7096
7097static inline void hri_tcc_set_WAVE_RAMP_bf(const void *const hw, hri_tcc_wave_reg_t mask)
7098{
7099 TCC_CRITICAL_SECTION_ENTER();
7100 ((Tcc *)hw)->WAVE.reg |= TCC_WAVE_RAMP(mask);
7101 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7102 TCC_CRITICAL_SECTION_LEAVE();
7103}
7104
7105static inline hri_tcc_wave_reg_t hri_tcc_get_WAVE_RAMP_bf(const void *const hw, hri_tcc_wave_reg_t mask)
7106{
7107 uint32_t tmp;
7108 tmp = ((Tcc *)hw)->WAVE.reg;
7109 tmp = (tmp & TCC_WAVE_RAMP(mask)) >> TCC_WAVE_RAMP_Pos;
7110 return tmp;
7111}
7112
7113static inline void hri_tcc_write_WAVE_RAMP_bf(const void *const hw, hri_tcc_wave_reg_t data)
7114{
7115 uint32_t tmp;
7116 TCC_CRITICAL_SECTION_ENTER();
7117 tmp = ((Tcc *)hw)->WAVE.reg;
7118 tmp &= ~TCC_WAVE_RAMP_Msk;
7119 tmp |= TCC_WAVE_RAMP(data);
7120 ((Tcc *)hw)->WAVE.reg = tmp;
7121 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7122 TCC_CRITICAL_SECTION_LEAVE();
7123}
7124
7125static inline void hri_tcc_clear_WAVE_RAMP_bf(const void *const hw, hri_tcc_wave_reg_t mask)
7126{
7127 TCC_CRITICAL_SECTION_ENTER();
7128 ((Tcc *)hw)->WAVE.reg &= ~TCC_WAVE_RAMP(mask);
7129 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7130 TCC_CRITICAL_SECTION_LEAVE();
7131}
7132
7133static inline void hri_tcc_toggle_WAVE_RAMP_bf(const void *const hw, hri_tcc_wave_reg_t mask)
7134{
7135 TCC_CRITICAL_SECTION_ENTER();
7136 ((Tcc *)hw)->WAVE.reg ^= TCC_WAVE_RAMP(mask);
7137 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7138 TCC_CRITICAL_SECTION_LEAVE();
7139}
7140
7141static inline hri_tcc_wave_reg_t hri_tcc_read_WAVE_RAMP_bf(const void *const hw)
7142{
7143 uint32_t tmp;
7144 tmp = ((Tcc *)hw)->WAVE.reg;
7145 tmp = (tmp & TCC_WAVE_RAMP_Msk) >> TCC_WAVE_RAMP_Pos;
7146 return tmp;
7147}
7148
7149static inline void hri_tcc_set_WAVE_reg(const void *const hw, hri_tcc_wave_reg_t mask)
7150{
7151 TCC_CRITICAL_SECTION_ENTER();
7152 ((Tcc *)hw)->WAVE.reg |= mask;
7153 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7154 TCC_CRITICAL_SECTION_LEAVE();
7155}
7156
7157static inline hri_tcc_wave_reg_t hri_tcc_get_WAVE_reg(const void *const hw, hri_tcc_wave_reg_t mask)
7158{
7159 uint32_t tmp;
7160 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7161 tmp = ((Tcc *)hw)->WAVE.reg;
7162 tmp &= mask;
7163 return tmp;
7164}
7165
7166static inline void hri_tcc_write_WAVE_reg(const void *const hw, hri_tcc_wave_reg_t data)
7167{
7168 TCC_CRITICAL_SECTION_ENTER();
7169 ((Tcc *)hw)->WAVE.reg = data;
7170 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7171 TCC_CRITICAL_SECTION_LEAVE();
7172}
7173
7174static inline void hri_tcc_clear_WAVE_reg(const void *const hw, hri_tcc_wave_reg_t mask)
7175{
7176 TCC_CRITICAL_SECTION_ENTER();
7177 ((Tcc *)hw)->WAVE.reg &= ~mask;
7178 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7179 TCC_CRITICAL_SECTION_LEAVE();
7180}
7181
7182static inline void hri_tcc_toggle_WAVE_reg(const void *const hw, hri_tcc_wave_reg_t mask)
7183{
7184 TCC_CRITICAL_SECTION_ENTER();
7185 ((Tcc *)hw)->WAVE.reg ^= mask;
7186 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7187 TCC_CRITICAL_SECTION_LEAVE();
7188}
7189
7190static inline hri_tcc_wave_reg_t hri_tcc_read_WAVE_reg(const void *const hw)
7191{
7192 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7193 return ((Tcc *)hw)->WAVE.reg;
7194}
7195
7196static inline void hri_tcc_set_PER_DITH4_DITHER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7197{
7198 TCC_CRITICAL_SECTION_ENTER();
7199 ((Tcc *)hw)->PER.reg |= TCC_PER_DITH4_DITHER(mask);
7200 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7201 TCC_CRITICAL_SECTION_LEAVE();
7202}
7203
7204static inline hri_tcc_per_reg_t hri_tcc_get_PER_DITH4_DITHER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7205{
7206 uint32_t tmp;
7207 tmp = ((Tcc *)hw)->PER.reg;
7208 tmp = (tmp & TCC_PER_DITH4_DITHER(mask)) >> TCC_PER_DITH4_DITHER_Pos;
7209 return tmp;
7210}
7211
7212static inline void hri_tcc_write_PER_DITH4_DITHER_bf(const void *const hw, hri_tcc_per_reg_t data)
7213{
7214 uint32_t tmp;
7215 TCC_CRITICAL_SECTION_ENTER();
7216 tmp = ((Tcc *)hw)->PER.reg;
7217 tmp &= ~TCC_PER_DITH4_DITHER_Msk;
7218 tmp |= TCC_PER_DITH4_DITHER(data);
7219 ((Tcc *)hw)->PER.reg = tmp;
7220 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7221 TCC_CRITICAL_SECTION_LEAVE();
7222}
7223
7224static inline void hri_tcc_clear_PER_DITH4_DITHER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7225{
7226 TCC_CRITICAL_SECTION_ENTER();
7227 ((Tcc *)hw)->PER.reg &= ~TCC_PER_DITH4_DITHER(mask);
7228 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7229 TCC_CRITICAL_SECTION_LEAVE();
7230}
7231
7232static inline void hri_tcc_toggle_PER_DITH4_DITHER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7233{
7234 TCC_CRITICAL_SECTION_ENTER();
7235 ((Tcc *)hw)->PER.reg ^= TCC_PER_DITH4_DITHER(mask);
7236 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7237 TCC_CRITICAL_SECTION_LEAVE();
7238}
7239
7240static inline hri_tcc_per_reg_t hri_tcc_read_PER_DITH4_DITHER_bf(const void *const hw)
7241{
7242 uint32_t tmp;
7243 tmp = ((Tcc *)hw)->PER.reg;
7244 tmp = (tmp & TCC_PER_DITH4_DITHER_Msk) >> TCC_PER_DITH4_DITHER_Pos;
7245 return tmp;
7246}
7247
7248static inline void hri_tcc_set_PER_DITH5_DITHER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7249{
7250 TCC_CRITICAL_SECTION_ENTER();
7251 ((Tcc *)hw)->PER.reg |= TCC_PER_DITH5_DITHER(mask);
7252 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7253 TCC_CRITICAL_SECTION_LEAVE();
7254}
7255
7256static inline hri_tcc_per_reg_t hri_tcc_get_PER_DITH5_DITHER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7257{
7258 uint32_t tmp;
7259 tmp = ((Tcc *)hw)->PER.reg;
7260 tmp = (tmp & TCC_PER_DITH5_DITHER(mask)) >> TCC_PER_DITH5_DITHER_Pos;
7261 return tmp;
7262}
7263
7264static inline void hri_tcc_write_PER_DITH5_DITHER_bf(const void *const hw, hri_tcc_per_reg_t data)
7265{
7266 uint32_t tmp;
7267 TCC_CRITICAL_SECTION_ENTER();
7268 tmp = ((Tcc *)hw)->PER.reg;
7269 tmp &= ~TCC_PER_DITH5_DITHER_Msk;
7270 tmp |= TCC_PER_DITH5_DITHER(data);
7271 ((Tcc *)hw)->PER.reg = tmp;
7272 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7273 TCC_CRITICAL_SECTION_LEAVE();
7274}
7275
7276static inline void hri_tcc_clear_PER_DITH5_DITHER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7277{
7278 TCC_CRITICAL_SECTION_ENTER();
7279 ((Tcc *)hw)->PER.reg &= ~TCC_PER_DITH5_DITHER(mask);
7280 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7281 TCC_CRITICAL_SECTION_LEAVE();
7282}
7283
7284static inline void hri_tcc_toggle_PER_DITH5_DITHER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7285{
7286 TCC_CRITICAL_SECTION_ENTER();
7287 ((Tcc *)hw)->PER.reg ^= TCC_PER_DITH5_DITHER(mask);
7288 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7289 TCC_CRITICAL_SECTION_LEAVE();
7290}
7291
7292static inline hri_tcc_per_reg_t hri_tcc_read_PER_DITH5_DITHER_bf(const void *const hw)
7293{
7294 uint32_t tmp;
7295 tmp = ((Tcc *)hw)->PER.reg;
7296 tmp = (tmp & TCC_PER_DITH5_DITHER_Msk) >> TCC_PER_DITH5_DITHER_Pos;
7297 return tmp;
7298}
7299
7300static inline void hri_tcc_set_PER_DITH6_DITHER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7301{
7302 TCC_CRITICAL_SECTION_ENTER();
7303 ((Tcc *)hw)->PER.reg |= TCC_PER_DITH6_DITHER(mask);
7304 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7305 TCC_CRITICAL_SECTION_LEAVE();
7306}
7307
7308static inline hri_tcc_per_reg_t hri_tcc_get_PER_DITH6_DITHER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7309{
7310 uint32_t tmp;
7311 tmp = ((Tcc *)hw)->PER.reg;
7312 tmp = (tmp & TCC_PER_DITH6_DITHER(mask)) >> TCC_PER_DITH6_DITHER_Pos;
7313 return tmp;
7314}
7315
7316static inline void hri_tcc_write_PER_DITH6_DITHER_bf(const void *const hw, hri_tcc_per_reg_t data)
7317{
7318 uint32_t tmp;
7319 TCC_CRITICAL_SECTION_ENTER();
7320 tmp = ((Tcc *)hw)->PER.reg;
7321 tmp &= ~TCC_PER_DITH6_DITHER_Msk;
7322 tmp |= TCC_PER_DITH6_DITHER(data);
7323 ((Tcc *)hw)->PER.reg = tmp;
7324 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7325 TCC_CRITICAL_SECTION_LEAVE();
7326}
7327
7328static inline void hri_tcc_clear_PER_DITH6_DITHER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7329{
7330 TCC_CRITICAL_SECTION_ENTER();
7331 ((Tcc *)hw)->PER.reg &= ~TCC_PER_DITH6_DITHER(mask);
7332 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7333 TCC_CRITICAL_SECTION_LEAVE();
7334}
7335
7336static inline void hri_tcc_toggle_PER_DITH6_DITHER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7337{
7338 TCC_CRITICAL_SECTION_ENTER();
7339 ((Tcc *)hw)->PER.reg ^= TCC_PER_DITH6_DITHER(mask);
7340 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7341 TCC_CRITICAL_SECTION_LEAVE();
7342}
7343
7344static inline hri_tcc_per_reg_t hri_tcc_read_PER_DITH6_DITHER_bf(const void *const hw)
7345{
7346 uint32_t tmp;
7347 tmp = ((Tcc *)hw)->PER.reg;
7348 tmp = (tmp & TCC_PER_DITH6_DITHER_Msk) >> TCC_PER_DITH6_DITHER_Pos;
7349 return tmp;
7350}
7351
7352static inline void hri_tcc_set_PER_DITH6_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7353{
7354 TCC_CRITICAL_SECTION_ENTER();
7355 ((Tcc *)hw)->PER.reg |= TCC_PER_PER(mask);
7356 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7357 TCC_CRITICAL_SECTION_LEAVE();
7358}
7359
7360static inline hri_tcc_per_reg_t hri_tcc_get_PER_DITH6_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7361{
7362 uint32_t tmp;
7363 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7364 tmp = ((Tcc *)hw)->PER.reg;
7365 tmp = (tmp & TCC_PER_PER(mask)) >> TCC_PER_PER_Pos;
7366 return tmp;
7367}
7368
7369static inline void hri_tcc_write_PER_DITH6_PER_bf(const void *const hw, hri_tcc_per_reg_t data)
7370{
7371 uint32_t tmp;
7372 TCC_CRITICAL_SECTION_ENTER();
7373 tmp = ((Tcc *)hw)->PER.reg;
7374 tmp &= ~TCC_PER_PER_Msk;
7375 tmp |= TCC_PER_PER(data);
7376 ((Tcc *)hw)->PER.reg = tmp;
7377 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7378 TCC_CRITICAL_SECTION_LEAVE();
7379}
7380
7381static inline void hri_tcc_clear_PER_DITH6_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7382{
7383 TCC_CRITICAL_SECTION_ENTER();
7384 ((Tcc *)hw)->PER.reg &= ~TCC_PER_PER(mask);
7385 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7386 TCC_CRITICAL_SECTION_LEAVE();
7387}
7388
7389static inline void hri_tcc_toggle_PER_DITH6_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7390{
7391 TCC_CRITICAL_SECTION_ENTER();
7392 ((Tcc *)hw)->PER.reg ^= TCC_PER_PER(mask);
7393 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7394 TCC_CRITICAL_SECTION_LEAVE();
7395}
7396
7397static inline hri_tcc_per_reg_t hri_tcc_read_PER_DITH6_PER_bf(const void *const hw)
7398{
7399 uint32_t tmp;
7400 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7401 tmp = ((Tcc *)hw)->PER.reg;
7402 tmp = (tmp & TCC_PER_PER_Msk) >> TCC_PER_PER_Pos;
7403 return tmp;
7404}
7405
7406static inline void hri_tcc_set_PER_DITH5_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7407{
7408 TCC_CRITICAL_SECTION_ENTER();
7409 ((Tcc *)hw)->PER.reg |= TCC_PER_PER(mask);
7410 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7411 TCC_CRITICAL_SECTION_LEAVE();
7412}
7413
7414static inline hri_tcc_per_reg_t hri_tcc_get_PER_DITH5_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7415{
7416 uint32_t tmp;
7417 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7418 tmp = ((Tcc *)hw)->PER.reg;
7419 tmp = (tmp & TCC_PER_PER(mask)) >> TCC_PER_PER_Pos;
7420 return tmp;
7421}
7422
7423static inline void hri_tcc_write_PER_DITH5_PER_bf(const void *const hw, hri_tcc_per_reg_t data)
7424{
7425 uint32_t tmp;
7426 TCC_CRITICAL_SECTION_ENTER();
7427 tmp = ((Tcc *)hw)->PER.reg;
7428 tmp &= ~TCC_PER_PER_Msk;
7429 tmp |= TCC_PER_PER(data);
7430 ((Tcc *)hw)->PER.reg = tmp;
7431 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7432 TCC_CRITICAL_SECTION_LEAVE();
7433}
7434
7435static inline void hri_tcc_clear_PER_DITH5_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7436{
7437 TCC_CRITICAL_SECTION_ENTER();
7438 ((Tcc *)hw)->PER.reg &= ~TCC_PER_PER(mask);
7439 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7440 TCC_CRITICAL_SECTION_LEAVE();
7441}
7442
7443static inline void hri_tcc_toggle_PER_DITH5_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7444{
7445 TCC_CRITICAL_SECTION_ENTER();
7446 ((Tcc *)hw)->PER.reg ^= TCC_PER_PER(mask);
7447 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7448 TCC_CRITICAL_SECTION_LEAVE();
7449}
7450
7451static inline hri_tcc_per_reg_t hri_tcc_read_PER_DITH5_PER_bf(const void *const hw)
7452{
7453 uint32_t tmp;
7454 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7455 tmp = ((Tcc *)hw)->PER.reg;
7456 tmp = (tmp & TCC_PER_PER_Msk) >> TCC_PER_PER_Pos;
7457 return tmp;
7458}
7459
7460static inline void hri_tcc_set_PER_DITH4_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7461{
7462 TCC_CRITICAL_SECTION_ENTER();
7463 ((Tcc *)hw)->PER.reg |= TCC_PER_PER(mask);
7464 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7465 TCC_CRITICAL_SECTION_LEAVE();
7466}
7467
7468static inline hri_tcc_per_reg_t hri_tcc_get_PER_DITH4_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7469{
7470 uint32_t tmp;
7471 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7472 tmp = ((Tcc *)hw)->PER.reg;
7473 tmp = (tmp & TCC_PER_PER(mask)) >> TCC_PER_PER_Pos;
7474 return tmp;
7475}
7476
7477static inline void hri_tcc_write_PER_DITH4_PER_bf(const void *const hw, hri_tcc_per_reg_t data)
7478{
7479 uint32_t tmp;
7480 TCC_CRITICAL_SECTION_ENTER();
7481 tmp = ((Tcc *)hw)->PER.reg;
7482 tmp &= ~TCC_PER_PER_Msk;
7483 tmp |= TCC_PER_PER(data);
7484 ((Tcc *)hw)->PER.reg = tmp;
7485 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7486 TCC_CRITICAL_SECTION_LEAVE();
7487}
7488
7489static inline void hri_tcc_clear_PER_DITH4_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7490{
7491 TCC_CRITICAL_SECTION_ENTER();
7492 ((Tcc *)hw)->PER.reg &= ~TCC_PER_PER(mask);
7493 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7494 TCC_CRITICAL_SECTION_LEAVE();
7495}
7496
7497static inline void hri_tcc_toggle_PER_DITH4_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7498{
7499 TCC_CRITICAL_SECTION_ENTER();
7500 ((Tcc *)hw)->PER.reg ^= TCC_PER_PER(mask);
7501 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7502 TCC_CRITICAL_SECTION_LEAVE();
7503}
7504
7505static inline hri_tcc_per_reg_t hri_tcc_read_PER_DITH4_PER_bf(const void *const hw)
7506{
7507 uint32_t tmp;
7508 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7509 tmp = ((Tcc *)hw)->PER.reg;
7510 tmp = (tmp & TCC_PER_PER_Msk) >> TCC_PER_PER_Pos;
7511 return tmp;
7512}
7513
7514static inline void hri_tcc_set_PER_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7515{
7516 TCC_CRITICAL_SECTION_ENTER();
7517 ((Tcc *)hw)->PER.reg |= TCC_PER_PER(mask);
7518 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7519 TCC_CRITICAL_SECTION_LEAVE();
7520}
7521
7522static inline hri_tcc_per_reg_t hri_tcc_get_PER_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7523{
7524 uint32_t tmp;
7525 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7526 tmp = ((Tcc *)hw)->PER.reg;
7527 tmp = (tmp & TCC_PER_PER(mask)) >> TCC_PER_PER_Pos;
7528 return tmp;
7529}
7530
7531static inline void hri_tcc_write_PER_PER_bf(const void *const hw, hri_tcc_per_reg_t data)
7532{
7533 uint32_t tmp;
7534 TCC_CRITICAL_SECTION_ENTER();
7535 tmp = ((Tcc *)hw)->PER.reg;
7536 tmp &= ~TCC_PER_PER_Msk;
7537 tmp |= TCC_PER_PER(data);
7538 ((Tcc *)hw)->PER.reg = tmp;
7539 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7540 TCC_CRITICAL_SECTION_LEAVE();
7541}
7542
7543static inline void hri_tcc_clear_PER_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7544{
7545 TCC_CRITICAL_SECTION_ENTER();
7546 ((Tcc *)hw)->PER.reg &= ~TCC_PER_PER(mask);
7547 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7548 TCC_CRITICAL_SECTION_LEAVE();
7549}
7550
7551static inline void hri_tcc_toggle_PER_PER_bf(const void *const hw, hri_tcc_per_reg_t mask)
7552{
7553 TCC_CRITICAL_SECTION_ENTER();
7554 ((Tcc *)hw)->PER.reg ^= TCC_PER_PER(mask);
7555 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7556 TCC_CRITICAL_SECTION_LEAVE();
7557}
7558
7559static inline hri_tcc_per_reg_t hri_tcc_read_PER_PER_bf(const void *const hw)
7560{
7561 uint32_t tmp;
7562 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7563 tmp = ((Tcc *)hw)->PER.reg;
7564 tmp = (tmp & TCC_PER_PER_Msk) >> TCC_PER_PER_Pos;
7565 return tmp;
7566}
7567
7568static inline void hri_tcc_set_PER_reg(const void *const hw, hri_tcc_per_reg_t mask)
7569{
7570 TCC_CRITICAL_SECTION_ENTER();
7571 ((Tcc *)hw)->PER.reg |= mask;
7572 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7573 TCC_CRITICAL_SECTION_LEAVE();
7574}
7575
7576static inline hri_tcc_per_reg_t hri_tcc_get_PER_reg(const void *const hw, hri_tcc_per_reg_t mask)
7577{
7578 uint32_t tmp;
7579 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7580 tmp = ((Tcc *)hw)->PER.reg;
7581 tmp &= mask;
7582 return tmp;
7583}
7584
7585static inline void hri_tcc_write_PER_reg(const void *const hw, hri_tcc_per_reg_t data)
7586{
7587 TCC_CRITICAL_SECTION_ENTER();
7588 ((Tcc *)hw)->PER.reg = data;
7589 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7590 TCC_CRITICAL_SECTION_LEAVE();
7591}
7592
7593static inline void hri_tcc_clear_PER_reg(const void *const hw, hri_tcc_per_reg_t mask)
7594{
7595 TCC_CRITICAL_SECTION_ENTER();
7596 ((Tcc *)hw)->PER.reg &= ~mask;
7597 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7598 TCC_CRITICAL_SECTION_LEAVE();
7599}
7600
7601static inline void hri_tcc_toggle_PER_reg(const void *const hw, hri_tcc_per_reg_t mask)
7602{
7603 TCC_CRITICAL_SECTION_ENTER();
7604 ((Tcc *)hw)->PER.reg ^= mask;
7605 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7606 TCC_CRITICAL_SECTION_LEAVE();
7607}
7608
7609static inline hri_tcc_per_reg_t hri_tcc_read_PER_reg(const void *const hw)
7610{
7611 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_PER);
7612 return ((Tcc *)hw)->PER.reg;
7613}
7614
7615static inline void hri_tcc_set_CC_DITH4_DITHER_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7616{
7617 TCC_CRITICAL_SECTION_ENTER();
7618 ((Tcc *)hw)->CC[index].reg |= TCC_CC_DITH4_DITHER(mask);
7619 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7620 TCC_CRITICAL_SECTION_LEAVE();
7621}
7622
7623static inline hri_tcc_cc_reg_t hri_tcc_get_CC_DITH4_DITHER_bf(const void *const hw, uint8_t index,
7624 hri_tcc_cc_reg_t mask)
7625{
7626 uint32_t tmp;
7627 tmp = ((Tcc *)hw)->CC[index].reg;
7628 tmp = (tmp & TCC_CC_DITH4_DITHER(mask)) >> TCC_CC_DITH4_DITHER_Pos;
7629 return tmp;
7630}
7631
7632static inline void hri_tcc_write_CC_DITH4_DITHER_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t data)
7633{
7634 uint32_t tmp;
7635 TCC_CRITICAL_SECTION_ENTER();
7636 tmp = ((Tcc *)hw)->CC[index].reg;
7637 tmp &= ~TCC_CC_DITH4_DITHER_Msk;
7638 tmp |= TCC_CC_DITH4_DITHER(data);
7639 ((Tcc *)hw)->CC[index].reg = tmp;
7640 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7641 TCC_CRITICAL_SECTION_LEAVE();
7642}
7643
7644static inline void hri_tcc_clear_CC_DITH4_DITHER_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7645{
7646 TCC_CRITICAL_SECTION_ENTER();
7647 ((Tcc *)hw)->CC[index].reg &= ~TCC_CC_DITH4_DITHER(mask);
7648 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7649 TCC_CRITICAL_SECTION_LEAVE();
7650}
7651
7652static inline void hri_tcc_toggle_CC_DITH4_DITHER_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7653{
7654 TCC_CRITICAL_SECTION_ENTER();
7655 ((Tcc *)hw)->CC[index].reg ^= TCC_CC_DITH4_DITHER(mask);
7656 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7657 TCC_CRITICAL_SECTION_LEAVE();
7658}
7659
7660static inline hri_tcc_cc_reg_t hri_tcc_read_CC_DITH4_DITHER_bf(const void *const hw, uint8_t index)
7661{
7662 uint32_t tmp;
7663 tmp = ((Tcc *)hw)->CC[index].reg;
7664 tmp = (tmp & TCC_CC_DITH4_DITHER_Msk) >> TCC_CC_DITH4_DITHER_Pos;
7665 return tmp;
7666}
7667
7668static inline void hri_tcc_set_CC_DITH5_DITHER_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7669{
7670 TCC_CRITICAL_SECTION_ENTER();
7671 ((Tcc *)hw)->CC[index].reg |= TCC_CC_DITH5_DITHER(mask);
7672 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7673 TCC_CRITICAL_SECTION_LEAVE();
7674}
7675
7676static inline hri_tcc_cc_reg_t hri_tcc_get_CC_DITH5_DITHER_bf(const void *const hw, uint8_t index,
7677 hri_tcc_cc_reg_t mask)
7678{
7679 uint32_t tmp;
7680 tmp = ((Tcc *)hw)->CC[index].reg;
7681 tmp = (tmp & TCC_CC_DITH5_DITHER(mask)) >> TCC_CC_DITH5_DITHER_Pos;
7682 return tmp;
7683}
7684
7685static inline void hri_tcc_write_CC_DITH5_DITHER_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t data)
7686{
7687 uint32_t tmp;
7688 TCC_CRITICAL_SECTION_ENTER();
7689 tmp = ((Tcc *)hw)->CC[index].reg;
7690 tmp &= ~TCC_CC_DITH5_DITHER_Msk;
7691 tmp |= TCC_CC_DITH5_DITHER(data);
7692 ((Tcc *)hw)->CC[index].reg = tmp;
7693 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7694 TCC_CRITICAL_SECTION_LEAVE();
7695}
7696
7697static inline void hri_tcc_clear_CC_DITH5_DITHER_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7698{
7699 TCC_CRITICAL_SECTION_ENTER();
7700 ((Tcc *)hw)->CC[index].reg &= ~TCC_CC_DITH5_DITHER(mask);
7701 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7702 TCC_CRITICAL_SECTION_LEAVE();
7703}
7704
7705static inline void hri_tcc_toggle_CC_DITH5_DITHER_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7706{
7707 TCC_CRITICAL_SECTION_ENTER();
7708 ((Tcc *)hw)->CC[index].reg ^= TCC_CC_DITH5_DITHER(mask);
7709 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7710 TCC_CRITICAL_SECTION_LEAVE();
7711}
7712
7713static inline hri_tcc_cc_reg_t hri_tcc_read_CC_DITH5_DITHER_bf(const void *const hw, uint8_t index)
7714{
7715 uint32_t tmp;
7716 tmp = ((Tcc *)hw)->CC[index].reg;
7717 tmp = (tmp & TCC_CC_DITH5_DITHER_Msk) >> TCC_CC_DITH5_DITHER_Pos;
7718 return tmp;
7719}
7720
7721static inline void hri_tcc_set_CC_DITH6_DITHER_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7722{
7723 TCC_CRITICAL_SECTION_ENTER();
7724 ((Tcc *)hw)->CC[index].reg |= TCC_CC_DITH6_DITHER(mask);
7725 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7726 TCC_CRITICAL_SECTION_LEAVE();
7727}
7728
7729static inline hri_tcc_cc_reg_t hri_tcc_get_CC_DITH6_DITHER_bf(const void *const hw, uint8_t index,
7730 hri_tcc_cc_reg_t mask)
7731{
7732 uint32_t tmp;
7733 tmp = ((Tcc *)hw)->CC[index].reg;
7734 tmp = (tmp & TCC_CC_DITH6_DITHER(mask)) >> TCC_CC_DITH6_DITHER_Pos;
7735 return tmp;
7736}
7737
7738static inline void hri_tcc_write_CC_DITH6_DITHER_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t data)
7739{
7740 uint32_t tmp;
7741 TCC_CRITICAL_SECTION_ENTER();
7742 tmp = ((Tcc *)hw)->CC[index].reg;
7743 tmp &= ~TCC_CC_DITH6_DITHER_Msk;
7744 tmp |= TCC_CC_DITH6_DITHER(data);
7745 ((Tcc *)hw)->CC[index].reg = tmp;
7746 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7747 TCC_CRITICAL_SECTION_LEAVE();
7748}
7749
7750static inline void hri_tcc_clear_CC_DITH6_DITHER_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7751{
7752 TCC_CRITICAL_SECTION_ENTER();
7753 ((Tcc *)hw)->CC[index].reg &= ~TCC_CC_DITH6_DITHER(mask);
7754 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7755 TCC_CRITICAL_SECTION_LEAVE();
7756}
7757
7758static inline void hri_tcc_toggle_CC_DITH6_DITHER_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7759{
7760 TCC_CRITICAL_SECTION_ENTER();
7761 ((Tcc *)hw)->CC[index].reg ^= TCC_CC_DITH6_DITHER(mask);
7762 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
7763 TCC_CRITICAL_SECTION_LEAVE();
7764}
7765
7766static inline hri_tcc_cc_reg_t hri_tcc_read_CC_DITH6_DITHER_bf(const void *const hw, uint8_t index)
7767{
7768 uint32_t tmp;
7769 tmp = ((Tcc *)hw)->CC[index].reg;
7770 tmp = (tmp & TCC_CC_DITH6_DITHER_Msk) >> TCC_CC_DITH6_DITHER_Pos;
7771 return tmp;
7772}
7773
7774static inline void hri_tcc_set_CC_DITH6_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7775{
7776 TCC_CRITICAL_SECTION_ENTER();
7777 ((Tcc *)hw)->CC[index].reg |= TCC_CC_CC(mask);
7778 hri_tcc_wait_for_sync(hw,
7779 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
7780 | TCC_SYNCBUSY_CC5);
7781 TCC_CRITICAL_SECTION_LEAVE();
7782}
7783
7784static inline hri_tcc_cc_reg_t hri_tcc_get_CC_DITH6_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7785{
7786 uint32_t tmp;
7787 tmp = ((Tcc *)hw)->CC[index].reg;
7788 tmp = (tmp & TCC_CC_CC(mask)) >> TCC_CC_CC_Pos;
7789 return tmp;
7790}
7791
7792static inline void hri_tcc_write_CC_DITH6_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t data)
7793{
7794 uint32_t tmp;
7795 TCC_CRITICAL_SECTION_ENTER();
7796 tmp = ((Tcc *)hw)->CC[index].reg;
7797 tmp &= ~TCC_CC_CC_Msk;
7798 tmp |= TCC_CC_CC(data);
7799 ((Tcc *)hw)->CC[index].reg = tmp;
7800 hri_tcc_wait_for_sync(hw,
7801 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
7802 | TCC_SYNCBUSY_CC5);
7803 TCC_CRITICAL_SECTION_LEAVE();
7804}
7805
7806static inline void hri_tcc_clear_CC_DITH6_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7807{
7808 TCC_CRITICAL_SECTION_ENTER();
7809 ((Tcc *)hw)->CC[index].reg &= ~TCC_CC_CC(mask);
7810 hri_tcc_wait_for_sync(hw,
7811 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
7812 | TCC_SYNCBUSY_CC5);
7813 TCC_CRITICAL_SECTION_LEAVE();
7814}
7815
7816static inline void hri_tcc_toggle_CC_DITH6_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7817{
7818 TCC_CRITICAL_SECTION_ENTER();
7819 ((Tcc *)hw)->CC[index].reg ^= TCC_CC_CC(mask);
7820 hri_tcc_wait_for_sync(hw,
7821 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
7822 | TCC_SYNCBUSY_CC5);
7823 TCC_CRITICAL_SECTION_LEAVE();
7824}
7825
7826static inline hri_tcc_cc_reg_t hri_tcc_read_CC_DITH6_CC_bf(const void *const hw, uint8_t index)
7827{
7828 uint32_t tmp;
7829 tmp = ((Tcc *)hw)->CC[index].reg;
7830 tmp = (tmp & TCC_CC_CC_Msk) >> TCC_CC_CC_Pos;
7831 return tmp;
7832}
7833
7834static inline void hri_tcc_set_CC_DITH5_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7835{
7836 TCC_CRITICAL_SECTION_ENTER();
7837 ((Tcc *)hw)->CC[index].reg |= TCC_CC_CC(mask);
7838 hri_tcc_wait_for_sync(hw,
7839 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
7840 | TCC_SYNCBUSY_CC5);
7841 TCC_CRITICAL_SECTION_LEAVE();
7842}
7843
7844static inline hri_tcc_cc_reg_t hri_tcc_get_CC_DITH5_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7845{
7846 uint32_t tmp;
7847 tmp = ((Tcc *)hw)->CC[index].reg;
7848 tmp = (tmp & TCC_CC_CC(mask)) >> TCC_CC_CC_Pos;
7849 return tmp;
7850}
7851
7852static inline void hri_tcc_write_CC_DITH5_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t data)
7853{
7854 uint32_t tmp;
7855 TCC_CRITICAL_SECTION_ENTER();
7856 tmp = ((Tcc *)hw)->CC[index].reg;
7857 tmp &= ~TCC_CC_CC_Msk;
7858 tmp |= TCC_CC_CC(data);
7859 ((Tcc *)hw)->CC[index].reg = tmp;
7860 hri_tcc_wait_for_sync(hw,
7861 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
7862 | TCC_SYNCBUSY_CC5);
7863 TCC_CRITICAL_SECTION_LEAVE();
7864}
7865
7866static inline void hri_tcc_clear_CC_DITH5_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7867{
7868 TCC_CRITICAL_SECTION_ENTER();
7869 ((Tcc *)hw)->CC[index].reg &= ~TCC_CC_CC(mask);
7870 hri_tcc_wait_for_sync(hw,
7871 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
7872 | TCC_SYNCBUSY_CC5);
7873 TCC_CRITICAL_SECTION_LEAVE();
7874}
7875
7876static inline void hri_tcc_toggle_CC_DITH5_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7877{
7878 TCC_CRITICAL_SECTION_ENTER();
7879 ((Tcc *)hw)->CC[index].reg ^= TCC_CC_CC(mask);
7880 hri_tcc_wait_for_sync(hw,
7881 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
7882 | TCC_SYNCBUSY_CC5);
7883 TCC_CRITICAL_SECTION_LEAVE();
7884}
7885
7886static inline hri_tcc_cc_reg_t hri_tcc_read_CC_DITH5_CC_bf(const void *const hw, uint8_t index)
7887{
7888 uint32_t tmp;
7889 tmp = ((Tcc *)hw)->CC[index].reg;
7890 tmp = (tmp & TCC_CC_CC_Msk) >> TCC_CC_CC_Pos;
7891 return tmp;
7892}
7893
7894static inline void hri_tcc_set_CC_DITH4_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7895{
7896 TCC_CRITICAL_SECTION_ENTER();
7897 ((Tcc *)hw)->CC[index].reg |= TCC_CC_CC(mask);
7898 hri_tcc_wait_for_sync(hw,
7899 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
7900 | TCC_SYNCBUSY_CC5);
7901 TCC_CRITICAL_SECTION_LEAVE();
7902}
7903
7904static inline hri_tcc_cc_reg_t hri_tcc_get_CC_DITH4_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7905{
7906 uint32_t tmp;
7907 tmp = ((Tcc *)hw)->CC[index].reg;
7908 tmp = (tmp & TCC_CC_CC(mask)) >> TCC_CC_CC_Pos;
7909 return tmp;
7910}
7911
7912static inline void hri_tcc_write_CC_DITH4_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t data)
7913{
7914 uint32_t tmp;
7915 TCC_CRITICAL_SECTION_ENTER();
7916 tmp = ((Tcc *)hw)->CC[index].reg;
7917 tmp &= ~TCC_CC_CC_Msk;
7918 tmp |= TCC_CC_CC(data);
7919 ((Tcc *)hw)->CC[index].reg = tmp;
7920 hri_tcc_wait_for_sync(hw,
7921 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
7922 | TCC_SYNCBUSY_CC5);
7923 TCC_CRITICAL_SECTION_LEAVE();
7924}
7925
7926static inline void hri_tcc_clear_CC_DITH4_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7927{
7928 TCC_CRITICAL_SECTION_ENTER();
7929 ((Tcc *)hw)->CC[index].reg &= ~TCC_CC_CC(mask);
7930 hri_tcc_wait_for_sync(hw,
7931 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
7932 | TCC_SYNCBUSY_CC5);
7933 TCC_CRITICAL_SECTION_LEAVE();
7934}
7935
7936static inline void hri_tcc_toggle_CC_DITH4_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7937{
7938 TCC_CRITICAL_SECTION_ENTER();
7939 ((Tcc *)hw)->CC[index].reg ^= TCC_CC_CC(mask);
7940 hri_tcc_wait_for_sync(hw,
7941 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
7942 | TCC_SYNCBUSY_CC5);
7943 TCC_CRITICAL_SECTION_LEAVE();
7944}
7945
7946static inline hri_tcc_cc_reg_t hri_tcc_read_CC_DITH4_CC_bf(const void *const hw, uint8_t index)
7947{
7948 uint32_t tmp;
7949 tmp = ((Tcc *)hw)->CC[index].reg;
7950 tmp = (tmp & TCC_CC_CC_Msk) >> TCC_CC_CC_Pos;
7951 return tmp;
7952}
7953
7954static inline void hri_tcc_set_CC_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7955{
7956 TCC_CRITICAL_SECTION_ENTER();
7957 ((Tcc *)hw)->CC[index].reg |= TCC_CC_CC(mask);
7958 hri_tcc_wait_for_sync(hw,
7959 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
7960 | TCC_SYNCBUSY_CC5);
7961 TCC_CRITICAL_SECTION_LEAVE();
7962}
7963
7964static inline hri_tcc_cc_reg_t hri_tcc_get_CC_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7965{
7966 uint32_t tmp;
7967 tmp = ((Tcc *)hw)->CC[index].reg;
7968 tmp = (tmp & TCC_CC_CC(mask)) >> TCC_CC_CC_Pos;
7969 return tmp;
7970}
7971
7972static inline void hri_tcc_write_CC_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t data)
7973{
7974 uint32_t tmp;
7975 TCC_CRITICAL_SECTION_ENTER();
7976 tmp = ((Tcc *)hw)->CC[index].reg;
7977 tmp &= ~TCC_CC_CC_Msk;
7978 tmp |= TCC_CC_CC(data);
7979 ((Tcc *)hw)->CC[index].reg = tmp;
7980 hri_tcc_wait_for_sync(hw,
7981 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
7982 | TCC_SYNCBUSY_CC5);
7983 TCC_CRITICAL_SECTION_LEAVE();
7984}
7985
7986static inline void hri_tcc_clear_CC_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7987{
7988 TCC_CRITICAL_SECTION_ENTER();
7989 ((Tcc *)hw)->CC[index].reg &= ~TCC_CC_CC(mask);
7990 hri_tcc_wait_for_sync(hw,
7991 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
7992 | TCC_SYNCBUSY_CC5);
7993 TCC_CRITICAL_SECTION_LEAVE();
7994}
7995
7996static inline void hri_tcc_toggle_CC_CC_bf(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
7997{
7998 TCC_CRITICAL_SECTION_ENTER();
7999 ((Tcc *)hw)->CC[index].reg ^= TCC_CC_CC(mask);
8000 hri_tcc_wait_for_sync(hw,
8001 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
8002 | TCC_SYNCBUSY_CC5);
8003 TCC_CRITICAL_SECTION_LEAVE();
8004}
8005
8006static inline hri_tcc_cc_reg_t hri_tcc_read_CC_CC_bf(const void *const hw, uint8_t index)
8007{
8008 uint32_t tmp;
8009 tmp = ((Tcc *)hw)->CC[index].reg;
8010 tmp = (tmp & TCC_CC_CC_Msk) >> TCC_CC_CC_Pos;
8011 return tmp;
8012}
8013
8014static inline void hri_tcc_set_CC_reg(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
8015{
8016 TCC_CRITICAL_SECTION_ENTER();
8017 ((Tcc *)hw)->CC[index].reg |= mask;
8018 hri_tcc_wait_for_sync(hw,
8019 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
8020 | TCC_SYNCBUSY_CC5);
8021 TCC_CRITICAL_SECTION_LEAVE();
8022}
8023
8024static inline hri_tcc_cc_reg_t hri_tcc_get_CC_reg(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
8025{
8026 uint32_t tmp;
8027 hri_tcc_wait_for_sync(hw,
8028 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
8029 | TCC_SYNCBUSY_CC5);
8030 tmp = ((Tcc *)hw)->CC[index].reg;
8031 tmp &= mask;
8032 return tmp;
8033}
8034
8035static inline void hri_tcc_write_CC_reg(const void *const hw, uint8_t index, hri_tcc_cc_reg_t data)
8036{
8037 TCC_CRITICAL_SECTION_ENTER();
8038 ((Tcc *)hw)->CC[index].reg = data;
8039 hri_tcc_wait_for_sync(hw,
8040 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
8041 | TCC_SYNCBUSY_CC5);
8042 TCC_CRITICAL_SECTION_LEAVE();
8043}
8044
8045static inline void hri_tcc_clear_CC_reg(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
8046{
8047 TCC_CRITICAL_SECTION_ENTER();
8048 ((Tcc *)hw)->CC[index].reg &= ~mask;
8049 hri_tcc_wait_for_sync(hw,
8050 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
8051 | TCC_SYNCBUSY_CC5);
8052 TCC_CRITICAL_SECTION_LEAVE();
8053}
8054
8055static inline void hri_tcc_toggle_CC_reg(const void *const hw, uint8_t index, hri_tcc_cc_reg_t mask)
8056{
8057 TCC_CRITICAL_SECTION_ENTER();
8058 ((Tcc *)hw)->CC[index].reg ^= mask;
8059 hri_tcc_wait_for_sync(hw,
8060 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
8061 | TCC_SYNCBUSY_CC5);
8062 TCC_CRITICAL_SECTION_LEAVE();
8063}
8064
8065static inline hri_tcc_cc_reg_t hri_tcc_read_CC_reg(const void *const hw, uint8_t index)
8066{
8067 hri_tcc_wait_for_sync(hw,
8068 TCC_SYNCBUSY_CC0 | TCC_SYNCBUSY_CC1 | TCC_SYNCBUSY_CC2 | TCC_SYNCBUSY_CC3 | TCC_SYNCBUSY_CC4
8069 | TCC_SYNCBUSY_CC5);
8070 return ((Tcc *)hw)->CC[index].reg;
8071}
8072
8073static inline void hri_tcc_set_PATTBUF_PGEB0_bit(const void *const hw)
8074{
8075 TCC_CRITICAL_SECTION_ENTER();
8076 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGEB0;
8077 TCC_CRITICAL_SECTION_LEAVE();
8078}
8079
8080static inline bool hri_tcc_get_PATTBUF_PGEB0_bit(const void *const hw)
8081{
8082 uint16_t tmp;
8083 tmp = ((Tcc *)hw)->PATTBUF.reg;
8084 tmp = (tmp & TCC_PATTBUF_PGEB0) >> TCC_PATTBUF_PGEB0_Pos;
8085 return (bool)tmp;
8086}
8087
8088static inline void hri_tcc_write_PATTBUF_PGEB0_bit(const void *const hw, bool value)
8089{
8090 uint16_t tmp;
8091 TCC_CRITICAL_SECTION_ENTER();
8092 tmp = ((Tcc *)hw)->PATTBUF.reg;
8093 tmp &= ~TCC_PATTBUF_PGEB0;
8094 tmp |= value << TCC_PATTBUF_PGEB0_Pos;
8095 ((Tcc *)hw)->PATTBUF.reg = tmp;
8096 TCC_CRITICAL_SECTION_LEAVE();
8097}
8098
8099static inline void hri_tcc_clear_PATTBUF_PGEB0_bit(const void *const hw)
8100{
8101 TCC_CRITICAL_SECTION_ENTER();
8102 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGEB0;
8103 TCC_CRITICAL_SECTION_LEAVE();
8104}
8105
8106static inline void hri_tcc_toggle_PATTBUF_PGEB0_bit(const void *const hw)
8107{
8108 TCC_CRITICAL_SECTION_ENTER();
8109 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGEB0;
8110 TCC_CRITICAL_SECTION_LEAVE();
8111}
8112
8113static inline void hri_tcc_set_PATTBUF_PGEB1_bit(const void *const hw)
8114{
8115 TCC_CRITICAL_SECTION_ENTER();
8116 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGEB1;
8117 TCC_CRITICAL_SECTION_LEAVE();
8118}
8119
8120static inline bool hri_tcc_get_PATTBUF_PGEB1_bit(const void *const hw)
8121{
8122 uint16_t tmp;
8123 tmp = ((Tcc *)hw)->PATTBUF.reg;
8124 tmp = (tmp & TCC_PATTBUF_PGEB1) >> TCC_PATTBUF_PGEB1_Pos;
8125 return (bool)tmp;
8126}
8127
8128static inline void hri_tcc_write_PATTBUF_PGEB1_bit(const void *const hw, bool value)
8129{
8130 uint16_t tmp;
8131 TCC_CRITICAL_SECTION_ENTER();
8132 tmp = ((Tcc *)hw)->PATTBUF.reg;
8133 tmp &= ~TCC_PATTBUF_PGEB1;
8134 tmp |= value << TCC_PATTBUF_PGEB1_Pos;
8135 ((Tcc *)hw)->PATTBUF.reg = tmp;
8136 TCC_CRITICAL_SECTION_LEAVE();
8137}
8138
8139static inline void hri_tcc_clear_PATTBUF_PGEB1_bit(const void *const hw)
8140{
8141 TCC_CRITICAL_SECTION_ENTER();
8142 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGEB1;
8143 TCC_CRITICAL_SECTION_LEAVE();
8144}
8145
8146static inline void hri_tcc_toggle_PATTBUF_PGEB1_bit(const void *const hw)
8147{
8148 TCC_CRITICAL_SECTION_ENTER();
8149 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGEB1;
8150 TCC_CRITICAL_SECTION_LEAVE();
8151}
8152
8153static inline void hri_tcc_set_PATTBUF_PGEB2_bit(const void *const hw)
8154{
8155 TCC_CRITICAL_SECTION_ENTER();
8156 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGEB2;
8157 TCC_CRITICAL_SECTION_LEAVE();
8158}
8159
8160static inline bool hri_tcc_get_PATTBUF_PGEB2_bit(const void *const hw)
8161{
8162 uint16_t tmp;
8163 tmp = ((Tcc *)hw)->PATTBUF.reg;
8164 tmp = (tmp & TCC_PATTBUF_PGEB2) >> TCC_PATTBUF_PGEB2_Pos;
8165 return (bool)tmp;
8166}
8167
8168static inline void hri_tcc_write_PATTBUF_PGEB2_bit(const void *const hw, bool value)
8169{
8170 uint16_t tmp;
8171 TCC_CRITICAL_SECTION_ENTER();
8172 tmp = ((Tcc *)hw)->PATTBUF.reg;
8173 tmp &= ~TCC_PATTBUF_PGEB2;
8174 tmp |= value << TCC_PATTBUF_PGEB2_Pos;
8175 ((Tcc *)hw)->PATTBUF.reg = tmp;
8176 TCC_CRITICAL_SECTION_LEAVE();
8177}
8178
8179static inline void hri_tcc_clear_PATTBUF_PGEB2_bit(const void *const hw)
8180{
8181 TCC_CRITICAL_SECTION_ENTER();
8182 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGEB2;
8183 TCC_CRITICAL_SECTION_LEAVE();
8184}
8185
8186static inline void hri_tcc_toggle_PATTBUF_PGEB2_bit(const void *const hw)
8187{
8188 TCC_CRITICAL_SECTION_ENTER();
8189 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGEB2;
8190 TCC_CRITICAL_SECTION_LEAVE();
8191}
8192
8193static inline void hri_tcc_set_PATTBUF_PGEB3_bit(const void *const hw)
8194{
8195 TCC_CRITICAL_SECTION_ENTER();
8196 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGEB3;
8197 TCC_CRITICAL_SECTION_LEAVE();
8198}
8199
8200static inline bool hri_tcc_get_PATTBUF_PGEB3_bit(const void *const hw)
8201{
8202 uint16_t tmp;
8203 tmp = ((Tcc *)hw)->PATTBUF.reg;
8204 tmp = (tmp & TCC_PATTBUF_PGEB3) >> TCC_PATTBUF_PGEB3_Pos;
8205 return (bool)tmp;
8206}
8207
8208static inline void hri_tcc_write_PATTBUF_PGEB3_bit(const void *const hw, bool value)
8209{
8210 uint16_t tmp;
8211 TCC_CRITICAL_SECTION_ENTER();
8212 tmp = ((Tcc *)hw)->PATTBUF.reg;
8213 tmp &= ~TCC_PATTBUF_PGEB3;
8214 tmp |= value << TCC_PATTBUF_PGEB3_Pos;
8215 ((Tcc *)hw)->PATTBUF.reg = tmp;
8216 TCC_CRITICAL_SECTION_LEAVE();
8217}
8218
8219static inline void hri_tcc_clear_PATTBUF_PGEB3_bit(const void *const hw)
8220{
8221 TCC_CRITICAL_SECTION_ENTER();
8222 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGEB3;
8223 TCC_CRITICAL_SECTION_LEAVE();
8224}
8225
8226static inline void hri_tcc_toggle_PATTBUF_PGEB3_bit(const void *const hw)
8227{
8228 TCC_CRITICAL_SECTION_ENTER();
8229 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGEB3;
8230 TCC_CRITICAL_SECTION_LEAVE();
8231}
8232
8233static inline void hri_tcc_set_PATTBUF_PGEB4_bit(const void *const hw)
8234{
8235 TCC_CRITICAL_SECTION_ENTER();
8236 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGEB4;
8237 TCC_CRITICAL_SECTION_LEAVE();
8238}
8239
8240static inline bool hri_tcc_get_PATTBUF_PGEB4_bit(const void *const hw)
8241{
8242 uint16_t tmp;
8243 tmp = ((Tcc *)hw)->PATTBUF.reg;
8244 tmp = (tmp & TCC_PATTBUF_PGEB4) >> TCC_PATTBUF_PGEB4_Pos;
8245 return (bool)tmp;
8246}
8247
8248static inline void hri_tcc_write_PATTBUF_PGEB4_bit(const void *const hw, bool value)
8249{
8250 uint16_t tmp;
8251 TCC_CRITICAL_SECTION_ENTER();
8252 tmp = ((Tcc *)hw)->PATTBUF.reg;
8253 tmp &= ~TCC_PATTBUF_PGEB4;
8254 tmp |= value << TCC_PATTBUF_PGEB4_Pos;
8255 ((Tcc *)hw)->PATTBUF.reg = tmp;
8256 TCC_CRITICAL_SECTION_LEAVE();
8257}
8258
8259static inline void hri_tcc_clear_PATTBUF_PGEB4_bit(const void *const hw)
8260{
8261 TCC_CRITICAL_SECTION_ENTER();
8262 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGEB4;
8263 TCC_CRITICAL_SECTION_LEAVE();
8264}
8265
8266static inline void hri_tcc_toggle_PATTBUF_PGEB4_bit(const void *const hw)
8267{
8268 TCC_CRITICAL_SECTION_ENTER();
8269 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGEB4;
8270 TCC_CRITICAL_SECTION_LEAVE();
8271}
8272
8273static inline void hri_tcc_set_PATTBUF_PGEB5_bit(const void *const hw)
8274{
8275 TCC_CRITICAL_SECTION_ENTER();
8276 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGEB5;
8277 TCC_CRITICAL_SECTION_LEAVE();
8278}
8279
8280static inline bool hri_tcc_get_PATTBUF_PGEB5_bit(const void *const hw)
8281{
8282 uint16_t tmp;
8283 tmp = ((Tcc *)hw)->PATTBUF.reg;
8284 tmp = (tmp & TCC_PATTBUF_PGEB5) >> TCC_PATTBUF_PGEB5_Pos;
8285 return (bool)tmp;
8286}
8287
8288static inline void hri_tcc_write_PATTBUF_PGEB5_bit(const void *const hw, bool value)
8289{
8290 uint16_t tmp;
8291 TCC_CRITICAL_SECTION_ENTER();
8292 tmp = ((Tcc *)hw)->PATTBUF.reg;
8293 tmp &= ~TCC_PATTBUF_PGEB5;
8294 tmp |= value << TCC_PATTBUF_PGEB5_Pos;
8295 ((Tcc *)hw)->PATTBUF.reg = tmp;
8296 TCC_CRITICAL_SECTION_LEAVE();
8297}
8298
8299static inline void hri_tcc_clear_PATTBUF_PGEB5_bit(const void *const hw)
8300{
8301 TCC_CRITICAL_SECTION_ENTER();
8302 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGEB5;
8303 TCC_CRITICAL_SECTION_LEAVE();
8304}
8305
8306static inline void hri_tcc_toggle_PATTBUF_PGEB5_bit(const void *const hw)
8307{
8308 TCC_CRITICAL_SECTION_ENTER();
8309 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGEB5;
8310 TCC_CRITICAL_SECTION_LEAVE();
8311}
8312
8313static inline void hri_tcc_set_PATTBUF_PGEB6_bit(const void *const hw)
8314{
8315 TCC_CRITICAL_SECTION_ENTER();
8316 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGEB6;
8317 TCC_CRITICAL_SECTION_LEAVE();
8318}
8319
8320static inline bool hri_tcc_get_PATTBUF_PGEB6_bit(const void *const hw)
8321{
8322 uint16_t tmp;
8323 tmp = ((Tcc *)hw)->PATTBUF.reg;
8324 tmp = (tmp & TCC_PATTBUF_PGEB6) >> TCC_PATTBUF_PGEB6_Pos;
8325 return (bool)tmp;
8326}
8327
8328static inline void hri_tcc_write_PATTBUF_PGEB6_bit(const void *const hw, bool value)
8329{
8330 uint16_t tmp;
8331 TCC_CRITICAL_SECTION_ENTER();
8332 tmp = ((Tcc *)hw)->PATTBUF.reg;
8333 tmp &= ~TCC_PATTBUF_PGEB6;
8334 tmp |= value << TCC_PATTBUF_PGEB6_Pos;
8335 ((Tcc *)hw)->PATTBUF.reg = tmp;
8336 TCC_CRITICAL_SECTION_LEAVE();
8337}
8338
8339static inline void hri_tcc_clear_PATTBUF_PGEB6_bit(const void *const hw)
8340{
8341 TCC_CRITICAL_SECTION_ENTER();
8342 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGEB6;
8343 TCC_CRITICAL_SECTION_LEAVE();
8344}
8345
8346static inline void hri_tcc_toggle_PATTBUF_PGEB6_bit(const void *const hw)
8347{
8348 TCC_CRITICAL_SECTION_ENTER();
8349 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGEB6;
8350 TCC_CRITICAL_SECTION_LEAVE();
8351}
8352
8353static inline void hri_tcc_set_PATTBUF_PGEB7_bit(const void *const hw)
8354{
8355 TCC_CRITICAL_SECTION_ENTER();
8356 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGEB7;
8357 TCC_CRITICAL_SECTION_LEAVE();
8358}
8359
8360static inline bool hri_tcc_get_PATTBUF_PGEB7_bit(const void *const hw)
8361{
8362 uint16_t tmp;
8363 tmp = ((Tcc *)hw)->PATTBUF.reg;
8364 tmp = (tmp & TCC_PATTBUF_PGEB7) >> TCC_PATTBUF_PGEB7_Pos;
8365 return (bool)tmp;
8366}
8367
8368static inline void hri_tcc_write_PATTBUF_PGEB7_bit(const void *const hw, bool value)
8369{
8370 uint16_t tmp;
8371 TCC_CRITICAL_SECTION_ENTER();
8372 tmp = ((Tcc *)hw)->PATTBUF.reg;
8373 tmp &= ~TCC_PATTBUF_PGEB7;
8374 tmp |= value << TCC_PATTBUF_PGEB7_Pos;
8375 ((Tcc *)hw)->PATTBUF.reg = tmp;
8376 TCC_CRITICAL_SECTION_LEAVE();
8377}
8378
8379static inline void hri_tcc_clear_PATTBUF_PGEB7_bit(const void *const hw)
8380{
8381 TCC_CRITICAL_SECTION_ENTER();
8382 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGEB7;
8383 TCC_CRITICAL_SECTION_LEAVE();
8384}
8385
8386static inline void hri_tcc_toggle_PATTBUF_PGEB7_bit(const void *const hw)
8387{
8388 TCC_CRITICAL_SECTION_ENTER();
8389 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGEB7;
8390 TCC_CRITICAL_SECTION_LEAVE();
8391}
8392
8393static inline void hri_tcc_set_PATTBUF_PGVB0_bit(const void *const hw)
8394{
8395 TCC_CRITICAL_SECTION_ENTER();
8396 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGVB0;
8397 TCC_CRITICAL_SECTION_LEAVE();
8398}
8399
8400static inline bool hri_tcc_get_PATTBUF_PGVB0_bit(const void *const hw)
8401{
8402 uint16_t tmp;
8403 tmp = ((Tcc *)hw)->PATTBUF.reg;
8404 tmp = (tmp & TCC_PATTBUF_PGVB0) >> TCC_PATTBUF_PGVB0_Pos;
8405 return (bool)tmp;
8406}
8407
8408static inline void hri_tcc_write_PATTBUF_PGVB0_bit(const void *const hw, bool value)
8409{
8410 uint16_t tmp;
8411 TCC_CRITICAL_SECTION_ENTER();
8412 tmp = ((Tcc *)hw)->PATTBUF.reg;
8413 tmp &= ~TCC_PATTBUF_PGVB0;
8414 tmp |= value << TCC_PATTBUF_PGVB0_Pos;
8415 ((Tcc *)hw)->PATTBUF.reg = tmp;
8416 TCC_CRITICAL_SECTION_LEAVE();
8417}
8418
8419static inline void hri_tcc_clear_PATTBUF_PGVB0_bit(const void *const hw)
8420{
8421 TCC_CRITICAL_SECTION_ENTER();
8422 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGVB0;
8423 TCC_CRITICAL_SECTION_LEAVE();
8424}
8425
8426static inline void hri_tcc_toggle_PATTBUF_PGVB0_bit(const void *const hw)
8427{
8428 TCC_CRITICAL_SECTION_ENTER();
8429 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGVB0;
8430 TCC_CRITICAL_SECTION_LEAVE();
8431}
8432
8433static inline void hri_tcc_set_PATTBUF_PGVB1_bit(const void *const hw)
8434{
8435 TCC_CRITICAL_SECTION_ENTER();
8436 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGVB1;
8437 TCC_CRITICAL_SECTION_LEAVE();
8438}
8439
8440static inline bool hri_tcc_get_PATTBUF_PGVB1_bit(const void *const hw)
8441{
8442 uint16_t tmp;
8443 tmp = ((Tcc *)hw)->PATTBUF.reg;
8444 tmp = (tmp & TCC_PATTBUF_PGVB1) >> TCC_PATTBUF_PGVB1_Pos;
8445 return (bool)tmp;
8446}
8447
8448static inline void hri_tcc_write_PATTBUF_PGVB1_bit(const void *const hw, bool value)
8449{
8450 uint16_t tmp;
8451 TCC_CRITICAL_SECTION_ENTER();
8452 tmp = ((Tcc *)hw)->PATTBUF.reg;
8453 tmp &= ~TCC_PATTBUF_PGVB1;
8454 tmp |= value << TCC_PATTBUF_PGVB1_Pos;
8455 ((Tcc *)hw)->PATTBUF.reg = tmp;
8456 TCC_CRITICAL_SECTION_LEAVE();
8457}
8458
8459static inline void hri_tcc_clear_PATTBUF_PGVB1_bit(const void *const hw)
8460{
8461 TCC_CRITICAL_SECTION_ENTER();
8462 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGVB1;
8463 TCC_CRITICAL_SECTION_LEAVE();
8464}
8465
8466static inline void hri_tcc_toggle_PATTBUF_PGVB1_bit(const void *const hw)
8467{
8468 TCC_CRITICAL_SECTION_ENTER();
8469 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGVB1;
8470 TCC_CRITICAL_SECTION_LEAVE();
8471}
8472
8473static inline void hri_tcc_set_PATTBUF_PGVB2_bit(const void *const hw)
8474{
8475 TCC_CRITICAL_SECTION_ENTER();
8476 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGVB2;
8477 TCC_CRITICAL_SECTION_LEAVE();
8478}
8479
8480static inline bool hri_tcc_get_PATTBUF_PGVB2_bit(const void *const hw)
8481{
8482 uint16_t tmp;
8483 tmp = ((Tcc *)hw)->PATTBUF.reg;
8484 tmp = (tmp & TCC_PATTBUF_PGVB2) >> TCC_PATTBUF_PGVB2_Pos;
8485 return (bool)tmp;
8486}
8487
8488static inline void hri_tcc_write_PATTBUF_PGVB2_bit(const void *const hw, bool value)
8489{
8490 uint16_t tmp;
8491 TCC_CRITICAL_SECTION_ENTER();
8492 tmp = ((Tcc *)hw)->PATTBUF.reg;
8493 tmp &= ~TCC_PATTBUF_PGVB2;
8494 tmp |= value << TCC_PATTBUF_PGVB2_Pos;
8495 ((Tcc *)hw)->PATTBUF.reg = tmp;
8496 TCC_CRITICAL_SECTION_LEAVE();
8497}
8498
8499static inline void hri_tcc_clear_PATTBUF_PGVB2_bit(const void *const hw)
8500{
8501 TCC_CRITICAL_SECTION_ENTER();
8502 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGVB2;
8503 TCC_CRITICAL_SECTION_LEAVE();
8504}
8505
8506static inline void hri_tcc_toggle_PATTBUF_PGVB2_bit(const void *const hw)
8507{
8508 TCC_CRITICAL_SECTION_ENTER();
8509 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGVB2;
8510 TCC_CRITICAL_SECTION_LEAVE();
8511}
8512
8513static inline void hri_tcc_set_PATTBUF_PGVB3_bit(const void *const hw)
8514{
8515 TCC_CRITICAL_SECTION_ENTER();
8516 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGVB3;
8517 TCC_CRITICAL_SECTION_LEAVE();
8518}
8519
8520static inline bool hri_tcc_get_PATTBUF_PGVB3_bit(const void *const hw)
8521{
8522 uint16_t tmp;
8523 tmp = ((Tcc *)hw)->PATTBUF.reg;
8524 tmp = (tmp & TCC_PATTBUF_PGVB3) >> TCC_PATTBUF_PGVB3_Pos;
8525 return (bool)tmp;
8526}
8527
8528static inline void hri_tcc_write_PATTBUF_PGVB3_bit(const void *const hw, bool value)
8529{
8530 uint16_t tmp;
8531 TCC_CRITICAL_SECTION_ENTER();
8532 tmp = ((Tcc *)hw)->PATTBUF.reg;
8533 tmp &= ~TCC_PATTBUF_PGVB3;
8534 tmp |= value << TCC_PATTBUF_PGVB3_Pos;
8535 ((Tcc *)hw)->PATTBUF.reg = tmp;
8536 TCC_CRITICAL_SECTION_LEAVE();
8537}
8538
8539static inline void hri_tcc_clear_PATTBUF_PGVB3_bit(const void *const hw)
8540{
8541 TCC_CRITICAL_SECTION_ENTER();
8542 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGVB3;
8543 TCC_CRITICAL_SECTION_LEAVE();
8544}
8545
8546static inline void hri_tcc_toggle_PATTBUF_PGVB3_bit(const void *const hw)
8547{
8548 TCC_CRITICAL_SECTION_ENTER();
8549 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGVB3;
8550 TCC_CRITICAL_SECTION_LEAVE();
8551}
8552
8553static inline void hri_tcc_set_PATTBUF_PGVB4_bit(const void *const hw)
8554{
8555 TCC_CRITICAL_SECTION_ENTER();
8556 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGVB4;
8557 TCC_CRITICAL_SECTION_LEAVE();
8558}
8559
8560static inline bool hri_tcc_get_PATTBUF_PGVB4_bit(const void *const hw)
8561{
8562 uint16_t tmp;
8563 tmp = ((Tcc *)hw)->PATTBUF.reg;
8564 tmp = (tmp & TCC_PATTBUF_PGVB4) >> TCC_PATTBUF_PGVB4_Pos;
8565 return (bool)tmp;
8566}
8567
8568static inline void hri_tcc_write_PATTBUF_PGVB4_bit(const void *const hw, bool value)
8569{
8570 uint16_t tmp;
8571 TCC_CRITICAL_SECTION_ENTER();
8572 tmp = ((Tcc *)hw)->PATTBUF.reg;
8573 tmp &= ~TCC_PATTBUF_PGVB4;
8574 tmp |= value << TCC_PATTBUF_PGVB4_Pos;
8575 ((Tcc *)hw)->PATTBUF.reg = tmp;
8576 TCC_CRITICAL_SECTION_LEAVE();
8577}
8578
8579static inline void hri_tcc_clear_PATTBUF_PGVB4_bit(const void *const hw)
8580{
8581 TCC_CRITICAL_SECTION_ENTER();
8582 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGVB4;
8583 TCC_CRITICAL_SECTION_LEAVE();
8584}
8585
8586static inline void hri_tcc_toggle_PATTBUF_PGVB4_bit(const void *const hw)
8587{
8588 TCC_CRITICAL_SECTION_ENTER();
8589 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGVB4;
8590 TCC_CRITICAL_SECTION_LEAVE();
8591}
8592
8593static inline void hri_tcc_set_PATTBUF_PGVB5_bit(const void *const hw)
8594{
8595 TCC_CRITICAL_SECTION_ENTER();
8596 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGVB5;
8597 TCC_CRITICAL_SECTION_LEAVE();
8598}
8599
8600static inline bool hri_tcc_get_PATTBUF_PGVB5_bit(const void *const hw)
8601{
8602 uint16_t tmp;
8603 tmp = ((Tcc *)hw)->PATTBUF.reg;
8604 tmp = (tmp & TCC_PATTBUF_PGVB5) >> TCC_PATTBUF_PGVB5_Pos;
8605 return (bool)tmp;
8606}
8607
8608static inline void hri_tcc_write_PATTBUF_PGVB5_bit(const void *const hw, bool value)
8609{
8610 uint16_t tmp;
8611 TCC_CRITICAL_SECTION_ENTER();
8612 tmp = ((Tcc *)hw)->PATTBUF.reg;
8613 tmp &= ~TCC_PATTBUF_PGVB5;
8614 tmp |= value << TCC_PATTBUF_PGVB5_Pos;
8615 ((Tcc *)hw)->PATTBUF.reg = tmp;
8616 TCC_CRITICAL_SECTION_LEAVE();
8617}
8618
8619static inline void hri_tcc_clear_PATTBUF_PGVB5_bit(const void *const hw)
8620{
8621 TCC_CRITICAL_SECTION_ENTER();
8622 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGVB5;
8623 TCC_CRITICAL_SECTION_LEAVE();
8624}
8625
8626static inline void hri_tcc_toggle_PATTBUF_PGVB5_bit(const void *const hw)
8627{
8628 TCC_CRITICAL_SECTION_ENTER();
8629 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGVB5;
8630 TCC_CRITICAL_SECTION_LEAVE();
8631}
8632
8633static inline void hri_tcc_set_PATTBUF_PGVB6_bit(const void *const hw)
8634{
8635 TCC_CRITICAL_SECTION_ENTER();
8636 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGVB6;
8637 TCC_CRITICAL_SECTION_LEAVE();
8638}
8639
8640static inline bool hri_tcc_get_PATTBUF_PGVB6_bit(const void *const hw)
8641{
8642 uint16_t tmp;
8643 tmp = ((Tcc *)hw)->PATTBUF.reg;
8644 tmp = (tmp & TCC_PATTBUF_PGVB6) >> TCC_PATTBUF_PGVB6_Pos;
8645 return (bool)tmp;
8646}
8647
8648static inline void hri_tcc_write_PATTBUF_PGVB6_bit(const void *const hw, bool value)
8649{
8650 uint16_t tmp;
8651 TCC_CRITICAL_SECTION_ENTER();
8652 tmp = ((Tcc *)hw)->PATTBUF.reg;
8653 tmp &= ~TCC_PATTBUF_PGVB6;
8654 tmp |= value << TCC_PATTBUF_PGVB6_Pos;
8655 ((Tcc *)hw)->PATTBUF.reg = tmp;
8656 TCC_CRITICAL_SECTION_LEAVE();
8657}
8658
8659static inline void hri_tcc_clear_PATTBUF_PGVB6_bit(const void *const hw)
8660{
8661 TCC_CRITICAL_SECTION_ENTER();
8662 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGVB6;
8663 TCC_CRITICAL_SECTION_LEAVE();
8664}
8665
8666static inline void hri_tcc_toggle_PATTBUF_PGVB6_bit(const void *const hw)
8667{
8668 TCC_CRITICAL_SECTION_ENTER();
8669 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGVB6;
8670 TCC_CRITICAL_SECTION_LEAVE();
8671}
8672
8673static inline void hri_tcc_set_PATTBUF_PGVB7_bit(const void *const hw)
8674{
8675 TCC_CRITICAL_SECTION_ENTER();
8676 ((Tcc *)hw)->PATTBUF.reg |= TCC_PATTBUF_PGVB7;
8677 TCC_CRITICAL_SECTION_LEAVE();
8678}
8679
8680static inline bool hri_tcc_get_PATTBUF_PGVB7_bit(const void *const hw)
8681{
8682 uint16_t tmp;
8683 tmp = ((Tcc *)hw)->PATTBUF.reg;
8684 tmp = (tmp & TCC_PATTBUF_PGVB7) >> TCC_PATTBUF_PGVB7_Pos;
8685 return (bool)tmp;
8686}
8687
8688static inline void hri_tcc_write_PATTBUF_PGVB7_bit(const void *const hw, bool value)
8689{
8690 uint16_t tmp;
8691 TCC_CRITICAL_SECTION_ENTER();
8692 tmp = ((Tcc *)hw)->PATTBUF.reg;
8693 tmp &= ~TCC_PATTBUF_PGVB7;
8694 tmp |= value << TCC_PATTBUF_PGVB7_Pos;
8695 ((Tcc *)hw)->PATTBUF.reg = tmp;
8696 TCC_CRITICAL_SECTION_LEAVE();
8697}
8698
8699static inline void hri_tcc_clear_PATTBUF_PGVB7_bit(const void *const hw)
8700{
8701 TCC_CRITICAL_SECTION_ENTER();
8702 ((Tcc *)hw)->PATTBUF.reg &= ~TCC_PATTBUF_PGVB7;
8703 TCC_CRITICAL_SECTION_LEAVE();
8704}
8705
8706static inline void hri_tcc_toggle_PATTBUF_PGVB7_bit(const void *const hw)
8707{
8708 TCC_CRITICAL_SECTION_ENTER();
8709 ((Tcc *)hw)->PATTBUF.reg ^= TCC_PATTBUF_PGVB7;
8710 TCC_CRITICAL_SECTION_LEAVE();
8711}
8712
8713static inline void hri_tcc_set_PATTBUF_reg(const void *const hw, hri_tcc_pattbuf_reg_t mask)
8714{
8715 TCC_CRITICAL_SECTION_ENTER();
8716 ((Tcc *)hw)->PATTBUF.reg |= mask;
8717 TCC_CRITICAL_SECTION_LEAVE();
8718}
8719
8720static inline hri_tcc_pattbuf_reg_t hri_tcc_get_PATTBUF_reg(const void *const hw, hri_tcc_pattbuf_reg_t mask)
8721{
8722 uint16_t tmp;
8723 tmp = ((Tcc *)hw)->PATTBUF.reg;
8724 tmp &= mask;
8725 return tmp;
8726}
8727
8728static inline void hri_tcc_write_PATTBUF_reg(const void *const hw, hri_tcc_pattbuf_reg_t data)
8729{
8730 TCC_CRITICAL_SECTION_ENTER();
8731 ((Tcc *)hw)->PATTBUF.reg = data;
8732 TCC_CRITICAL_SECTION_LEAVE();
8733}
8734
8735static inline void hri_tcc_clear_PATTBUF_reg(const void *const hw, hri_tcc_pattbuf_reg_t mask)
8736{
8737 TCC_CRITICAL_SECTION_ENTER();
8738 ((Tcc *)hw)->PATTBUF.reg &= ~mask;
8739 TCC_CRITICAL_SECTION_LEAVE();
8740}
8741
8742static inline void hri_tcc_toggle_PATTBUF_reg(const void *const hw, hri_tcc_pattbuf_reg_t mask)
8743{
8744 TCC_CRITICAL_SECTION_ENTER();
8745 ((Tcc *)hw)->PATTBUF.reg ^= mask;
8746 TCC_CRITICAL_SECTION_LEAVE();
8747}
8748
8749static inline hri_tcc_pattbuf_reg_t hri_tcc_read_PATTBUF_reg(const void *const hw)
8750{
8751 return ((Tcc *)hw)->PATTBUF.reg;
8752}
8753
8754static inline void hri_tcc_set_PERBUF_DITH4_DITHERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8755{
8756 TCC_CRITICAL_SECTION_ENTER();
8757 ((Tcc *)hw)->PERBUF.reg |= TCC_PERBUF_DITH4_DITHERBUF(mask);
8758 TCC_CRITICAL_SECTION_LEAVE();
8759}
8760
8761static inline hri_tcc_perbuf_reg_t hri_tcc_get_PERBUF_DITH4_DITHERBUF_bf(const void *const hw,
8762 hri_tcc_perbuf_reg_t mask)
8763{
8764 uint32_t tmp;
8765 tmp = ((Tcc *)hw)->PERBUF.reg;
8766 tmp = (tmp & TCC_PERBUF_DITH4_DITHERBUF(mask)) >> TCC_PERBUF_DITH4_DITHERBUF_Pos;
8767 return tmp;
8768}
8769
8770static inline void hri_tcc_write_PERBUF_DITH4_DITHERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t data)
8771{
8772 uint32_t tmp;
8773 TCC_CRITICAL_SECTION_ENTER();
8774 tmp = ((Tcc *)hw)->PERBUF.reg;
8775 tmp &= ~TCC_PERBUF_DITH4_DITHERBUF_Msk;
8776 tmp |= TCC_PERBUF_DITH4_DITHERBUF(data);
8777 ((Tcc *)hw)->PERBUF.reg = tmp;
8778 TCC_CRITICAL_SECTION_LEAVE();
8779}
8780
8781static inline void hri_tcc_clear_PERBUF_DITH4_DITHERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8782{
8783 TCC_CRITICAL_SECTION_ENTER();
8784 ((Tcc *)hw)->PERBUF.reg &= ~TCC_PERBUF_DITH4_DITHERBUF(mask);
8785 TCC_CRITICAL_SECTION_LEAVE();
8786}
8787
8788static inline void hri_tcc_toggle_PERBUF_DITH4_DITHERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8789{
8790 TCC_CRITICAL_SECTION_ENTER();
8791 ((Tcc *)hw)->PERBUF.reg ^= TCC_PERBUF_DITH4_DITHERBUF(mask);
8792 TCC_CRITICAL_SECTION_LEAVE();
8793}
8794
8795static inline hri_tcc_perbuf_reg_t hri_tcc_read_PERBUF_DITH4_DITHERBUF_bf(const void *const hw)
8796{
8797 uint32_t tmp;
8798 tmp = ((Tcc *)hw)->PERBUF.reg;
8799 tmp = (tmp & TCC_PERBUF_DITH4_DITHERBUF_Msk) >> TCC_PERBUF_DITH4_DITHERBUF_Pos;
8800 return tmp;
8801}
8802
8803static inline void hri_tcc_set_PERBUF_DITH5_DITHERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8804{
8805 TCC_CRITICAL_SECTION_ENTER();
8806 ((Tcc *)hw)->PERBUF.reg |= TCC_PERBUF_DITH5_DITHERBUF(mask);
8807 TCC_CRITICAL_SECTION_LEAVE();
8808}
8809
8810static inline hri_tcc_perbuf_reg_t hri_tcc_get_PERBUF_DITH5_DITHERBUF_bf(const void *const hw,
8811 hri_tcc_perbuf_reg_t mask)
8812{
8813 uint32_t tmp;
8814 tmp = ((Tcc *)hw)->PERBUF.reg;
8815 tmp = (tmp & TCC_PERBUF_DITH5_DITHERBUF(mask)) >> TCC_PERBUF_DITH5_DITHERBUF_Pos;
8816 return tmp;
8817}
8818
8819static inline void hri_tcc_write_PERBUF_DITH5_DITHERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t data)
8820{
8821 uint32_t tmp;
8822 TCC_CRITICAL_SECTION_ENTER();
8823 tmp = ((Tcc *)hw)->PERBUF.reg;
8824 tmp &= ~TCC_PERBUF_DITH5_DITHERBUF_Msk;
8825 tmp |= TCC_PERBUF_DITH5_DITHERBUF(data);
8826 ((Tcc *)hw)->PERBUF.reg = tmp;
8827 TCC_CRITICAL_SECTION_LEAVE();
8828}
8829
8830static inline void hri_tcc_clear_PERBUF_DITH5_DITHERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8831{
8832 TCC_CRITICAL_SECTION_ENTER();
8833 ((Tcc *)hw)->PERBUF.reg &= ~TCC_PERBUF_DITH5_DITHERBUF(mask);
8834 TCC_CRITICAL_SECTION_LEAVE();
8835}
8836
8837static inline void hri_tcc_toggle_PERBUF_DITH5_DITHERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8838{
8839 TCC_CRITICAL_SECTION_ENTER();
8840 ((Tcc *)hw)->PERBUF.reg ^= TCC_PERBUF_DITH5_DITHERBUF(mask);
8841 TCC_CRITICAL_SECTION_LEAVE();
8842}
8843
8844static inline hri_tcc_perbuf_reg_t hri_tcc_read_PERBUF_DITH5_DITHERBUF_bf(const void *const hw)
8845{
8846 uint32_t tmp;
8847 tmp = ((Tcc *)hw)->PERBUF.reg;
8848 tmp = (tmp & TCC_PERBUF_DITH5_DITHERBUF_Msk) >> TCC_PERBUF_DITH5_DITHERBUF_Pos;
8849 return tmp;
8850}
8851
8852static inline void hri_tcc_set_PERBUF_DITH6_DITHERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8853{
8854 TCC_CRITICAL_SECTION_ENTER();
8855 ((Tcc *)hw)->PERBUF.reg |= TCC_PERBUF_DITH6_DITHERBUF(mask);
8856 TCC_CRITICAL_SECTION_LEAVE();
8857}
8858
8859static inline hri_tcc_perbuf_reg_t hri_tcc_get_PERBUF_DITH6_DITHERBUF_bf(const void *const hw,
8860 hri_tcc_perbuf_reg_t mask)
8861{
8862 uint32_t tmp;
8863 tmp = ((Tcc *)hw)->PERBUF.reg;
8864 tmp = (tmp & TCC_PERBUF_DITH6_DITHERBUF(mask)) >> TCC_PERBUF_DITH6_DITHERBUF_Pos;
8865 return tmp;
8866}
8867
8868static inline void hri_tcc_write_PERBUF_DITH6_DITHERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t data)
8869{
8870 uint32_t tmp;
8871 TCC_CRITICAL_SECTION_ENTER();
8872 tmp = ((Tcc *)hw)->PERBUF.reg;
8873 tmp &= ~TCC_PERBUF_DITH6_DITHERBUF_Msk;
8874 tmp |= TCC_PERBUF_DITH6_DITHERBUF(data);
8875 ((Tcc *)hw)->PERBUF.reg = tmp;
8876 TCC_CRITICAL_SECTION_LEAVE();
8877}
8878
8879static inline void hri_tcc_clear_PERBUF_DITH6_DITHERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8880{
8881 TCC_CRITICAL_SECTION_ENTER();
8882 ((Tcc *)hw)->PERBUF.reg &= ~TCC_PERBUF_DITH6_DITHERBUF(mask);
8883 TCC_CRITICAL_SECTION_LEAVE();
8884}
8885
8886static inline void hri_tcc_toggle_PERBUF_DITH6_DITHERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8887{
8888 TCC_CRITICAL_SECTION_ENTER();
8889 ((Tcc *)hw)->PERBUF.reg ^= TCC_PERBUF_DITH6_DITHERBUF(mask);
8890 TCC_CRITICAL_SECTION_LEAVE();
8891}
8892
8893static inline hri_tcc_perbuf_reg_t hri_tcc_read_PERBUF_DITH6_DITHERBUF_bf(const void *const hw)
8894{
8895 uint32_t tmp;
8896 tmp = ((Tcc *)hw)->PERBUF.reg;
8897 tmp = (tmp & TCC_PERBUF_DITH6_DITHERBUF_Msk) >> TCC_PERBUF_DITH6_DITHERBUF_Pos;
8898 return tmp;
8899}
8900
8901static inline void hri_tcc_set_PERBUF_DITH6_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8902{
8903 TCC_CRITICAL_SECTION_ENTER();
8904 ((Tcc *)hw)->PERBUF.reg |= TCC_PERBUF_PERBUF(mask);
8905 TCC_CRITICAL_SECTION_LEAVE();
8906}
8907
8908static inline hri_tcc_perbuf_reg_t hri_tcc_get_PERBUF_DITH6_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8909{
8910 uint32_t tmp;
8911 tmp = ((Tcc *)hw)->PERBUF.reg;
8912 tmp = (tmp & TCC_PERBUF_PERBUF(mask)) >> TCC_PERBUF_PERBUF_Pos;
8913 return tmp;
8914}
8915
8916static inline void hri_tcc_write_PERBUF_DITH6_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t data)
8917{
8918 uint32_t tmp;
8919 TCC_CRITICAL_SECTION_ENTER();
8920 tmp = ((Tcc *)hw)->PERBUF.reg;
8921 tmp &= ~TCC_PERBUF_PERBUF_Msk;
8922 tmp |= TCC_PERBUF_PERBUF(data);
8923 ((Tcc *)hw)->PERBUF.reg = tmp;
8924 TCC_CRITICAL_SECTION_LEAVE();
8925}
8926
8927static inline void hri_tcc_clear_PERBUF_DITH6_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8928{
8929 TCC_CRITICAL_SECTION_ENTER();
8930 ((Tcc *)hw)->PERBUF.reg &= ~TCC_PERBUF_PERBUF(mask);
8931 TCC_CRITICAL_SECTION_LEAVE();
8932}
8933
8934static inline void hri_tcc_toggle_PERBUF_DITH6_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8935{
8936 TCC_CRITICAL_SECTION_ENTER();
8937 ((Tcc *)hw)->PERBUF.reg ^= TCC_PERBUF_PERBUF(mask);
8938 TCC_CRITICAL_SECTION_LEAVE();
8939}
8940
8941static inline hri_tcc_perbuf_reg_t hri_tcc_read_PERBUF_DITH6_PERBUF_bf(const void *const hw)
8942{
8943 uint32_t tmp;
8944 tmp = ((Tcc *)hw)->PERBUF.reg;
8945 tmp = (tmp & TCC_PERBUF_PERBUF_Msk) >> TCC_PERBUF_PERBUF_Pos;
8946 return tmp;
8947}
8948
8949static inline void hri_tcc_set_PERBUF_DITH5_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8950{
8951 TCC_CRITICAL_SECTION_ENTER();
8952 ((Tcc *)hw)->PERBUF.reg |= TCC_PERBUF_PERBUF(mask);
8953 TCC_CRITICAL_SECTION_LEAVE();
8954}
8955
8956static inline hri_tcc_perbuf_reg_t hri_tcc_get_PERBUF_DITH5_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8957{
8958 uint32_t tmp;
8959 tmp = ((Tcc *)hw)->PERBUF.reg;
8960 tmp = (tmp & TCC_PERBUF_PERBUF(mask)) >> TCC_PERBUF_PERBUF_Pos;
8961 return tmp;
8962}
8963
8964static inline void hri_tcc_write_PERBUF_DITH5_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t data)
8965{
8966 uint32_t tmp;
8967 TCC_CRITICAL_SECTION_ENTER();
8968 tmp = ((Tcc *)hw)->PERBUF.reg;
8969 tmp &= ~TCC_PERBUF_PERBUF_Msk;
8970 tmp |= TCC_PERBUF_PERBUF(data);
8971 ((Tcc *)hw)->PERBUF.reg = tmp;
8972 TCC_CRITICAL_SECTION_LEAVE();
8973}
8974
8975static inline void hri_tcc_clear_PERBUF_DITH5_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8976{
8977 TCC_CRITICAL_SECTION_ENTER();
8978 ((Tcc *)hw)->PERBUF.reg &= ~TCC_PERBUF_PERBUF(mask);
8979 TCC_CRITICAL_SECTION_LEAVE();
8980}
8981
8982static inline void hri_tcc_toggle_PERBUF_DITH5_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8983{
8984 TCC_CRITICAL_SECTION_ENTER();
8985 ((Tcc *)hw)->PERBUF.reg ^= TCC_PERBUF_PERBUF(mask);
8986 TCC_CRITICAL_SECTION_LEAVE();
8987}
8988
8989static inline hri_tcc_perbuf_reg_t hri_tcc_read_PERBUF_DITH5_PERBUF_bf(const void *const hw)
8990{
8991 uint32_t tmp;
8992 tmp = ((Tcc *)hw)->PERBUF.reg;
8993 tmp = (tmp & TCC_PERBUF_PERBUF_Msk) >> TCC_PERBUF_PERBUF_Pos;
8994 return tmp;
8995}
8996
8997static inline void hri_tcc_set_PERBUF_DITH4_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
8998{
8999 TCC_CRITICAL_SECTION_ENTER();
9000 ((Tcc *)hw)->PERBUF.reg |= TCC_PERBUF_PERBUF(mask);
9001 TCC_CRITICAL_SECTION_LEAVE();
9002}
9003
9004static inline hri_tcc_perbuf_reg_t hri_tcc_get_PERBUF_DITH4_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
9005{
9006 uint32_t tmp;
9007 tmp = ((Tcc *)hw)->PERBUF.reg;
9008 tmp = (tmp & TCC_PERBUF_PERBUF(mask)) >> TCC_PERBUF_PERBUF_Pos;
9009 return tmp;
9010}
9011
9012static inline void hri_tcc_write_PERBUF_DITH4_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t data)
9013{
9014 uint32_t tmp;
9015 TCC_CRITICAL_SECTION_ENTER();
9016 tmp = ((Tcc *)hw)->PERBUF.reg;
9017 tmp &= ~TCC_PERBUF_PERBUF_Msk;
9018 tmp |= TCC_PERBUF_PERBUF(data);
9019 ((Tcc *)hw)->PERBUF.reg = tmp;
9020 TCC_CRITICAL_SECTION_LEAVE();
9021}
9022
9023static inline void hri_tcc_clear_PERBUF_DITH4_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
9024{
9025 TCC_CRITICAL_SECTION_ENTER();
9026 ((Tcc *)hw)->PERBUF.reg &= ~TCC_PERBUF_PERBUF(mask);
9027 TCC_CRITICAL_SECTION_LEAVE();
9028}
9029
9030static inline void hri_tcc_toggle_PERBUF_DITH4_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
9031{
9032 TCC_CRITICAL_SECTION_ENTER();
9033 ((Tcc *)hw)->PERBUF.reg ^= TCC_PERBUF_PERBUF(mask);
9034 TCC_CRITICAL_SECTION_LEAVE();
9035}
9036
9037static inline hri_tcc_perbuf_reg_t hri_tcc_read_PERBUF_DITH4_PERBUF_bf(const void *const hw)
9038{
9039 uint32_t tmp;
9040 tmp = ((Tcc *)hw)->PERBUF.reg;
9041 tmp = (tmp & TCC_PERBUF_PERBUF_Msk) >> TCC_PERBUF_PERBUF_Pos;
9042 return tmp;
9043}
9044
9045static inline void hri_tcc_set_PERBUF_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
9046{
9047 TCC_CRITICAL_SECTION_ENTER();
9048 ((Tcc *)hw)->PERBUF.reg |= TCC_PERBUF_PERBUF(mask);
9049 TCC_CRITICAL_SECTION_LEAVE();
9050}
9051
9052static inline hri_tcc_perbuf_reg_t hri_tcc_get_PERBUF_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
9053{
9054 uint32_t tmp;
9055 tmp = ((Tcc *)hw)->PERBUF.reg;
9056 tmp = (tmp & TCC_PERBUF_PERBUF(mask)) >> TCC_PERBUF_PERBUF_Pos;
9057 return tmp;
9058}
9059
9060static inline void hri_tcc_write_PERBUF_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t data)
9061{
9062 uint32_t tmp;
9063 TCC_CRITICAL_SECTION_ENTER();
9064 tmp = ((Tcc *)hw)->PERBUF.reg;
9065 tmp &= ~TCC_PERBUF_PERBUF_Msk;
9066 tmp |= TCC_PERBUF_PERBUF(data);
9067 ((Tcc *)hw)->PERBUF.reg = tmp;
9068 TCC_CRITICAL_SECTION_LEAVE();
9069}
9070
9071static inline void hri_tcc_clear_PERBUF_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
9072{
9073 TCC_CRITICAL_SECTION_ENTER();
9074 ((Tcc *)hw)->PERBUF.reg &= ~TCC_PERBUF_PERBUF(mask);
9075 TCC_CRITICAL_SECTION_LEAVE();
9076}
9077
9078static inline void hri_tcc_toggle_PERBUF_PERBUF_bf(const void *const hw, hri_tcc_perbuf_reg_t mask)
9079{
9080 TCC_CRITICAL_SECTION_ENTER();
9081 ((Tcc *)hw)->PERBUF.reg ^= TCC_PERBUF_PERBUF(mask);
9082 TCC_CRITICAL_SECTION_LEAVE();
9083}
9084
9085static inline hri_tcc_perbuf_reg_t hri_tcc_read_PERBUF_PERBUF_bf(const void *const hw)
9086{
9087 uint32_t tmp;
9088 tmp = ((Tcc *)hw)->PERBUF.reg;
9089 tmp = (tmp & TCC_PERBUF_PERBUF_Msk) >> TCC_PERBUF_PERBUF_Pos;
9090 return tmp;
9091}
9092
9093static inline void hri_tcc_set_PERBUF_reg(const void *const hw, hri_tcc_perbuf_reg_t mask)
9094{
9095 TCC_CRITICAL_SECTION_ENTER();
9096 ((Tcc *)hw)->PERBUF.reg |= mask;
9097 TCC_CRITICAL_SECTION_LEAVE();
9098}
9099
9100static inline hri_tcc_perbuf_reg_t hri_tcc_get_PERBUF_reg(const void *const hw, hri_tcc_perbuf_reg_t mask)
9101{
9102 uint32_t tmp;
9103 tmp = ((Tcc *)hw)->PERBUF.reg;
9104 tmp &= mask;
9105 return tmp;
9106}
9107
9108static inline void hri_tcc_write_PERBUF_reg(const void *const hw, hri_tcc_perbuf_reg_t data)
9109{
9110 TCC_CRITICAL_SECTION_ENTER();
9111 ((Tcc *)hw)->PERBUF.reg = data;
9112 TCC_CRITICAL_SECTION_LEAVE();
9113}
9114
9115static inline void hri_tcc_clear_PERBUF_reg(const void *const hw, hri_tcc_perbuf_reg_t mask)
9116{
9117 TCC_CRITICAL_SECTION_ENTER();
9118 ((Tcc *)hw)->PERBUF.reg &= ~mask;
9119 TCC_CRITICAL_SECTION_LEAVE();
9120}
9121
9122static inline void hri_tcc_toggle_PERBUF_reg(const void *const hw, hri_tcc_perbuf_reg_t mask)
9123{
9124 TCC_CRITICAL_SECTION_ENTER();
9125 ((Tcc *)hw)->PERBUF.reg ^= mask;
9126 TCC_CRITICAL_SECTION_LEAVE();
9127}
9128
9129static inline hri_tcc_perbuf_reg_t hri_tcc_read_PERBUF_reg(const void *const hw)
9130{
9131 return ((Tcc *)hw)->PERBUF.reg;
9132}
9133
9134static inline void hri_tcc_set_CCBUF_DITH4_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9135{
9136 TCC_CRITICAL_SECTION_ENTER();
9137 ((Tcc *)hw)->CCBUF[index].reg |= TCC_CCBUF_CCBUF(mask);
9138 TCC_CRITICAL_SECTION_LEAVE();
9139}
9140
9141static inline hri_tcc_ccbuf_reg_t hri_tcc_get_CCBUF_DITH4_CCBUF_bf(const void *const hw, uint8_t index,
9142 hri_tcc_ccbuf_reg_t mask)
9143{
9144 uint32_t tmp;
9145 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9146 tmp = (tmp & TCC_CCBUF_CCBUF(mask)) >> TCC_CCBUF_CCBUF_Pos;
9147 return tmp;
9148}
9149
9150static inline void hri_tcc_write_CCBUF_DITH4_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t data)
9151{
9152 uint32_t tmp;
9153 TCC_CRITICAL_SECTION_ENTER();
9154 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9155 tmp &= ~TCC_CCBUF_CCBUF_Msk;
9156 tmp |= TCC_CCBUF_CCBUF(data);
9157 ((Tcc *)hw)->CCBUF[index].reg = tmp;
9158 TCC_CRITICAL_SECTION_LEAVE();
9159}
9160
9161static inline void hri_tcc_clear_CCBUF_DITH4_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9162{
9163 TCC_CRITICAL_SECTION_ENTER();
9164 ((Tcc *)hw)->CCBUF[index].reg &= ~TCC_CCBUF_CCBUF(mask);
9165 TCC_CRITICAL_SECTION_LEAVE();
9166}
9167
9168static inline void hri_tcc_toggle_CCBUF_DITH4_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9169{
9170 TCC_CRITICAL_SECTION_ENTER();
9171 ((Tcc *)hw)->CCBUF[index].reg ^= TCC_CCBUF_CCBUF(mask);
9172 TCC_CRITICAL_SECTION_LEAVE();
9173}
9174
9175static inline hri_tcc_ccbuf_reg_t hri_tcc_read_CCBUF_DITH4_CCBUF_bf(const void *const hw, uint8_t index)
9176{
9177 uint32_t tmp;
9178 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9179 tmp = (tmp & TCC_CCBUF_CCBUF_Msk) >> TCC_CCBUF_CCBUF_Pos;
9180 return tmp;
9181}
9182
9183static inline void hri_tcc_set_CCBUF_DITH5_DITHERBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9184{
9185 TCC_CRITICAL_SECTION_ENTER();
9186 ((Tcc *)hw)->CCBUF[index].reg |= TCC_CCBUF_DITH5_DITHERBUF(mask);
9187 TCC_CRITICAL_SECTION_LEAVE();
9188}
9189
9190static inline hri_tcc_ccbuf_reg_t hri_tcc_get_CCBUF_DITH5_DITHERBUF_bf(const void *const hw, uint8_t index,
9191 hri_tcc_ccbuf_reg_t mask)
9192{
9193 uint32_t tmp;
9194 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9195 tmp = (tmp & TCC_CCBUF_DITH5_DITHERBUF(mask)) >> TCC_CCBUF_DITH5_DITHERBUF_Pos;
9196 return tmp;
9197}
9198
9199static inline void hri_tcc_write_CCBUF_DITH5_DITHERBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t data)
9200{
9201 uint32_t tmp;
9202 TCC_CRITICAL_SECTION_ENTER();
9203 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9204 tmp &= ~TCC_CCBUF_DITH5_DITHERBUF_Msk;
9205 tmp |= TCC_CCBUF_DITH5_DITHERBUF(data);
9206 ((Tcc *)hw)->CCBUF[index].reg = tmp;
9207 TCC_CRITICAL_SECTION_LEAVE();
9208}
9209
9210static inline void hri_tcc_clear_CCBUF_DITH5_DITHERBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9211{
9212 TCC_CRITICAL_SECTION_ENTER();
9213 ((Tcc *)hw)->CCBUF[index].reg &= ~TCC_CCBUF_DITH5_DITHERBUF(mask);
9214 TCC_CRITICAL_SECTION_LEAVE();
9215}
9216
9217static inline void hri_tcc_toggle_CCBUF_DITH5_DITHERBUF_bf(const void *const hw, uint8_t index,
9218 hri_tcc_ccbuf_reg_t mask)
9219{
9220 TCC_CRITICAL_SECTION_ENTER();
9221 ((Tcc *)hw)->CCBUF[index].reg ^= TCC_CCBUF_DITH5_DITHERBUF(mask);
9222 TCC_CRITICAL_SECTION_LEAVE();
9223}
9224
9225static inline hri_tcc_ccbuf_reg_t hri_tcc_read_CCBUF_DITH5_DITHERBUF_bf(const void *const hw, uint8_t index)
9226{
9227 uint32_t tmp;
9228 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9229 tmp = (tmp & TCC_CCBUF_DITH5_DITHERBUF_Msk) >> TCC_CCBUF_DITH5_DITHERBUF_Pos;
9230 return tmp;
9231}
9232
9233static inline void hri_tcc_set_CCBUF_DITH6_DITHERBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9234{
9235 TCC_CRITICAL_SECTION_ENTER();
9236 ((Tcc *)hw)->CCBUF[index].reg |= TCC_CCBUF_DITH6_DITHERBUF(mask);
9237 TCC_CRITICAL_SECTION_LEAVE();
9238}
9239
9240static inline hri_tcc_ccbuf_reg_t hri_tcc_get_CCBUF_DITH6_DITHERBUF_bf(const void *const hw, uint8_t index,
9241 hri_tcc_ccbuf_reg_t mask)
9242{
9243 uint32_t tmp;
9244 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9245 tmp = (tmp & TCC_CCBUF_DITH6_DITHERBUF(mask)) >> TCC_CCBUF_DITH6_DITHERBUF_Pos;
9246 return tmp;
9247}
9248
9249static inline void hri_tcc_write_CCBUF_DITH6_DITHERBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t data)
9250{
9251 uint32_t tmp;
9252 TCC_CRITICAL_SECTION_ENTER();
9253 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9254 tmp &= ~TCC_CCBUF_DITH6_DITHERBUF_Msk;
9255 tmp |= TCC_CCBUF_DITH6_DITHERBUF(data);
9256 ((Tcc *)hw)->CCBUF[index].reg = tmp;
9257 TCC_CRITICAL_SECTION_LEAVE();
9258}
9259
9260static inline void hri_tcc_clear_CCBUF_DITH6_DITHERBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9261{
9262 TCC_CRITICAL_SECTION_ENTER();
9263 ((Tcc *)hw)->CCBUF[index].reg &= ~TCC_CCBUF_DITH6_DITHERBUF(mask);
9264 TCC_CRITICAL_SECTION_LEAVE();
9265}
9266
9267static inline void hri_tcc_toggle_CCBUF_DITH6_DITHERBUF_bf(const void *const hw, uint8_t index,
9268 hri_tcc_ccbuf_reg_t mask)
9269{
9270 TCC_CRITICAL_SECTION_ENTER();
9271 ((Tcc *)hw)->CCBUF[index].reg ^= TCC_CCBUF_DITH6_DITHERBUF(mask);
9272 TCC_CRITICAL_SECTION_LEAVE();
9273}
9274
9275static inline hri_tcc_ccbuf_reg_t hri_tcc_read_CCBUF_DITH6_DITHERBUF_bf(const void *const hw, uint8_t index)
9276{
9277 uint32_t tmp;
9278 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9279 tmp = (tmp & TCC_CCBUF_DITH6_DITHERBUF_Msk) >> TCC_CCBUF_DITH6_DITHERBUF_Pos;
9280 return tmp;
9281}
9282
9283static inline void hri_tcc_set_CCBUF_DITH6_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9284{
9285 TCC_CRITICAL_SECTION_ENTER();
9286 ((Tcc *)hw)->CCBUF[index].reg |= TCC_CCBUF_CCBUF(mask);
9287 TCC_CRITICAL_SECTION_LEAVE();
9288}
9289
9290static inline hri_tcc_ccbuf_reg_t hri_tcc_get_CCBUF_DITH6_CCBUF_bf(const void *const hw, uint8_t index,
9291 hri_tcc_ccbuf_reg_t mask)
9292{
9293 uint32_t tmp;
9294 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9295 tmp = (tmp & TCC_CCBUF_CCBUF(mask)) >> TCC_CCBUF_CCBUF_Pos;
9296 return tmp;
9297}
9298
9299static inline void hri_tcc_write_CCBUF_DITH6_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t data)
9300{
9301 uint32_t tmp;
9302 TCC_CRITICAL_SECTION_ENTER();
9303 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9304 tmp &= ~TCC_CCBUF_CCBUF_Msk;
9305 tmp |= TCC_CCBUF_CCBUF(data);
9306 ((Tcc *)hw)->CCBUF[index].reg = tmp;
9307 TCC_CRITICAL_SECTION_LEAVE();
9308}
9309
9310static inline void hri_tcc_clear_CCBUF_DITH6_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9311{
9312 TCC_CRITICAL_SECTION_ENTER();
9313 ((Tcc *)hw)->CCBUF[index].reg &= ~TCC_CCBUF_CCBUF(mask);
9314 TCC_CRITICAL_SECTION_LEAVE();
9315}
9316
9317static inline void hri_tcc_toggle_CCBUF_DITH6_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9318{
9319 TCC_CRITICAL_SECTION_ENTER();
9320 ((Tcc *)hw)->CCBUF[index].reg ^= TCC_CCBUF_CCBUF(mask);
9321 TCC_CRITICAL_SECTION_LEAVE();
9322}
9323
9324static inline hri_tcc_ccbuf_reg_t hri_tcc_read_CCBUF_DITH6_CCBUF_bf(const void *const hw, uint8_t index)
9325{
9326 uint32_t tmp;
9327 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9328 tmp = (tmp & TCC_CCBUF_CCBUF_Msk) >> TCC_CCBUF_CCBUF_Pos;
9329 return tmp;
9330}
9331
9332static inline void hri_tcc_set_CCBUF_DITH5_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9333{
9334 TCC_CRITICAL_SECTION_ENTER();
9335 ((Tcc *)hw)->CCBUF[index].reg |= TCC_CCBUF_CCBUF(mask);
9336 TCC_CRITICAL_SECTION_LEAVE();
9337}
9338
9339static inline hri_tcc_ccbuf_reg_t hri_tcc_get_CCBUF_DITH5_CCBUF_bf(const void *const hw, uint8_t index,
9340 hri_tcc_ccbuf_reg_t mask)
9341{
9342 uint32_t tmp;
9343 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9344 tmp = (tmp & TCC_CCBUF_CCBUF(mask)) >> TCC_CCBUF_CCBUF_Pos;
9345 return tmp;
9346}
9347
9348static inline void hri_tcc_write_CCBUF_DITH5_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t data)
9349{
9350 uint32_t tmp;
9351 TCC_CRITICAL_SECTION_ENTER();
9352 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9353 tmp &= ~TCC_CCBUF_CCBUF_Msk;
9354 tmp |= TCC_CCBUF_CCBUF(data);
9355 ((Tcc *)hw)->CCBUF[index].reg = tmp;
9356 TCC_CRITICAL_SECTION_LEAVE();
9357}
9358
9359static inline void hri_tcc_clear_CCBUF_DITH5_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9360{
9361 TCC_CRITICAL_SECTION_ENTER();
9362 ((Tcc *)hw)->CCBUF[index].reg &= ~TCC_CCBUF_CCBUF(mask);
9363 TCC_CRITICAL_SECTION_LEAVE();
9364}
9365
9366static inline void hri_tcc_toggle_CCBUF_DITH5_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9367{
9368 TCC_CRITICAL_SECTION_ENTER();
9369 ((Tcc *)hw)->CCBUF[index].reg ^= TCC_CCBUF_CCBUF(mask);
9370 TCC_CRITICAL_SECTION_LEAVE();
9371}
9372
9373static inline hri_tcc_ccbuf_reg_t hri_tcc_read_CCBUF_DITH5_CCBUF_bf(const void *const hw, uint8_t index)
9374{
9375 uint32_t tmp;
9376 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9377 tmp = (tmp & TCC_CCBUF_CCBUF_Msk) >> TCC_CCBUF_CCBUF_Pos;
9378 return tmp;
9379}
9380
9381static inline void hri_tcc_set_CCBUF_DITH4_DITHERBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9382{
9383 TCC_CRITICAL_SECTION_ENTER();
9384 ((Tcc *)hw)->CCBUF[index].reg |= TCC_CCBUF_DITH4_DITHERBUF(mask);
9385 TCC_CRITICAL_SECTION_LEAVE();
9386}
9387
9388static inline hri_tcc_ccbuf_reg_t hri_tcc_get_CCBUF_DITH4_DITHERBUF_bf(const void *const hw, uint8_t index,
9389 hri_tcc_ccbuf_reg_t mask)
9390{
9391 uint32_t tmp;
9392 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9393 tmp = (tmp & TCC_CCBUF_DITH4_DITHERBUF(mask)) >> TCC_CCBUF_DITH4_DITHERBUF_Pos;
9394 return tmp;
9395}
9396
9397static inline void hri_tcc_write_CCBUF_DITH4_DITHERBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t data)
9398{
9399 uint32_t tmp;
9400 TCC_CRITICAL_SECTION_ENTER();
9401 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9402 tmp &= ~TCC_CCBUF_DITH4_DITHERBUF_Msk;
9403 tmp |= TCC_CCBUF_DITH4_DITHERBUF(data);
9404 ((Tcc *)hw)->CCBUF[index].reg = tmp;
9405 TCC_CRITICAL_SECTION_LEAVE();
9406}
9407
9408static inline void hri_tcc_clear_CCBUF_DITH4_DITHERBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9409{
9410 TCC_CRITICAL_SECTION_ENTER();
9411 ((Tcc *)hw)->CCBUF[index].reg &= ~TCC_CCBUF_DITH4_DITHERBUF(mask);
9412 TCC_CRITICAL_SECTION_LEAVE();
9413}
9414
9415static inline void hri_tcc_toggle_CCBUF_DITH4_DITHERBUF_bf(const void *const hw, uint8_t index,
9416 hri_tcc_ccbuf_reg_t mask)
9417{
9418 TCC_CRITICAL_SECTION_ENTER();
9419 ((Tcc *)hw)->CCBUF[index].reg ^= TCC_CCBUF_DITH4_DITHERBUF(mask);
9420 TCC_CRITICAL_SECTION_LEAVE();
9421}
9422
9423static inline hri_tcc_ccbuf_reg_t hri_tcc_read_CCBUF_DITH4_DITHERBUF_bf(const void *const hw, uint8_t index)
9424{
9425 uint32_t tmp;
9426 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9427 tmp = (tmp & TCC_CCBUF_DITH4_DITHERBUF_Msk) >> TCC_CCBUF_DITH4_DITHERBUF_Pos;
9428 return tmp;
9429}
9430
9431static inline void hri_tcc_set_CCBUF_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9432{
9433 TCC_CRITICAL_SECTION_ENTER();
9434 ((Tcc *)hw)->CCBUF[index].reg |= TCC_CCBUF_CCBUF(mask);
9435 TCC_CRITICAL_SECTION_LEAVE();
9436}
9437
9438static inline hri_tcc_ccbuf_reg_t hri_tcc_get_CCBUF_CCBUF_bf(const void *const hw, uint8_t index,
9439 hri_tcc_ccbuf_reg_t mask)
9440{
9441 uint32_t tmp;
9442 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9443 tmp = (tmp & TCC_CCBUF_CCBUF(mask)) >> TCC_CCBUF_CCBUF_Pos;
9444 return tmp;
9445}
9446
9447static inline void hri_tcc_write_CCBUF_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t data)
9448{
9449 uint32_t tmp;
9450 TCC_CRITICAL_SECTION_ENTER();
9451 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9452 tmp &= ~TCC_CCBUF_CCBUF_Msk;
9453 tmp |= TCC_CCBUF_CCBUF(data);
9454 ((Tcc *)hw)->CCBUF[index].reg = tmp;
9455 TCC_CRITICAL_SECTION_LEAVE();
9456}
9457
9458static inline void hri_tcc_clear_CCBUF_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9459{
9460 TCC_CRITICAL_SECTION_ENTER();
9461 ((Tcc *)hw)->CCBUF[index].reg &= ~TCC_CCBUF_CCBUF(mask);
9462 TCC_CRITICAL_SECTION_LEAVE();
9463}
9464
9465static inline void hri_tcc_toggle_CCBUF_CCBUF_bf(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9466{
9467 TCC_CRITICAL_SECTION_ENTER();
9468 ((Tcc *)hw)->CCBUF[index].reg ^= TCC_CCBUF_CCBUF(mask);
9469 TCC_CRITICAL_SECTION_LEAVE();
9470}
9471
9472static inline hri_tcc_ccbuf_reg_t hri_tcc_read_CCBUF_CCBUF_bf(const void *const hw, uint8_t index)
9473{
9474 uint32_t tmp;
9475 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9476 tmp = (tmp & TCC_CCBUF_CCBUF_Msk) >> TCC_CCBUF_CCBUF_Pos;
9477 return tmp;
9478}
9479
9480static inline void hri_tcc_set_CCBUF_reg(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9481{
9482 TCC_CRITICAL_SECTION_ENTER();
9483 ((Tcc *)hw)->CCBUF[index].reg |= mask;
9484 TCC_CRITICAL_SECTION_LEAVE();
9485}
9486
9487static inline hri_tcc_ccbuf_reg_t hri_tcc_get_CCBUF_reg(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9488{
9489 uint32_t tmp;
9490 tmp = ((Tcc *)hw)->CCBUF[index].reg;
9491 tmp &= mask;
9492 return tmp;
9493}
9494
9495static inline void hri_tcc_write_CCBUF_reg(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t data)
9496{
9497 TCC_CRITICAL_SECTION_ENTER();
9498 ((Tcc *)hw)->CCBUF[index].reg = data;
9499 TCC_CRITICAL_SECTION_LEAVE();
9500}
9501
9502static inline void hri_tcc_clear_CCBUF_reg(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9503{
9504 TCC_CRITICAL_SECTION_ENTER();
9505 ((Tcc *)hw)->CCBUF[index].reg &= ~mask;
9506 TCC_CRITICAL_SECTION_LEAVE();
9507}
9508
9509static inline void hri_tcc_toggle_CCBUF_reg(const void *const hw, uint8_t index, hri_tcc_ccbuf_reg_t mask)
9510{
9511 TCC_CRITICAL_SECTION_ENTER();
9512 ((Tcc *)hw)->CCBUF[index].reg ^= mask;
9513 TCC_CRITICAL_SECTION_LEAVE();
9514}
9515
9516static inline hri_tcc_ccbuf_reg_t hri_tcc_read_CCBUF_reg(const void *const hw, uint8_t index)
9517{
9518 return ((Tcc *)hw)->CCBUF[index].reg;
9519}
9520
9521static inline bool hri_tcc_get_STATUS_STOP_bit(const void *const hw)
9522{
9523 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_STOP) >> TCC_STATUS_STOP_Pos;
9524}
9525
9526static inline void hri_tcc_clear_STATUS_STOP_bit(const void *const hw)
9527{
9528 TCC_CRITICAL_SECTION_ENTER();
9529 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_STOP;
9530 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9531 TCC_CRITICAL_SECTION_LEAVE();
9532}
9533
9534static inline bool hri_tcc_get_STATUS_IDX_bit(const void *const hw)
9535{
9536 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_IDX) >> TCC_STATUS_IDX_Pos;
9537}
9538
9539static inline void hri_tcc_clear_STATUS_IDX_bit(const void *const hw)
9540{
9541 TCC_CRITICAL_SECTION_ENTER();
9542 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_IDX;
9543 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9544 TCC_CRITICAL_SECTION_LEAVE();
9545}
9546
9547static inline bool hri_tcc_get_STATUS_UFS_bit(const void *const hw)
9548{
9549 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_UFS) >> TCC_STATUS_UFS_Pos;
9550}
9551
9552static inline void hri_tcc_clear_STATUS_UFS_bit(const void *const hw)
9553{
9554 TCC_CRITICAL_SECTION_ENTER();
9555 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_UFS;
9556 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9557 TCC_CRITICAL_SECTION_LEAVE();
9558}
9559
9560static inline bool hri_tcc_get_STATUS_DFS_bit(const void *const hw)
9561{
9562 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_DFS) >> TCC_STATUS_DFS_Pos;
9563}
9564
9565static inline void hri_tcc_clear_STATUS_DFS_bit(const void *const hw)
9566{
9567 TCC_CRITICAL_SECTION_ENTER();
9568 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_DFS;
9569 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9570 TCC_CRITICAL_SECTION_LEAVE();
9571}
9572
9573static inline bool hri_tcc_get_STATUS_SLAVE_bit(const void *const hw)
9574{
9575 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_SLAVE) >> TCC_STATUS_SLAVE_Pos;
9576}
9577
9578static inline void hri_tcc_clear_STATUS_SLAVE_bit(const void *const hw)
9579{
9580 TCC_CRITICAL_SECTION_ENTER();
9581 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_SLAVE;
9582 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9583 TCC_CRITICAL_SECTION_LEAVE();
9584}
9585
9586static inline bool hri_tcc_get_STATUS_PATTBUFV_bit(const void *const hw)
9587{
9588 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_PATTBUFV) >> TCC_STATUS_PATTBUFV_Pos;
9589}
9590
9591static inline void hri_tcc_clear_STATUS_PATTBUFV_bit(const void *const hw)
9592{
9593 TCC_CRITICAL_SECTION_ENTER();
9594 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_PATTBUFV;
9595 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9596 TCC_CRITICAL_SECTION_LEAVE();
9597}
9598
9599static inline bool hri_tcc_get_STATUS_PERBUFV_bit(const void *const hw)
9600{
9601 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_PERBUFV) >> TCC_STATUS_PERBUFV_Pos;
9602}
9603
9604static inline void hri_tcc_clear_STATUS_PERBUFV_bit(const void *const hw)
9605{
9606 TCC_CRITICAL_SECTION_ENTER();
9607 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_PERBUFV;
9608 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9609 TCC_CRITICAL_SECTION_LEAVE();
9610}
9611
9612static inline bool hri_tcc_get_STATUS_FAULTAIN_bit(const void *const hw)
9613{
9614 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_FAULTAIN) >> TCC_STATUS_FAULTAIN_Pos;
9615}
9616
9617static inline void hri_tcc_clear_STATUS_FAULTAIN_bit(const void *const hw)
9618{
9619 TCC_CRITICAL_SECTION_ENTER();
9620 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_FAULTAIN;
9621 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9622 TCC_CRITICAL_SECTION_LEAVE();
9623}
9624
9625static inline bool hri_tcc_get_STATUS_FAULTBIN_bit(const void *const hw)
9626{
9627 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_FAULTBIN) >> TCC_STATUS_FAULTBIN_Pos;
9628}
9629
9630static inline void hri_tcc_clear_STATUS_FAULTBIN_bit(const void *const hw)
9631{
9632 TCC_CRITICAL_SECTION_ENTER();
9633 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_FAULTBIN;
9634 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9635 TCC_CRITICAL_SECTION_LEAVE();
9636}
9637
9638static inline bool hri_tcc_get_STATUS_FAULT0IN_bit(const void *const hw)
9639{
9640 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_FAULT0IN) >> TCC_STATUS_FAULT0IN_Pos;
9641}
9642
9643static inline void hri_tcc_clear_STATUS_FAULT0IN_bit(const void *const hw)
9644{
9645 TCC_CRITICAL_SECTION_ENTER();
9646 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_FAULT0IN;
9647 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9648 TCC_CRITICAL_SECTION_LEAVE();
9649}
9650
9651static inline bool hri_tcc_get_STATUS_FAULT1IN_bit(const void *const hw)
9652{
9653 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_FAULT1IN) >> TCC_STATUS_FAULT1IN_Pos;
9654}
9655
9656static inline void hri_tcc_clear_STATUS_FAULT1IN_bit(const void *const hw)
9657{
9658 TCC_CRITICAL_SECTION_ENTER();
9659 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_FAULT1IN;
9660 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9661 TCC_CRITICAL_SECTION_LEAVE();
9662}
9663
9664static inline bool hri_tcc_get_STATUS_FAULTA_bit(const void *const hw)
9665{
9666 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_FAULTA) >> TCC_STATUS_FAULTA_Pos;
9667}
9668
9669static inline void hri_tcc_clear_STATUS_FAULTA_bit(const void *const hw)
9670{
9671 TCC_CRITICAL_SECTION_ENTER();
9672 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_FAULTA;
9673 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9674 TCC_CRITICAL_SECTION_LEAVE();
9675}
9676
9677static inline bool hri_tcc_get_STATUS_FAULTB_bit(const void *const hw)
9678{
9679 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_FAULTB) >> TCC_STATUS_FAULTB_Pos;
9680}
9681
9682static inline void hri_tcc_clear_STATUS_FAULTB_bit(const void *const hw)
9683{
9684 TCC_CRITICAL_SECTION_ENTER();
9685 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_FAULTB;
9686 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9687 TCC_CRITICAL_SECTION_LEAVE();
9688}
9689
9690static inline bool hri_tcc_get_STATUS_FAULT0_bit(const void *const hw)
9691{
9692 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_FAULT0) >> TCC_STATUS_FAULT0_Pos;
9693}
9694
9695static inline void hri_tcc_clear_STATUS_FAULT0_bit(const void *const hw)
9696{
9697 TCC_CRITICAL_SECTION_ENTER();
9698 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_FAULT0;
9699 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9700 TCC_CRITICAL_SECTION_LEAVE();
9701}
9702
9703static inline bool hri_tcc_get_STATUS_FAULT1_bit(const void *const hw)
9704{
9705 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_FAULT1) >> TCC_STATUS_FAULT1_Pos;
9706}
9707
9708static inline void hri_tcc_clear_STATUS_FAULT1_bit(const void *const hw)
9709{
9710 TCC_CRITICAL_SECTION_ENTER();
9711 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_FAULT1;
9712 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9713 TCC_CRITICAL_SECTION_LEAVE();
9714}
9715
9716static inline bool hri_tcc_get_STATUS_CCBUFV0_bit(const void *const hw)
9717{
9718 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_CCBUFV0) >> TCC_STATUS_CCBUFV0_Pos;
9719}
9720
9721static inline void hri_tcc_clear_STATUS_CCBUFV0_bit(const void *const hw)
9722{
9723 TCC_CRITICAL_SECTION_ENTER();
9724 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_CCBUFV0;
9725 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9726 TCC_CRITICAL_SECTION_LEAVE();
9727}
9728
9729static inline bool hri_tcc_get_STATUS_CCBUFV1_bit(const void *const hw)
9730{
9731 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_CCBUFV1) >> TCC_STATUS_CCBUFV1_Pos;
9732}
9733
9734static inline void hri_tcc_clear_STATUS_CCBUFV1_bit(const void *const hw)
9735{
9736 TCC_CRITICAL_SECTION_ENTER();
9737 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_CCBUFV1;
9738 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9739 TCC_CRITICAL_SECTION_LEAVE();
9740}
9741
9742static inline bool hri_tcc_get_STATUS_CCBUFV2_bit(const void *const hw)
9743{
9744 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_CCBUFV2) >> TCC_STATUS_CCBUFV2_Pos;
9745}
9746
9747static inline void hri_tcc_clear_STATUS_CCBUFV2_bit(const void *const hw)
9748{
9749 TCC_CRITICAL_SECTION_ENTER();
9750 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_CCBUFV2;
9751 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9752 TCC_CRITICAL_SECTION_LEAVE();
9753}
9754
9755static inline bool hri_tcc_get_STATUS_CCBUFV3_bit(const void *const hw)
9756{
9757 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_CCBUFV3) >> TCC_STATUS_CCBUFV3_Pos;
9758}
9759
9760static inline void hri_tcc_clear_STATUS_CCBUFV3_bit(const void *const hw)
9761{
9762 TCC_CRITICAL_SECTION_ENTER();
9763 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_CCBUFV3;
9764 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9765 TCC_CRITICAL_SECTION_LEAVE();
9766}
9767
9768static inline bool hri_tcc_get_STATUS_CCBUFV4_bit(const void *const hw)
9769{
9770 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_CCBUFV4) >> TCC_STATUS_CCBUFV4_Pos;
9771}
9772
9773static inline void hri_tcc_clear_STATUS_CCBUFV4_bit(const void *const hw)
9774{
9775 TCC_CRITICAL_SECTION_ENTER();
9776 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_CCBUFV4;
9777 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9778 TCC_CRITICAL_SECTION_LEAVE();
9779}
9780
9781static inline bool hri_tcc_get_STATUS_CCBUFV5_bit(const void *const hw)
9782{
9783 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_CCBUFV5) >> TCC_STATUS_CCBUFV5_Pos;
9784}
9785
9786static inline void hri_tcc_clear_STATUS_CCBUFV5_bit(const void *const hw)
9787{
9788 TCC_CRITICAL_SECTION_ENTER();
9789 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_CCBUFV5;
9790 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9791 TCC_CRITICAL_SECTION_LEAVE();
9792}
9793
9794static inline bool hri_tcc_get_STATUS_CMP0_bit(const void *const hw)
9795{
9796 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_CMP0) >> TCC_STATUS_CMP0_Pos;
9797}
9798
9799static inline void hri_tcc_clear_STATUS_CMP0_bit(const void *const hw)
9800{
9801 TCC_CRITICAL_SECTION_ENTER();
9802 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_CMP0;
9803 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9804 TCC_CRITICAL_SECTION_LEAVE();
9805}
9806
9807static inline bool hri_tcc_get_STATUS_CMP1_bit(const void *const hw)
9808{
9809 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_CMP1) >> TCC_STATUS_CMP1_Pos;
9810}
9811
9812static inline void hri_tcc_clear_STATUS_CMP1_bit(const void *const hw)
9813{
9814 TCC_CRITICAL_SECTION_ENTER();
9815 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_CMP1;
9816 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9817 TCC_CRITICAL_SECTION_LEAVE();
9818}
9819
9820static inline bool hri_tcc_get_STATUS_CMP2_bit(const void *const hw)
9821{
9822 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_CMP2) >> TCC_STATUS_CMP2_Pos;
9823}
9824
9825static inline void hri_tcc_clear_STATUS_CMP2_bit(const void *const hw)
9826{
9827 TCC_CRITICAL_SECTION_ENTER();
9828 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_CMP2;
9829 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9830 TCC_CRITICAL_SECTION_LEAVE();
9831}
9832
9833static inline bool hri_tcc_get_STATUS_CMP3_bit(const void *const hw)
9834{
9835 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_CMP3) >> TCC_STATUS_CMP3_Pos;
9836}
9837
9838static inline void hri_tcc_clear_STATUS_CMP3_bit(const void *const hw)
9839{
9840 TCC_CRITICAL_SECTION_ENTER();
9841 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_CMP3;
9842 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9843 TCC_CRITICAL_SECTION_LEAVE();
9844}
9845
9846static inline bool hri_tcc_get_STATUS_CMP4_bit(const void *const hw)
9847{
9848 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_CMP4) >> TCC_STATUS_CMP4_Pos;
9849}
9850
9851static inline void hri_tcc_clear_STATUS_CMP4_bit(const void *const hw)
9852{
9853 TCC_CRITICAL_SECTION_ENTER();
9854 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_CMP4;
9855 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9856 TCC_CRITICAL_SECTION_LEAVE();
9857}
9858
9859static inline bool hri_tcc_get_STATUS_CMP5_bit(const void *const hw)
9860{
9861 return (((Tcc *)hw)->STATUS.reg & TCC_STATUS_CMP5) >> TCC_STATUS_CMP5_Pos;
9862}
9863
9864static inline void hri_tcc_clear_STATUS_CMP5_bit(const void *const hw)
9865{
9866 TCC_CRITICAL_SECTION_ENTER();
9867 ((Tcc *)hw)->STATUS.reg = TCC_STATUS_CMP5;
9868 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9869 TCC_CRITICAL_SECTION_LEAVE();
9870}
9871
9872static inline hri_tcc_status_reg_t hri_tcc_get_STATUS_reg(const void *const hw, hri_tcc_status_reg_t mask)
9873{
9874 uint32_t tmp;
9875 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9876 tmp = ((Tcc *)hw)->STATUS.reg;
9877 tmp &= mask;
9878 return tmp;
9879}
9880
9881static inline void hri_tcc_clear_STATUS_reg(const void *const hw, hri_tcc_status_reg_t mask)
9882{
9883 TCC_CRITICAL_SECTION_ENTER();
9884 ((Tcc *)hw)->STATUS.reg = mask;
9885 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9886 TCC_CRITICAL_SECTION_LEAVE();
9887}
9888
9889static inline hri_tcc_status_reg_t hri_tcc_read_STATUS_reg(const void *const hw)
9890{
9891 hri_tcc_wait_for_sync(hw, TCC_SYNCBUSY_MASK);
9892 return ((Tcc *)hw)->STATUS.reg;
9893}
9894
9895/* Below section is for legacy hri apis name, not recommended to use below left side apis in application */
9896#define hri_tcc_set_COUNT_DITH4_reg(a, b) hri_tcc_set_COUNT_reg(a, b)
9897#define hri_tcc_get_COUNT_DITH4_reg(a, b) hri_tcc_get_COUNT_reg(a, b)
9898#define hri_tcc_write_COUNT_DITH4_reg(a, b) hri_tcc_write_COUNT_reg(a, b)
9899#define hri_tcc_clear_COUNT_DITH4_reg(a, b) hri_tcc_clear_COUNT_reg(a, b)
9900#define hri_tcc_toggle_COUNT_DITH4_reg(a, b) hri_tcc_toggle_COUNT_reg(a, b)
9901#define hri_tcc_read_COUNT_DITH4_reg(a) hri_tcc_read_COUNT_reg(a)
9902#define hri_tcc_set_COUNT_DITH5_reg(a, b) hri_tcc_set_COUNT_reg(a, b)
9903#define hri_tcc_get_COUNT_DITH5_reg(a, b) hri_tcc_get_COUNT_reg(a, b)
9904#define hri_tcc_write_COUNT_DITH5_reg(a, b) hri_tcc_write_COUNT_reg(a, b)
9905#define hri_tcc_clear_COUNT_DITH5_reg(a, b) hri_tcc_clear_COUNT_reg(a, b)
9906#define hri_tcc_toggle_COUNT_DITH5_reg(a, b) hri_tcc_toggle_COUNT_reg(a, b)
9907#define hri_tcc_read_COUNT_DITH5_reg(a) hri_tcc_read_COUNT_reg(a)
9908#define hri_tcc_set_COUNT_DITH6_reg(a, b) hri_tcc_set_COUNT_reg(a, b)
9909#define hri_tcc_get_COUNT_DITH6_reg(a, b) hri_tcc_get_COUNT_reg(a, b)
9910#define hri_tcc_write_COUNT_DITH6_reg(a, b) hri_tcc_write_COUNT_reg(a, b)
9911#define hri_tcc_clear_COUNT_DITH6_reg(a, b) hri_tcc_clear_COUNT_reg(a, b)
9912#define hri_tcc_toggle_COUNT_DITH6_reg(a, b) hri_tcc_toggle_COUNT_reg(a, b)
9913#define hri_tcc_read_COUNT_DITH6_reg(a) hri_tcc_read_COUNT_reg(a)
9914#define hri_tcc_set_PER_DITH4_reg(a, b) hri_tcc_set_PER_reg(a, b)
9915#define hri_tcc_get_PER_DITH4_reg(a, b) hri_tcc_get_PER_reg(a, b)
9916#define hri_tcc_write_PER_DITH4_reg(a, b) hri_tcc_write_PER_reg(a, b)
9917#define hri_tcc_clear_PER_DITH4_reg(a, b) hri_tcc_clear_PER_reg(a, b)
9918#define hri_tcc_toggle_PER_DITH4_reg(a, b) hri_tcc_toggle_PER_reg(a, b)
9919#define hri_tcc_read_PER_DITH4_reg(a) hri_tcc_read_PER_reg(a)
9920#define hri_tcc_set_PER_DITH5_reg(a, b) hri_tcc_set_PER_reg(a, b)
9921#define hri_tcc_get_PER_DITH5_reg(a, b) hri_tcc_get_PER_reg(a, b)
9922#define hri_tcc_write_PER_DITH5_reg(a, b) hri_tcc_write_PER_reg(a, b)
9923#define hri_tcc_clear_PER_DITH5_reg(a, b) hri_tcc_clear_PER_reg(a, b)
9924#define hri_tcc_toggle_PER_DITH5_reg(a, b) hri_tcc_toggle_PER_reg(a, b)
9925#define hri_tcc_read_PER_DITH5_reg(a) hri_tcc_read_PER_reg(a)
9926#define hri_tcc_set_PER_DITH6_reg(a, b) hri_tcc_set_PER_reg(a, b)
9927#define hri_tcc_get_PER_DITH6_reg(a, b) hri_tcc_get_PER_reg(a, b)
9928#define hri_tcc_write_PER_DITH6_reg(a, b) hri_tcc_write_PER_reg(a, b)
9929#define hri_tcc_clear_PER_DITH6_reg(a, b) hri_tcc_clear_PER_reg(a, b)
9930#define hri_tcc_toggle_PER_DITH6_reg(a, b) hri_tcc_toggle_PER_reg(a, b)
9931#define hri_tcc_read_PER_DITH6_reg(a) hri_tcc_read_PER_reg(a)
9932#define hri_tcc_set_CC_DITH4_reg(a, b, c) hri_tcc_set_CC_reg(a, b, c)
9933#define hri_tcc_get_CC_DITH4_reg(a, b, c) hri_tcc_get_CC_reg(a, b, c)
9934#define hri_tcc_write_CC_DITH4_reg(a, b, c) hri_tcc_write_CC_reg(a, b, c)
9935#define hri_tcc_clear_CC_DITH4_reg(a, b, c) hri_tcc_clear_CC_reg(a, b, c)
9936#define hri_tcc_toggle_CC_DITH4_reg(a, b, c) hri_tcc_toggle_CC_reg(a, b, c)
9937#define hri_tcc_read_CC_DITH4_reg(a, b) hri_tcc_read_CC_reg(a, b)
9938#define hri_tcc_set_CC_DITH5_reg(a, b, c) hri_tcc_set_CC_reg(a, b, c)
9939#define hri_tcc_get_CC_DITH5_reg(a, b, c) hri_tcc_get_CC_reg(a, b, c)
9940#define hri_tcc_write_CC_DITH5_reg(a, b, c) hri_tcc_write_CC_reg(a, b, c)
9941#define hri_tcc_clear_CC_DITH5_reg(a, b, c) hri_tcc_clear_CC_reg(a, b, c)
9942#define hri_tcc_toggle_CC_DITH5_reg(a, b, c) hri_tcc_toggle_CC_reg(a, b, c)
9943#define hri_tcc_read_CC_DITH5_reg(a, b) hri_tcc_read_CC_reg(a, b)
9944#define hri_tcc_set_CC_DITH6_reg(a, b, c) hri_tcc_set_CC_reg(a, b, c)
9945#define hri_tcc_get_CC_DITH6_reg(a, b, c) hri_tcc_get_CC_reg(a, b, c)
9946#define hri_tcc_write_CC_DITH6_reg(a, b, c) hri_tcc_write_CC_reg(a, b, c)
9947#define hri_tcc_clear_CC_DITH6_reg(a, b, c) hri_tcc_clear_CC_reg(a, b, c)
9948#define hri_tcc_toggle_CC_DITH6_reg(a, b, c) hri_tcc_toggle_CC_reg(a, b, c)
9949#define hri_tcc_read_CC_DITH6_reg(a, b) hri_tcc_read_CC_reg(a, b)
9950#define hri_tcc_set_PERBUF_DITH4_reg(a, b) hri_tcc_set_PERBUF_reg(a, b)
9951#define hri_tcc_get_PERBUF_DITH4_reg(a, b) hri_tcc_get_PERBUF_reg(a, b)
9952#define hri_tcc_write_PERBUF_DITH4_reg(a, b) hri_tcc_write_PERBUF_reg(a, b)
9953#define hri_tcc_clear_PERBUF_DITH4_reg(a, b) hri_tcc_clear_PERBUF_reg(a, b)
9954#define hri_tcc_toggle_PERBUF_DITH4_reg(a, b) hri_tcc_toggle_PERBUF_reg(a, b)
9955#define hri_tcc_read_PERBUF_DITH4_reg(a) hri_tcc_read_PERBUF_reg(a)
9956#define hri_tcc_set_PERBUF_DITH5_reg(a, b) hri_tcc_set_PERBUF_reg(a, b)
9957#define hri_tcc_get_PERBUF_DITH5_reg(a, b) hri_tcc_get_PERBUF_reg(a, b)
9958#define hri_tcc_write_PERBUF_DITH5_reg(a, b) hri_tcc_write_PERBUF_reg(a, b)
9959#define hri_tcc_clear_PERBUF_DITH5_reg(a, b) hri_tcc_clear_PERBUF_reg(a, b)
9960#define hri_tcc_toggle_PERBUF_DITH5_reg(a, b) hri_tcc_toggle_PERBUF_reg(a, b)
9961#define hri_tcc_read_PERBUF_DITH5_reg(a) hri_tcc_read_PERBUF_reg(a)
9962#define hri_tcc_set_PERBUF_DITH6_reg(a, b) hri_tcc_set_PERBUF_reg(a, b)
9963#define hri_tcc_get_PERBUF_DITH6_reg(a, b) hri_tcc_get_PERBUF_reg(a, b)
9964#define hri_tcc_write_PERBUF_DITH6_reg(a, b) hri_tcc_write_PERBUF_reg(a, b)
9965#define hri_tcc_clear_PERBUF_DITH6_reg(a, b) hri_tcc_clear_PERBUF_reg(a, b)
9966#define hri_tcc_toggle_PERBUF_DITH6_reg(a, b) hri_tcc_toggle_PERBUF_reg(a, b)
9967#define hri_tcc_read_PERBUF_DITH6_reg(a) hri_tcc_read_PERBUF_reg(a)
9968#define hri_tcc_set_CCBUF_DITH4_reg(a, b, c) hri_tcc_set_CCBUF_reg(a, b, c)
9969#define hri_tcc_get_CCBUF_DITH4_reg(a, b, c) hri_tcc_get_CCBUF_reg(a, b, c)
9970#define hri_tcc_write_CCBUF_DITH4_reg(a, b, c) hri_tcc_write_CCBUF_reg(a, b, c)
9971#define hri_tcc_clear_CCBUF_DITH4_reg(a, b, c) hri_tcc_clear_CCBUF_reg(a, b, c)
9972#define hri_tcc_toggle_CCBUF_DITH4_reg(a, b, c) hri_tcc_toggle_CCBUF_reg(a, b, c)
9973#define hri_tcc_read_CCBUF_DITH4_reg(a, b) hri_tcc_read_CCBUF_reg(a, b)
9974#define hri_tcc_set_CCBUF_DITH5_reg(a, b, c) hri_tcc_set_CCBUF_reg(a, b, c)
9975#define hri_tcc_get_CCBUF_DITH5_reg(a, b, c) hri_tcc_get_CCBUF_reg(a, b, c)
9976#define hri_tcc_write_CCBUF_DITH5_reg(a, b, c) hri_tcc_write_CCBUF_reg(a, b, c)
9977#define hri_tcc_clear_CCBUF_DITH5_reg(a, b, c) hri_tcc_clear_CCBUF_reg(a, b, c)
9978#define hri_tcc_toggle_CCBUF_DITH5_reg(a, b, c) hri_tcc_toggle_CCBUF_reg(a, b, c)
9979#define hri_tcc_read_CCBUF_DITH5_reg(a, b) hri_tcc_read_CCBUF_reg(a, b)
9980#define hri_tcc_set_CCBUF_DITH6_reg(a, b, c) hri_tcc_set_CCBUF_reg(a, b, c)
9981#define hri_tcc_get_CCBUF_DITH6_reg(a, b, c) hri_tcc_get_CCBUF_reg(a, b, c)
9982#define hri_tcc_write_CCBUF_DITH6_reg(a, b, c) hri_tcc_write_CCBUF_reg(a, b, c)
9983#define hri_tcc_clear_CCBUF_DITH6_reg(a, b, c) hri_tcc_clear_CCBUF_reg(a, b, c)
9984#define hri_tcc_toggle_CCBUF_DITH6_reg(a, b, c) hri_tcc_toggle_CCBUF_reg(a, b, c)
9985#define hri_tcc_read_CCBUF_DITH6_reg(a, b) hri_tcc_read_CCBUF_reg(a, b)
9986
9987#ifdef __cplusplus
9988}
9989#endif
9990
9991#endif /* _HRI_TCC_E54_H_INCLUDED */
9992#endif /* _SAME54_TCC_COMPONENT_ */