1 /**
2  * \file
3  *
4  * \brief SAM EVSYS
5  *
6  * Copyright (C) 2016 Atmel Corporation. All rights reserved.
7  *
8  * \asf_license_start
9  *
10  * \page License
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions are met:
14  *
15  * 1. Redistributions of source code must retain the above copyright notice,
16  *    this list of conditions and the following disclaimer.
17  *
18  * 2. Redistributions in binary form must reproduce the above copyright notice,
19  *    this list of conditions and the following disclaimer in the documentation
20  *    and/or other materials provided with the distribution.
21  *
22  * 3. The name of Atmel may not be used to endorse or promote products derived
23  *    from this software without specific prior written permission.
24  *
25  * 4. This software may only be redistributed and used in connection with an
26  *    Atmel microcontroller product.
27  *
28  * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
29  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
30  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
31  * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
32  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
36  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
37  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38  * POSSIBILITY OF SUCH DAMAGE.
39  *
40  * \asf_license_stop
41  */
42 
43 #ifdef _SAML21_EVSYS_COMPONENT_
44 #ifndef _HRI_EVSYS_L21_H_INCLUDED_
45 #define _HRI_EVSYS_L21_H_INCLUDED_
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 #include <stdbool.h>
52 #include <hal_atomic.h>
53 
54 #if defined(ENABLE_EVSYS_CRITICAL_SECTIONS)
55 #define EVSYS_CRITICAL_SECTION_ENTER() CRITICAL_SECTION_ENTER()
56 #define EVSYS_CRITICAL_SECTION_LEAVE() CRITICAL_SECTION_LEAVE()
57 #else
58 #define EVSYS_CRITICAL_SECTION_ENTER()
59 #define EVSYS_CRITICAL_SECTION_LEAVE()
60 #endif
61 
62 typedef uint32_t hri_evsys_channel_reg_t;
63 typedef uint32_t hri_evsys_chstatus_reg_t;
64 typedef uint32_t hri_evsys_intenset_reg_t;
65 typedef uint32_t hri_evsys_intflag_reg_t;
66 typedef uint32_t hri_evsys_swevt_reg_t;
67 typedef uint32_t hri_evsys_user_reg_t;
68 typedef uint8_t  hri_evsys_ctrla_reg_t;
69 
hri_evsys_set_INTEN_OVR0_bit(const void * const hw)70 static inline void hri_evsys_set_INTEN_OVR0_bit(const void *const hw)
71 {
72 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR0;
73 }
74 
hri_evsys_get_INTEN_OVR0_bit(const void * const hw)75 static inline bool hri_evsys_get_INTEN_OVR0_bit(const void *const hw)
76 {
77 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_OVR0) >> EVSYS_INTENSET_OVR0_Pos;
78 }
79 
hri_evsys_write_INTEN_OVR0_bit(const void * const hw,bool value)80 static inline void hri_evsys_write_INTEN_OVR0_bit(const void *const hw, bool value)
81 {
82 	if (value == 0x0) {
83 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR0;
84 	} else {
85 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR0;
86 	}
87 }
88 
hri_evsys_clear_INTEN_OVR0_bit(const void * const hw)89 static inline void hri_evsys_clear_INTEN_OVR0_bit(const void *const hw)
90 {
91 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR0;
92 }
93 
hri_evsys_set_INTEN_OVR1_bit(const void * const hw)94 static inline void hri_evsys_set_INTEN_OVR1_bit(const void *const hw)
95 {
96 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR1;
97 }
98 
hri_evsys_get_INTEN_OVR1_bit(const void * const hw)99 static inline bool hri_evsys_get_INTEN_OVR1_bit(const void *const hw)
100 {
101 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_OVR1) >> EVSYS_INTENSET_OVR1_Pos;
102 }
103 
hri_evsys_write_INTEN_OVR1_bit(const void * const hw,bool value)104 static inline void hri_evsys_write_INTEN_OVR1_bit(const void *const hw, bool value)
105 {
106 	if (value == 0x0) {
107 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR1;
108 	} else {
109 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR1;
110 	}
111 }
112 
hri_evsys_clear_INTEN_OVR1_bit(const void * const hw)113 static inline void hri_evsys_clear_INTEN_OVR1_bit(const void *const hw)
114 {
115 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR1;
116 }
117 
hri_evsys_set_INTEN_OVR2_bit(const void * const hw)118 static inline void hri_evsys_set_INTEN_OVR2_bit(const void *const hw)
119 {
120 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR2;
121 }
122 
hri_evsys_get_INTEN_OVR2_bit(const void * const hw)123 static inline bool hri_evsys_get_INTEN_OVR2_bit(const void *const hw)
124 {
125 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_OVR2) >> EVSYS_INTENSET_OVR2_Pos;
126 }
127 
hri_evsys_write_INTEN_OVR2_bit(const void * const hw,bool value)128 static inline void hri_evsys_write_INTEN_OVR2_bit(const void *const hw, bool value)
129 {
130 	if (value == 0x0) {
131 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR2;
132 	} else {
133 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR2;
134 	}
135 }
136 
hri_evsys_clear_INTEN_OVR2_bit(const void * const hw)137 static inline void hri_evsys_clear_INTEN_OVR2_bit(const void *const hw)
138 {
139 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR2;
140 }
141 
hri_evsys_set_INTEN_OVR3_bit(const void * const hw)142 static inline void hri_evsys_set_INTEN_OVR3_bit(const void *const hw)
143 {
144 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR3;
145 }
146 
hri_evsys_get_INTEN_OVR3_bit(const void * const hw)147 static inline bool hri_evsys_get_INTEN_OVR3_bit(const void *const hw)
148 {
149 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_OVR3) >> EVSYS_INTENSET_OVR3_Pos;
150 }
151 
hri_evsys_write_INTEN_OVR3_bit(const void * const hw,bool value)152 static inline void hri_evsys_write_INTEN_OVR3_bit(const void *const hw, bool value)
153 {
154 	if (value == 0x0) {
155 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR3;
156 	} else {
157 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR3;
158 	}
159 }
160 
hri_evsys_clear_INTEN_OVR3_bit(const void * const hw)161 static inline void hri_evsys_clear_INTEN_OVR3_bit(const void *const hw)
162 {
163 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR3;
164 }
165 
hri_evsys_set_INTEN_OVR4_bit(const void * const hw)166 static inline void hri_evsys_set_INTEN_OVR4_bit(const void *const hw)
167 {
168 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR4;
169 }
170 
hri_evsys_get_INTEN_OVR4_bit(const void * const hw)171 static inline bool hri_evsys_get_INTEN_OVR4_bit(const void *const hw)
172 {
173 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_OVR4) >> EVSYS_INTENSET_OVR4_Pos;
174 }
175 
hri_evsys_write_INTEN_OVR4_bit(const void * const hw,bool value)176 static inline void hri_evsys_write_INTEN_OVR4_bit(const void *const hw, bool value)
177 {
178 	if (value == 0x0) {
179 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR4;
180 	} else {
181 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR4;
182 	}
183 }
184 
hri_evsys_clear_INTEN_OVR4_bit(const void * const hw)185 static inline void hri_evsys_clear_INTEN_OVR4_bit(const void *const hw)
186 {
187 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR4;
188 }
189 
hri_evsys_set_INTEN_OVR5_bit(const void * const hw)190 static inline void hri_evsys_set_INTEN_OVR5_bit(const void *const hw)
191 {
192 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR5;
193 }
194 
hri_evsys_get_INTEN_OVR5_bit(const void * const hw)195 static inline bool hri_evsys_get_INTEN_OVR5_bit(const void *const hw)
196 {
197 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_OVR5) >> EVSYS_INTENSET_OVR5_Pos;
198 }
199 
hri_evsys_write_INTEN_OVR5_bit(const void * const hw,bool value)200 static inline void hri_evsys_write_INTEN_OVR5_bit(const void *const hw, bool value)
201 {
202 	if (value == 0x0) {
203 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR5;
204 	} else {
205 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR5;
206 	}
207 }
208 
hri_evsys_clear_INTEN_OVR5_bit(const void * const hw)209 static inline void hri_evsys_clear_INTEN_OVR5_bit(const void *const hw)
210 {
211 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR5;
212 }
213 
hri_evsys_set_INTEN_OVR6_bit(const void * const hw)214 static inline void hri_evsys_set_INTEN_OVR6_bit(const void *const hw)
215 {
216 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR6;
217 }
218 
hri_evsys_get_INTEN_OVR6_bit(const void * const hw)219 static inline bool hri_evsys_get_INTEN_OVR6_bit(const void *const hw)
220 {
221 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_OVR6) >> EVSYS_INTENSET_OVR6_Pos;
222 }
223 
hri_evsys_write_INTEN_OVR6_bit(const void * const hw,bool value)224 static inline void hri_evsys_write_INTEN_OVR6_bit(const void *const hw, bool value)
225 {
226 	if (value == 0x0) {
227 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR6;
228 	} else {
229 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR6;
230 	}
231 }
232 
hri_evsys_clear_INTEN_OVR6_bit(const void * const hw)233 static inline void hri_evsys_clear_INTEN_OVR6_bit(const void *const hw)
234 {
235 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR6;
236 }
237 
hri_evsys_set_INTEN_OVR7_bit(const void * const hw)238 static inline void hri_evsys_set_INTEN_OVR7_bit(const void *const hw)
239 {
240 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR7;
241 }
242 
hri_evsys_get_INTEN_OVR7_bit(const void * const hw)243 static inline bool hri_evsys_get_INTEN_OVR7_bit(const void *const hw)
244 {
245 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_OVR7) >> EVSYS_INTENSET_OVR7_Pos;
246 }
247 
hri_evsys_write_INTEN_OVR7_bit(const void * const hw,bool value)248 static inline void hri_evsys_write_INTEN_OVR7_bit(const void *const hw, bool value)
249 {
250 	if (value == 0x0) {
251 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR7;
252 	} else {
253 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR7;
254 	}
255 }
256 
hri_evsys_clear_INTEN_OVR7_bit(const void * const hw)257 static inline void hri_evsys_clear_INTEN_OVR7_bit(const void *const hw)
258 {
259 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR7;
260 }
261 
hri_evsys_set_INTEN_OVR8_bit(const void * const hw)262 static inline void hri_evsys_set_INTEN_OVR8_bit(const void *const hw)
263 {
264 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR8;
265 }
266 
hri_evsys_get_INTEN_OVR8_bit(const void * const hw)267 static inline bool hri_evsys_get_INTEN_OVR8_bit(const void *const hw)
268 {
269 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_OVR8) >> EVSYS_INTENSET_OVR8_Pos;
270 }
271 
hri_evsys_write_INTEN_OVR8_bit(const void * const hw,bool value)272 static inline void hri_evsys_write_INTEN_OVR8_bit(const void *const hw, bool value)
273 {
274 	if (value == 0x0) {
275 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR8;
276 	} else {
277 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR8;
278 	}
279 }
280 
hri_evsys_clear_INTEN_OVR8_bit(const void * const hw)281 static inline void hri_evsys_clear_INTEN_OVR8_bit(const void *const hw)
282 {
283 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR8;
284 }
285 
hri_evsys_set_INTEN_OVR9_bit(const void * const hw)286 static inline void hri_evsys_set_INTEN_OVR9_bit(const void *const hw)
287 {
288 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR9;
289 }
290 
hri_evsys_get_INTEN_OVR9_bit(const void * const hw)291 static inline bool hri_evsys_get_INTEN_OVR9_bit(const void *const hw)
292 {
293 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_OVR9) >> EVSYS_INTENSET_OVR9_Pos;
294 }
295 
hri_evsys_write_INTEN_OVR9_bit(const void * const hw,bool value)296 static inline void hri_evsys_write_INTEN_OVR9_bit(const void *const hw, bool value)
297 {
298 	if (value == 0x0) {
299 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR9;
300 	} else {
301 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR9;
302 	}
303 }
304 
hri_evsys_clear_INTEN_OVR9_bit(const void * const hw)305 static inline void hri_evsys_clear_INTEN_OVR9_bit(const void *const hw)
306 {
307 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR9;
308 }
309 
hri_evsys_set_INTEN_OVR10_bit(const void * const hw)310 static inline void hri_evsys_set_INTEN_OVR10_bit(const void *const hw)
311 {
312 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR10;
313 }
314 
hri_evsys_get_INTEN_OVR10_bit(const void * const hw)315 static inline bool hri_evsys_get_INTEN_OVR10_bit(const void *const hw)
316 {
317 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_OVR10) >> EVSYS_INTENSET_OVR10_Pos;
318 }
319 
hri_evsys_write_INTEN_OVR10_bit(const void * const hw,bool value)320 static inline void hri_evsys_write_INTEN_OVR10_bit(const void *const hw, bool value)
321 {
322 	if (value == 0x0) {
323 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR10;
324 	} else {
325 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR10;
326 	}
327 }
328 
hri_evsys_clear_INTEN_OVR10_bit(const void * const hw)329 static inline void hri_evsys_clear_INTEN_OVR10_bit(const void *const hw)
330 {
331 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR10;
332 }
333 
hri_evsys_set_INTEN_OVR11_bit(const void * const hw)334 static inline void hri_evsys_set_INTEN_OVR11_bit(const void *const hw)
335 {
336 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR11;
337 }
338 
hri_evsys_get_INTEN_OVR11_bit(const void * const hw)339 static inline bool hri_evsys_get_INTEN_OVR11_bit(const void *const hw)
340 {
341 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_OVR11) >> EVSYS_INTENSET_OVR11_Pos;
342 }
343 
hri_evsys_write_INTEN_OVR11_bit(const void * const hw,bool value)344 static inline void hri_evsys_write_INTEN_OVR11_bit(const void *const hw, bool value)
345 {
346 	if (value == 0x0) {
347 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR11;
348 	} else {
349 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_OVR11;
350 	}
351 }
352 
hri_evsys_clear_INTEN_OVR11_bit(const void * const hw)353 static inline void hri_evsys_clear_INTEN_OVR11_bit(const void *const hw)
354 {
355 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_OVR11;
356 }
357 
hri_evsys_set_INTEN_EVD0_bit(const void * const hw)358 static inline void hri_evsys_set_INTEN_EVD0_bit(const void *const hw)
359 {
360 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD0;
361 }
362 
hri_evsys_get_INTEN_EVD0_bit(const void * const hw)363 static inline bool hri_evsys_get_INTEN_EVD0_bit(const void *const hw)
364 {
365 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_EVD0) >> EVSYS_INTENSET_EVD0_Pos;
366 }
367 
hri_evsys_write_INTEN_EVD0_bit(const void * const hw,bool value)368 static inline void hri_evsys_write_INTEN_EVD0_bit(const void *const hw, bool value)
369 {
370 	if (value == 0x0) {
371 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD0;
372 	} else {
373 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD0;
374 	}
375 }
376 
hri_evsys_clear_INTEN_EVD0_bit(const void * const hw)377 static inline void hri_evsys_clear_INTEN_EVD0_bit(const void *const hw)
378 {
379 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD0;
380 }
381 
hri_evsys_set_INTEN_EVD1_bit(const void * const hw)382 static inline void hri_evsys_set_INTEN_EVD1_bit(const void *const hw)
383 {
384 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD1;
385 }
386 
hri_evsys_get_INTEN_EVD1_bit(const void * const hw)387 static inline bool hri_evsys_get_INTEN_EVD1_bit(const void *const hw)
388 {
389 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_EVD1) >> EVSYS_INTENSET_EVD1_Pos;
390 }
391 
hri_evsys_write_INTEN_EVD1_bit(const void * const hw,bool value)392 static inline void hri_evsys_write_INTEN_EVD1_bit(const void *const hw, bool value)
393 {
394 	if (value == 0x0) {
395 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD1;
396 	} else {
397 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD1;
398 	}
399 }
400 
hri_evsys_clear_INTEN_EVD1_bit(const void * const hw)401 static inline void hri_evsys_clear_INTEN_EVD1_bit(const void *const hw)
402 {
403 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD1;
404 }
405 
hri_evsys_set_INTEN_EVD2_bit(const void * const hw)406 static inline void hri_evsys_set_INTEN_EVD2_bit(const void *const hw)
407 {
408 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD2;
409 }
410 
hri_evsys_get_INTEN_EVD2_bit(const void * const hw)411 static inline bool hri_evsys_get_INTEN_EVD2_bit(const void *const hw)
412 {
413 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_EVD2) >> EVSYS_INTENSET_EVD2_Pos;
414 }
415 
hri_evsys_write_INTEN_EVD2_bit(const void * const hw,bool value)416 static inline void hri_evsys_write_INTEN_EVD2_bit(const void *const hw, bool value)
417 {
418 	if (value == 0x0) {
419 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD2;
420 	} else {
421 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD2;
422 	}
423 }
424 
hri_evsys_clear_INTEN_EVD2_bit(const void * const hw)425 static inline void hri_evsys_clear_INTEN_EVD2_bit(const void *const hw)
426 {
427 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD2;
428 }
429 
hri_evsys_set_INTEN_EVD3_bit(const void * const hw)430 static inline void hri_evsys_set_INTEN_EVD3_bit(const void *const hw)
431 {
432 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD3;
433 }
434 
hri_evsys_get_INTEN_EVD3_bit(const void * const hw)435 static inline bool hri_evsys_get_INTEN_EVD3_bit(const void *const hw)
436 {
437 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_EVD3) >> EVSYS_INTENSET_EVD3_Pos;
438 }
439 
hri_evsys_write_INTEN_EVD3_bit(const void * const hw,bool value)440 static inline void hri_evsys_write_INTEN_EVD3_bit(const void *const hw, bool value)
441 {
442 	if (value == 0x0) {
443 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD3;
444 	} else {
445 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD3;
446 	}
447 }
448 
hri_evsys_clear_INTEN_EVD3_bit(const void * const hw)449 static inline void hri_evsys_clear_INTEN_EVD3_bit(const void *const hw)
450 {
451 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD3;
452 }
453 
hri_evsys_set_INTEN_EVD4_bit(const void * const hw)454 static inline void hri_evsys_set_INTEN_EVD4_bit(const void *const hw)
455 {
456 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD4;
457 }
458 
hri_evsys_get_INTEN_EVD4_bit(const void * const hw)459 static inline bool hri_evsys_get_INTEN_EVD4_bit(const void *const hw)
460 {
461 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_EVD4) >> EVSYS_INTENSET_EVD4_Pos;
462 }
463 
hri_evsys_write_INTEN_EVD4_bit(const void * const hw,bool value)464 static inline void hri_evsys_write_INTEN_EVD4_bit(const void *const hw, bool value)
465 {
466 	if (value == 0x0) {
467 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD4;
468 	} else {
469 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD4;
470 	}
471 }
472 
hri_evsys_clear_INTEN_EVD4_bit(const void * const hw)473 static inline void hri_evsys_clear_INTEN_EVD4_bit(const void *const hw)
474 {
475 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD4;
476 }
477 
hri_evsys_set_INTEN_EVD5_bit(const void * const hw)478 static inline void hri_evsys_set_INTEN_EVD5_bit(const void *const hw)
479 {
480 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD5;
481 }
482 
hri_evsys_get_INTEN_EVD5_bit(const void * const hw)483 static inline bool hri_evsys_get_INTEN_EVD5_bit(const void *const hw)
484 {
485 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_EVD5) >> EVSYS_INTENSET_EVD5_Pos;
486 }
487 
hri_evsys_write_INTEN_EVD5_bit(const void * const hw,bool value)488 static inline void hri_evsys_write_INTEN_EVD5_bit(const void *const hw, bool value)
489 {
490 	if (value == 0x0) {
491 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD5;
492 	} else {
493 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD5;
494 	}
495 }
496 
hri_evsys_clear_INTEN_EVD5_bit(const void * const hw)497 static inline void hri_evsys_clear_INTEN_EVD5_bit(const void *const hw)
498 {
499 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD5;
500 }
501 
hri_evsys_set_INTEN_EVD6_bit(const void * const hw)502 static inline void hri_evsys_set_INTEN_EVD6_bit(const void *const hw)
503 {
504 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD6;
505 }
506 
hri_evsys_get_INTEN_EVD6_bit(const void * const hw)507 static inline bool hri_evsys_get_INTEN_EVD6_bit(const void *const hw)
508 {
509 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_EVD6) >> EVSYS_INTENSET_EVD6_Pos;
510 }
511 
hri_evsys_write_INTEN_EVD6_bit(const void * const hw,bool value)512 static inline void hri_evsys_write_INTEN_EVD6_bit(const void *const hw, bool value)
513 {
514 	if (value == 0x0) {
515 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD6;
516 	} else {
517 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD6;
518 	}
519 }
520 
hri_evsys_clear_INTEN_EVD6_bit(const void * const hw)521 static inline void hri_evsys_clear_INTEN_EVD6_bit(const void *const hw)
522 {
523 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD6;
524 }
525 
hri_evsys_set_INTEN_EVD7_bit(const void * const hw)526 static inline void hri_evsys_set_INTEN_EVD7_bit(const void *const hw)
527 {
528 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD7;
529 }
530 
hri_evsys_get_INTEN_EVD7_bit(const void * const hw)531 static inline bool hri_evsys_get_INTEN_EVD7_bit(const void *const hw)
532 {
533 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_EVD7) >> EVSYS_INTENSET_EVD7_Pos;
534 }
535 
hri_evsys_write_INTEN_EVD7_bit(const void * const hw,bool value)536 static inline void hri_evsys_write_INTEN_EVD7_bit(const void *const hw, bool value)
537 {
538 	if (value == 0x0) {
539 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD7;
540 	} else {
541 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD7;
542 	}
543 }
544 
hri_evsys_clear_INTEN_EVD7_bit(const void * const hw)545 static inline void hri_evsys_clear_INTEN_EVD7_bit(const void *const hw)
546 {
547 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD7;
548 }
549 
hri_evsys_set_INTEN_EVD8_bit(const void * const hw)550 static inline void hri_evsys_set_INTEN_EVD8_bit(const void *const hw)
551 {
552 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD8;
553 }
554 
hri_evsys_get_INTEN_EVD8_bit(const void * const hw)555 static inline bool hri_evsys_get_INTEN_EVD8_bit(const void *const hw)
556 {
557 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_EVD8) >> EVSYS_INTENSET_EVD8_Pos;
558 }
559 
hri_evsys_write_INTEN_EVD8_bit(const void * const hw,bool value)560 static inline void hri_evsys_write_INTEN_EVD8_bit(const void *const hw, bool value)
561 {
562 	if (value == 0x0) {
563 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD8;
564 	} else {
565 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD8;
566 	}
567 }
568 
hri_evsys_clear_INTEN_EVD8_bit(const void * const hw)569 static inline void hri_evsys_clear_INTEN_EVD8_bit(const void *const hw)
570 {
571 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD8;
572 }
573 
hri_evsys_set_INTEN_EVD9_bit(const void * const hw)574 static inline void hri_evsys_set_INTEN_EVD9_bit(const void *const hw)
575 {
576 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD9;
577 }
578 
hri_evsys_get_INTEN_EVD9_bit(const void * const hw)579 static inline bool hri_evsys_get_INTEN_EVD9_bit(const void *const hw)
580 {
581 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_EVD9) >> EVSYS_INTENSET_EVD9_Pos;
582 }
583 
hri_evsys_write_INTEN_EVD9_bit(const void * const hw,bool value)584 static inline void hri_evsys_write_INTEN_EVD9_bit(const void *const hw, bool value)
585 {
586 	if (value == 0x0) {
587 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD9;
588 	} else {
589 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD9;
590 	}
591 }
592 
hri_evsys_clear_INTEN_EVD9_bit(const void * const hw)593 static inline void hri_evsys_clear_INTEN_EVD9_bit(const void *const hw)
594 {
595 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD9;
596 }
597 
hri_evsys_set_INTEN_EVD10_bit(const void * const hw)598 static inline void hri_evsys_set_INTEN_EVD10_bit(const void *const hw)
599 {
600 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD10;
601 }
602 
hri_evsys_get_INTEN_EVD10_bit(const void * const hw)603 static inline bool hri_evsys_get_INTEN_EVD10_bit(const void *const hw)
604 {
605 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_EVD10) >> EVSYS_INTENSET_EVD10_Pos;
606 }
607 
hri_evsys_write_INTEN_EVD10_bit(const void * const hw,bool value)608 static inline void hri_evsys_write_INTEN_EVD10_bit(const void *const hw, bool value)
609 {
610 	if (value == 0x0) {
611 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD10;
612 	} else {
613 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD10;
614 	}
615 }
616 
hri_evsys_clear_INTEN_EVD10_bit(const void * const hw)617 static inline void hri_evsys_clear_INTEN_EVD10_bit(const void *const hw)
618 {
619 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD10;
620 }
621 
hri_evsys_set_INTEN_EVD11_bit(const void * const hw)622 static inline void hri_evsys_set_INTEN_EVD11_bit(const void *const hw)
623 {
624 	((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD11;
625 }
626 
hri_evsys_get_INTEN_EVD11_bit(const void * const hw)627 static inline bool hri_evsys_get_INTEN_EVD11_bit(const void *const hw)
628 {
629 	return (((Evsys *)hw)->INTENSET.reg & EVSYS_INTENSET_EVD11) >> EVSYS_INTENSET_EVD11_Pos;
630 }
631 
hri_evsys_write_INTEN_EVD11_bit(const void * const hw,bool value)632 static inline void hri_evsys_write_INTEN_EVD11_bit(const void *const hw, bool value)
633 {
634 	if (value == 0x0) {
635 		((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD11;
636 	} else {
637 		((Evsys *)hw)->INTENSET.reg = EVSYS_INTENSET_EVD11;
638 	}
639 }
640 
hri_evsys_clear_INTEN_EVD11_bit(const void * const hw)641 static inline void hri_evsys_clear_INTEN_EVD11_bit(const void *const hw)
642 {
643 	((Evsys *)hw)->INTENCLR.reg = EVSYS_INTENSET_EVD11;
644 }
645 
hri_evsys_set_INTEN_reg(const void * const hw,hri_evsys_intenset_reg_t mask)646 static inline void hri_evsys_set_INTEN_reg(const void *const hw, hri_evsys_intenset_reg_t mask)
647 {
648 	((Evsys *)hw)->INTENSET.reg = mask;
649 }
650 
hri_evsys_get_INTEN_reg(const void * const hw,hri_evsys_intenset_reg_t mask)651 static inline hri_evsys_intenset_reg_t hri_evsys_get_INTEN_reg(const void *const hw, hri_evsys_intenset_reg_t mask)
652 {
653 	uint32_t tmp;
654 	tmp = ((Evsys *)hw)->INTENSET.reg;
655 	tmp &= mask;
656 	return tmp;
657 }
658 
hri_evsys_read_INTEN_reg(const void * const hw)659 static inline hri_evsys_intenset_reg_t hri_evsys_read_INTEN_reg(const void *const hw)
660 {
661 	return ((Evsys *)hw)->INTENSET.reg;
662 }
663 
hri_evsys_write_INTEN_reg(const void * const hw,hri_evsys_intenset_reg_t data)664 static inline void hri_evsys_write_INTEN_reg(const void *const hw, hri_evsys_intenset_reg_t data)
665 {
666 	((Evsys *)hw)->INTENSET.reg = data;
667 	((Evsys *)hw)->INTENCLR.reg = ~data;
668 }
669 
hri_evsys_clear_INTEN_reg(const void * const hw,hri_evsys_intenset_reg_t mask)670 static inline void hri_evsys_clear_INTEN_reg(const void *const hw, hri_evsys_intenset_reg_t mask)
671 {
672 	((Evsys *)hw)->INTENCLR.reg = mask;
673 }
674 
hri_evsys_get_INTFLAG_OVR0_bit(const void * const hw)675 static inline bool hri_evsys_get_INTFLAG_OVR0_bit(const void *const hw)
676 {
677 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR0) >> EVSYS_INTFLAG_OVR0_Pos;
678 }
679 
hri_evsys_clear_INTFLAG_OVR0_bit(const void * const hw)680 static inline void hri_evsys_clear_INTFLAG_OVR0_bit(const void *const hw)
681 {
682 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR0;
683 }
684 
hri_evsys_get_INTFLAG_OVR1_bit(const void * const hw)685 static inline bool hri_evsys_get_INTFLAG_OVR1_bit(const void *const hw)
686 {
687 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR1) >> EVSYS_INTFLAG_OVR1_Pos;
688 }
689 
hri_evsys_clear_INTFLAG_OVR1_bit(const void * const hw)690 static inline void hri_evsys_clear_INTFLAG_OVR1_bit(const void *const hw)
691 {
692 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR1;
693 }
694 
hri_evsys_get_INTFLAG_OVR2_bit(const void * const hw)695 static inline bool hri_evsys_get_INTFLAG_OVR2_bit(const void *const hw)
696 {
697 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR2) >> EVSYS_INTFLAG_OVR2_Pos;
698 }
699 
hri_evsys_clear_INTFLAG_OVR2_bit(const void * const hw)700 static inline void hri_evsys_clear_INTFLAG_OVR2_bit(const void *const hw)
701 {
702 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR2;
703 }
704 
hri_evsys_get_INTFLAG_OVR3_bit(const void * const hw)705 static inline bool hri_evsys_get_INTFLAG_OVR3_bit(const void *const hw)
706 {
707 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR3) >> EVSYS_INTFLAG_OVR3_Pos;
708 }
709 
hri_evsys_clear_INTFLAG_OVR3_bit(const void * const hw)710 static inline void hri_evsys_clear_INTFLAG_OVR3_bit(const void *const hw)
711 {
712 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR3;
713 }
714 
hri_evsys_get_INTFLAG_OVR4_bit(const void * const hw)715 static inline bool hri_evsys_get_INTFLAG_OVR4_bit(const void *const hw)
716 {
717 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR4) >> EVSYS_INTFLAG_OVR4_Pos;
718 }
719 
hri_evsys_clear_INTFLAG_OVR4_bit(const void * const hw)720 static inline void hri_evsys_clear_INTFLAG_OVR4_bit(const void *const hw)
721 {
722 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR4;
723 }
724 
hri_evsys_get_INTFLAG_OVR5_bit(const void * const hw)725 static inline bool hri_evsys_get_INTFLAG_OVR5_bit(const void *const hw)
726 {
727 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR5) >> EVSYS_INTFLAG_OVR5_Pos;
728 }
729 
hri_evsys_clear_INTFLAG_OVR5_bit(const void * const hw)730 static inline void hri_evsys_clear_INTFLAG_OVR5_bit(const void *const hw)
731 {
732 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR5;
733 }
734 
hri_evsys_get_INTFLAG_OVR6_bit(const void * const hw)735 static inline bool hri_evsys_get_INTFLAG_OVR6_bit(const void *const hw)
736 {
737 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR6) >> EVSYS_INTFLAG_OVR6_Pos;
738 }
739 
hri_evsys_clear_INTFLAG_OVR6_bit(const void * const hw)740 static inline void hri_evsys_clear_INTFLAG_OVR6_bit(const void *const hw)
741 {
742 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR6;
743 }
744 
hri_evsys_get_INTFLAG_OVR7_bit(const void * const hw)745 static inline bool hri_evsys_get_INTFLAG_OVR7_bit(const void *const hw)
746 {
747 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR7) >> EVSYS_INTFLAG_OVR7_Pos;
748 }
749 
hri_evsys_clear_INTFLAG_OVR7_bit(const void * const hw)750 static inline void hri_evsys_clear_INTFLAG_OVR7_bit(const void *const hw)
751 {
752 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR7;
753 }
754 
hri_evsys_get_INTFLAG_OVR8_bit(const void * const hw)755 static inline bool hri_evsys_get_INTFLAG_OVR8_bit(const void *const hw)
756 {
757 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR8) >> EVSYS_INTFLAG_OVR8_Pos;
758 }
759 
hri_evsys_clear_INTFLAG_OVR8_bit(const void * const hw)760 static inline void hri_evsys_clear_INTFLAG_OVR8_bit(const void *const hw)
761 {
762 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR8;
763 }
764 
hri_evsys_get_INTFLAG_OVR9_bit(const void * const hw)765 static inline bool hri_evsys_get_INTFLAG_OVR9_bit(const void *const hw)
766 {
767 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR9) >> EVSYS_INTFLAG_OVR9_Pos;
768 }
769 
hri_evsys_clear_INTFLAG_OVR9_bit(const void * const hw)770 static inline void hri_evsys_clear_INTFLAG_OVR9_bit(const void *const hw)
771 {
772 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR9;
773 }
774 
hri_evsys_get_INTFLAG_OVR10_bit(const void * const hw)775 static inline bool hri_evsys_get_INTFLAG_OVR10_bit(const void *const hw)
776 {
777 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR10) >> EVSYS_INTFLAG_OVR10_Pos;
778 }
779 
hri_evsys_clear_INTFLAG_OVR10_bit(const void * const hw)780 static inline void hri_evsys_clear_INTFLAG_OVR10_bit(const void *const hw)
781 {
782 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR10;
783 }
784 
hri_evsys_get_INTFLAG_OVR11_bit(const void * const hw)785 static inline bool hri_evsys_get_INTFLAG_OVR11_bit(const void *const hw)
786 {
787 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR11) >> EVSYS_INTFLAG_OVR11_Pos;
788 }
789 
hri_evsys_clear_INTFLAG_OVR11_bit(const void * const hw)790 static inline void hri_evsys_clear_INTFLAG_OVR11_bit(const void *const hw)
791 {
792 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR11;
793 }
794 
hri_evsys_get_INTFLAG_EVD0_bit(const void * const hw)795 static inline bool hri_evsys_get_INTFLAG_EVD0_bit(const void *const hw)
796 {
797 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD0) >> EVSYS_INTFLAG_EVD0_Pos;
798 }
799 
hri_evsys_clear_INTFLAG_EVD0_bit(const void * const hw)800 static inline void hri_evsys_clear_INTFLAG_EVD0_bit(const void *const hw)
801 {
802 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD0;
803 }
804 
hri_evsys_get_INTFLAG_EVD1_bit(const void * const hw)805 static inline bool hri_evsys_get_INTFLAG_EVD1_bit(const void *const hw)
806 {
807 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD1) >> EVSYS_INTFLAG_EVD1_Pos;
808 }
809 
hri_evsys_clear_INTFLAG_EVD1_bit(const void * const hw)810 static inline void hri_evsys_clear_INTFLAG_EVD1_bit(const void *const hw)
811 {
812 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD1;
813 }
814 
hri_evsys_get_INTFLAG_EVD2_bit(const void * const hw)815 static inline bool hri_evsys_get_INTFLAG_EVD2_bit(const void *const hw)
816 {
817 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD2) >> EVSYS_INTFLAG_EVD2_Pos;
818 }
819 
hri_evsys_clear_INTFLAG_EVD2_bit(const void * const hw)820 static inline void hri_evsys_clear_INTFLAG_EVD2_bit(const void *const hw)
821 {
822 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD2;
823 }
824 
hri_evsys_get_INTFLAG_EVD3_bit(const void * const hw)825 static inline bool hri_evsys_get_INTFLAG_EVD3_bit(const void *const hw)
826 {
827 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD3) >> EVSYS_INTFLAG_EVD3_Pos;
828 }
829 
hri_evsys_clear_INTFLAG_EVD3_bit(const void * const hw)830 static inline void hri_evsys_clear_INTFLAG_EVD3_bit(const void *const hw)
831 {
832 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD3;
833 }
834 
hri_evsys_get_INTFLAG_EVD4_bit(const void * const hw)835 static inline bool hri_evsys_get_INTFLAG_EVD4_bit(const void *const hw)
836 {
837 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD4) >> EVSYS_INTFLAG_EVD4_Pos;
838 }
839 
hri_evsys_clear_INTFLAG_EVD4_bit(const void * const hw)840 static inline void hri_evsys_clear_INTFLAG_EVD4_bit(const void *const hw)
841 {
842 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD4;
843 }
844 
hri_evsys_get_INTFLAG_EVD5_bit(const void * const hw)845 static inline bool hri_evsys_get_INTFLAG_EVD5_bit(const void *const hw)
846 {
847 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD5) >> EVSYS_INTFLAG_EVD5_Pos;
848 }
849 
hri_evsys_clear_INTFLAG_EVD5_bit(const void * const hw)850 static inline void hri_evsys_clear_INTFLAG_EVD5_bit(const void *const hw)
851 {
852 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD5;
853 }
854 
hri_evsys_get_INTFLAG_EVD6_bit(const void * const hw)855 static inline bool hri_evsys_get_INTFLAG_EVD6_bit(const void *const hw)
856 {
857 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD6) >> EVSYS_INTFLAG_EVD6_Pos;
858 }
859 
hri_evsys_clear_INTFLAG_EVD6_bit(const void * const hw)860 static inline void hri_evsys_clear_INTFLAG_EVD6_bit(const void *const hw)
861 {
862 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD6;
863 }
864 
hri_evsys_get_INTFLAG_EVD7_bit(const void * const hw)865 static inline bool hri_evsys_get_INTFLAG_EVD7_bit(const void *const hw)
866 {
867 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD7) >> EVSYS_INTFLAG_EVD7_Pos;
868 }
869 
hri_evsys_clear_INTFLAG_EVD7_bit(const void * const hw)870 static inline void hri_evsys_clear_INTFLAG_EVD7_bit(const void *const hw)
871 {
872 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD7;
873 }
874 
hri_evsys_get_INTFLAG_EVD8_bit(const void * const hw)875 static inline bool hri_evsys_get_INTFLAG_EVD8_bit(const void *const hw)
876 {
877 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD8) >> EVSYS_INTFLAG_EVD8_Pos;
878 }
879 
hri_evsys_clear_INTFLAG_EVD8_bit(const void * const hw)880 static inline void hri_evsys_clear_INTFLAG_EVD8_bit(const void *const hw)
881 {
882 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD8;
883 }
884 
hri_evsys_get_INTFLAG_EVD9_bit(const void * const hw)885 static inline bool hri_evsys_get_INTFLAG_EVD9_bit(const void *const hw)
886 {
887 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD9) >> EVSYS_INTFLAG_EVD9_Pos;
888 }
889 
hri_evsys_clear_INTFLAG_EVD9_bit(const void * const hw)890 static inline void hri_evsys_clear_INTFLAG_EVD9_bit(const void *const hw)
891 {
892 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD9;
893 }
894 
hri_evsys_get_INTFLAG_EVD10_bit(const void * const hw)895 static inline bool hri_evsys_get_INTFLAG_EVD10_bit(const void *const hw)
896 {
897 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD10) >> EVSYS_INTFLAG_EVD10_Pos;
898 }
899 
hri_evsys_clear_INTFLAG_EVD10_bit(const void * const hw)900 static inline void hri_evsys_clear_INTFLAG_EVD10_bit(const void *const hw)
901 {
902 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD10;
903 }
904 
hri_evsys_get_INTFLAG_EVD11_bit(const void * const hw)905 static inline bool hri_evsys_get_INTFLAG_EVD11_bit(const void *const hw)
906 {
907 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD11) >> EVSYS_INTFLAG_EVD11_Pos;
908 }
909 
hri_evsys_clear_INTFLAG_EVD11_bit(const void * const hw)910 static inline void hri_evsys_clear_INTFLAG_EVD11_bit(const void *const hw)
911 {
912 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD11;
913 }
914 
hri_evsys_get_interrupt_OVR0_bit(const void * const hw)915 static inline bool hri_evsys_get_interrupt_OVR0_bit(const void *const hw)
916 {
917 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR0) >> EVSYS_INTFLAG_OVR0_Pos;
918 }
919 
hri_evsys_clear_interrupt_OVR0_bit(const void * const hw)920 static inline void hri_evsys_clear_interrupt_OVR0_bit(const void *const hw)
921 {
922 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR0;
923 }
924 
hri_evsys_get_interrupt_OVR1_bit(const void * const hw)925 static inline bool hri_evsys_get_interrupt_OVR1_bit(const void *const hw)
926 {
927 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR1) >> EVSYS_INTFLAG_OVR1_Pos;
928 }
929 
hri_evsys_clear_interrupt_OVR1_bit(const void * const hw)930 static inline void hri_evsys_clear_interrupt_OVR1_bit(const void *const hw)
931 {
932 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR1;
933 }
934 
hri_evsys_get_interrupt_OVR2_bit(const void * const hw)935 static inline bool hri_evsys_get_interrupt_OVR2_bit(const void *const hw)
936 {
937 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR2) >> EVSYS_INTFLAG_OVR2_Pos;
938 }
939 
hri_evsys_clear_interrupt_OVR2_bit(const void * const hw)940 static inline void hri_evsys_clear_interrupt_OVR2_bit(const void *const hw)
941 {
942 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR2;
943 }
944 
hri_evsys_get_interrupt_OVR3_bit(const void * const hw)945 static inline bool hri_evsys_get_interrupt_OVR3_bit(const void *const hw)
946 {
947 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR3) >> EVSYS_INTFLAG_OVR3_Pos;
948 }
949 
hri_evsys_clear_interrupt_OVR3_bit(const void * const hw)950 static inline void hri_evsys_clear_interrupt_OVR3_bit(const void *const hw)
951 {
952 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR3;
953 }
954 
hri_evsys_get_interrupt_OVR4_bit(const void * const hw)955 static inline bool hri_evsys_get_interrupt_OVR4_bit(const void *const hw)
956 {
957 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR4) >> EVSYS_INTFLAG_OVR4_Pos;
958 }
959 
hri_evsys_clear_interrupt_OVR4_bit(const void * const hw)960 static inline void hri_evsys_clear_interrupt_OVR4_bit(const void *const hw)
961 {
962 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR4;
963 }
964 
hri_evsys_get_interrupt_OVR5_bit(const void * const hw)965 static inline bool hri_evsys_get_interrupt_OVR5_bit(const void *const hw)
966 {
967 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR5) >> EVSYS_INTFLAG_OVR5_Pos;
968 }
969 
hri_evsys_clear_interrupt_OVR5_bit(const void * const hw)970 static inline void hri_evsys_clear_interrupt_OVR5_bit(const void *const hw)
971 {
972 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR5;
973 }
974 
hri_evsys_get_interrupt_OVR6_bit(const void * const hw)975 static inline bool hri_evsys_get_interrupt_OVR6_bit(const void *const hw)
976 {
977 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR6) >> EVSYS_INTFLAG_OVR6_Pos;
978 }
979 
hri_evsys_clear_interrupt_OVR6_bit(const void * const hw)980 static inline void hri_evsys_clear_interrupt_OVR6_bit(const void *const hw)
981 {
982 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR6;
983 }
984 
hri_evsys_get_interrupt_OVR7_bit(const void * const hw)985 static inline bool hri_evsys_get_interrupt_OVR7_bit(const void *const hw)
986 {
987 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR7) >> EVSYS_INTFLAG_OVR7_Pos;
988 }
989 
hri_evsys_clear_interrupt_OVR7_bit(const void * const hw)990 static inline void hri_evsys_clear_interrupt_OVR7_bit(const void *const hw)
991 {
992 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR7;
993 }
994 
hri_evsys_get_interrupt_OVR8_bit(const void * const hw)995 static inline bool hri_evsys_get_interrupt_OVR8_bit(const void *const hw)
996 {
997 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR8) >> EVSYS_INTFLAG_OVR8_Pos;
998 }
999 
hri_evsys_clear_interrupt_OVR8_bit(const void * const hw)1000 static inline void hri_evsys_clear_interrupt_OVR8_bit(const void *const hw)
1001 {
1002 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR8;
1003 }
1004 
hri_evsys_get_interrupt_OVR9_bit(const void * const hw)1005 static inline bool hri_evsys_get_interrupt_OVR9_bit(const void *const hw)
1006 {
1007 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR9) >> EVSYS_INTFLAG_OVR9_Pos;
1008 }
1009 
hri_evsys_clear_interrupt_OVR9_bit(const void * const hw)1010 static inline void hri_evsys_clear_interrupt_OVR9_bit(const void *const hw)
1011 {
1012 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR9;
1013 }
1014 
hri_evsys_get_interrupt_OVR10_bit(const void * const hw)1015 static inline bool hri_evsys_get_interrupt_OVR10_bit(const void *const hw)
1016 {
1017 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR10) >> EVSYS_INTFLAG_OVR10_Pos;
1018 }
1019 
hri_evsys_clear_interrupt_OVR10_bit(const void * const hw)1020 static inline void hri_evsys_clear_interrupt_OVR10_bit(const void *const hw)
1021 {
1022 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR10;
1023 }
1024 
hri_evsys_get_interrupt_OVR11_bit(const void * const hw)1025 static inline bool hri_evsys_get_interrupt_OVR11_bit(const void *const hw)
1026 {
1027 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_OVR11) >> EVSYS_INTFLAG_OVR11_Pos;
1028 }
1029 
hri_evsys_clear_interrupt_OVR11_bit(const void * const hw)1030 static inline void hri_evsys_clear_interrupt_OVR11_bit(const void *const hw)
1031 {
1032 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_OVR11;
1033 }
1034 
hri_evsys_get_interrupt_EVD0_bit(const void * const hw)1035 static inline bool hri_evsys_get_interrupt_EVD0_bit(const void *const hw)
1036 {
1037 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD0) >> EVSYS_INTFLAG_EVD0_Pos;
1038 }
1039 
hri_evsys_clear_interrupt_EVD0_bit(const void * const hw)1040 static inline void hri_evsys_clear_interrupt_EVD0_bit(const void *const hw)
1041 {
1042 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD0;
1043 }
1044 
hri_evsys_get_interrupt_EVD1_bit(const void * const hw)1045 static inline bool hri_evsys_get_interrupt_EVD1_bit(const void *const hw)
1046 {
1047 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD1) >> EVSYS_INTFLAG_EVD1_Pos;
1048 }
1049 
hri_evsys_clear_interrupt_EVD1_bit(const void * const hw)1050 static inline void hri_evsys_clear_interrupt_EVD1_bit(const void *const hw)
1051 {
1052 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD1;
1053 }
1054 
hri_evsys_get_interrupt_EVD2_bit(const void * const hw)1055 static inline bool hri_evsys_get_interrupt_EVD2_bit(const void *const hw)
1056 {
1057 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD2) >> EVSYS_INTFLAG_EVD2_Pos;
1058 }
1059 
hri_evsys_clear_interrupt_EVD2_bit(const void * const hw)1060 static inline void hri_evsys_clear_interrupt_EVD2_bit(const void *const hw)
1061 {
1062 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD2;
1063 }
1064 
hri_evsys_get_interrupt_EVD3_bit(const void * const hw)1065 static inline bool hri_evsys_get_interrupt_EVD3_bit(const void *const hw)
1066 {
1067 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD3) >> EVSYS_INTFLAG_EVD3_Pos;
1068 }
1069 
hri_evsys_clear_interrupt_EVD3_bit(const void * const hw)1070 static inline void hri_evsys_clear_interrupt_EVD3_bit(const void *const hw)
1071 {
1072 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD3;
1073 }
1074 
hri_evsys_get_interrupt_EVD4_bit(const void * const hw)1075 static inline bool hri_evsys_get_interrupt_EVD4_bit(const void *const hw)
1076 {
1077 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD4) >> EVSYS_INTFLAG_EVD4_Pos;
1078 }
1079 
hri_evsys_clear_interrupt_EVD4_bit(const void * const hw)1080 static inline void hri_evsys_clear_interrupt_EVD4_bit(const void *const hw)
1081 {
1082 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD4;
1083 }
1084 
hri_evsys_get_interrupt_EVD5_bit(const void * const hw)1085 static inline bool hri_evsys_get_interrupt_EVD5_bit(const void *const hw)
1086 {
1087 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD5) >> EVSYS_INTFLAG_EVD5_Pos;
1088 }
1089 
hri_evsys_clear_interrupt_EVD5_bit(const void * const hw)1090 static inline void hri_evsys_clear_interrupt_EVD5_bit(const void *const hw)
1091 {
1092 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD5;
1093 }
1094 
hri_evsys_get_interrupt_EVD6_bit(const void * const hw)1095 static inline bool hri_evsys_get_interrupt_EVD6_bit(const void *const hw)
1096 {
1097 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD6) >> EVSYS_INTFLAG_EVD6_Pos;
1098 }
1099 
hri_evsys_clear_interrupt_EVD6_bit(const void * const hw)1100 static inline void hri_evsys_clear_interrupt_EVD6_bit(const void *const hw)
1101 {
1102 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD6;
1103 }
1104 
hri_evsys_get_interrupt_EVD7_bit(const void * const hw)1105 static inline bool hri_evsys_get_interrupt_EVD7_bit(const void *const hw)
1106 {
1107 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD7) >> EVSYS_INTFLAG_EVD7_Pos;
1108 }
1109 
hri_evsys_clear_interrupt_EVD7_bit(const void * const hw)1110 static inline void hri_evsys_clear_interrupt_EVD7_bit(const void *const hw)
1111 {
1112 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD7;
1113 }
1114 
hri_evsys_get_interrupt_EVD8_bit(const void * const hw)1115 static inline bool hri_evsys_get_interrupt_EVD8_bit(const void *const hw)
1116 {
1117 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD8) >> EVSYS_INTFLAG_EVD8_Pos;
1118 }
1119 
hri_evsys_clear_interrupt_EVD8_bit(const void * const hw)1120 static inline void hri_evsys_clear_interrupt_EVD8_bit(const void *const hw)
1121 {
1122 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD8;
1123 }
1124 
hri_evsys_get_interrupt_EVD9_bit(const void * const hw)1125 static inline bool hri_evsys_get_interrupt_EVD9_bit(const void *const hw)
1126 {
1127 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD9) >> EVSYS_INTFLAG_EVD9_Pos;
1128 }
1129 
hri_evsys_clear_interrupt_EVD9_bit(const void * const hw)1130 static inline void hri_evsys_clear_interrupt_EVD9_bit(const void *const hw)
1131 {
1132 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD9;
1133 }
1134 
hri_evsys_get_interrupt_EVD10_bit(const void * const hw)1135 static inline bool hri_evsys_get_interrupt_EVD10_bit(const void *const hw)
1136 {
1137 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD10) >> EVSYS_INTFLAG_EVD10_Pos;
1138 }
1139 
hri_evsys_clear_interrupt_EVD10_bit(const void * const hw)1140 static inline void hri_evsys_clear_interrupt_EVD10_bit(const void *const hw)
1141 {
1142 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD10;
1143 }
1144 
hri_evsys_get_interrupt_EVD11_bit(const void * const hw)1145 static inline bool hri_evsys_get_interrupt_EVD11_bit(const void *const hw)
1146 {
1147 	return (((Evsys *)hw)->INTFLAG.reg & EVSYS_INTFLAG_EVD11) >> EVSYS_INTFLAG_EVD11_Pos;
1148 }
1149 
hri_evsys_clear_interrupt_EVD11_bit(const void * const hw)1150 static inline void hri_evsys_clear_interrupt_EVD11_bit(const void *const hw)
1151 {
1152 	((Evsys *)hw)->INTFLAG.reg = EVSYS_INTFLAG_EVD11;
1153 }
1154 
hri_evsys_get_INTFLAG_reg(const void * const hw,hri_evsys_intflag_reg_t mask)1155 static inline hri_evsys_intflag_reg_t hri_evsys_get_INTFLAG_reg(const void *const hw, hri_evsys_intflag_reg_t mask)
1156 {
1157 	uint32_t tmp;
1158 	tmp = ((Evsys *)hw)->INTFLAG.reg;
1159 	tmp &= mask;
1160 	return tmp;
1161 }
1162 
hri_evsys_read_INTFLAG_reg(const void * const hw)1163 static inline hri_evsys_intflag_reg_t hri_evsys_read_INTFLAG_reg(const void *const hw)
1164 {
1165 	return ((Evsys *)hw)->INTFLAG.reg;
1166 }
1167 
hri_evsys_clear_INTFLAG_reg(const void * const hw,hri_evsys_intflag_reg_t mask)1168 static inline void hri_evsys_clear_INTFLAG_reg(const void *const hw, hri_evsys_intflag_reg_t mask)
1169 {
1170 	((Evsys *)hw)->INTFLAG.reg = mask;
1171 }
1172 
hri_evsys_write_SWEVT_reg(const void * const hw,hri_evsys_swevt_reg_t data)1173 static inline void hri_evsys_write_SWEVT_reg(const void *const hw, hri_evsys_swevt_reg_t data)
1174 {
1175 	EVSYS_CRITICAL_SECTION_ENTER();
1176 	((Evsys *)hw)->SWEVT.reg = data;
1177 	EVSYS_CRITICAL_SECTION_LEAVE();
1178 }
1179 
hri_evsys_set_CTRLA_SWRST_bit(const void * const hw)1180 static inline void hri_evsys_set_CTRLA_SWRST_bit(const void *const hw)
1181 {
1182 	EVSYS_CRITICAL_SECTION_ENTER();
1183 	((Evsys *)hw)->CTRLA.reg |= EVSYS_CTRLA_SWRST;
1184 	EVSYS_CRITICAL_SECTION_LEAVE();
1185 }
1186 
hri_evsys_get_CTRLA_SWRST_bit(const void * const hw)1187 static inline bool hri_evsys_get_CTRLA_SWRST_bit(const void *const hw)
1188 {
1189 	uint8_t tmp;
1190 	tmp = ((Evsys *)hw)->CTRLA.reg;
1191 	tmp = (tmp & EVSYS_CTRLA_SWRST) >> EVSYS_CTRLA_SWRST_Pos;
1192 	return (bool)tmp;
1193 }
1194 
hri_evsys_set_CTRLA_reg(const void * const hw,hri_evsys_ctrla_reg_t mask)1195 static inline void hri_evsys_set_CTRLA_reg(const void *const hw, hri_evsys_ctrla_reg_t mask)
1196 {
1197 	EVSYS_CRITICAL_SECTION_ENTER();
1198 	((Evsys *)hw)->CTRLA.reg |= mask;
1199 	EVSYS_CRITICAL_SECTION_LEAVE();
1200 }
1201 
hri_evsys_get_CTRLA_reg(const void * const hw,hri_evsys_ctrla_reg_t mask)1202 static inline hri_evsys_ctrla_reg_t hri_evsys_get_CTRLA_reg(const void *const hw, hri_evsys_ctrla_reg_t mask)
1203 {
1204 	uint8_t tmp;
1205 	tmp = ((Evsys *)hw)->CTRLA.reg;
1206 	tmp &= mask;
1207 	return tmp;
1208 }
1209 
hri_evsys_write_CTRLA_reg(const void * const hw,hri_evsys_ctrla_reg_t data)1210 static inline void hri_evsys_write_CTRLA_reg(const void *const hw, hri_evsys_ctrla_reg_t data)
1211 {
1212 	EVSYS_CRITICAL_SECTION_ENTER();
1213 	((Evsys *)hw)->CTRLA.reg = data;
1214 	EVSYS_CRITICAL_SECTION_LEAVE();
1215 }
1216 
hri_evsys_clear_CTRLA_reg(const void * const hw,hri_evsys_ctrla_reg_t mask)1217 static inline void hri_evsys_clear_CTRLA_reg(const void *const hw, hri_evsys_ctrla_reg_t mask)
1218 {
1219 	EVSYS_CRITICAL_SECTION_ENTER();
1220 	((Evsys *)hw)->CTRLA.reg &= ~mask;
1221 	EVSYS_CRITICAL_SECTION_LEAVE();
1222 }
1223 
hri_evsys_toggle_CTRLA_reg(const void * const hw,hri_evsys_ctrla_reg_t mask)1224 static inline void hri_evsys_toggle_CTRLA_reg(const void *const hw, hri_evsys_ctrla_reg_t mask)
1225 {
1226 	EVSYS_CRITICAL_SECTION_ENTER();
1227 	((Evsys *)hw)->CTRLA.reg ^= mask;
1228 	EVSYS_CRITICAL_SECTION_LEAVE();
1229 }
1230 
hri_evsys_read_CTRLA_reg(const void * const hw)1231 static inline hri_evsys_ctrla_reg_t hri_evsys_read_CTRLA_reg(const void *const hw)
1232 {
1233 	return ((Evsys *)hw)->CTRLA.reg;
1234 }
1235 
hri_evsys_set_CHANNEL_RUNSTDBY_bit(const void * const hw,uint8_t index)1236 static inline void hri_evsys_set_CHANNEL_RUNSTDBY_bit(const void *const hw, uint8_t index)
1237 {
1238 	EVSYS_CRITICAL_SECTION_ENTER();
1239 	((Evsys *)hw)->CHANNEL[index].reg |= EVSYS_CHANNEL_RUNSTDBY;
1240 	EVSYS_CRITICAL_SECTION_LEAVE();
1241 }
1242 
hri_evsys_get_CHANNEL_RUNSTDBY_bit(const void * const hw,uint8_t index)1243 static inline bool hri_evsys_get_CHANNEL_RUNSTDBY_bit(const void *const hw, uint8_t index)
1244 {
1245 	uint32_t tmp;
1246 	tmp = ((Evsys *)hw)->CHANNEL[index].reg;
1247 	tmp = (tmp & EVSYS_CHANNEL_RUNSTDBY) >> EVSYS_CHANNEL_RUNSTDBY_Pos;
1248 	return (bool)tmp;
1249 }
1250 
hri_evsys_write_CHANNEL_RUNSTDBY_bit(const void * const hw,uint8_t index,bool value)1251 static inline void hri_evsys_write_CHANNEL_RUNSTDBY_bit(const void *const hw, uint8_t index, bool value)
1252 {
1253 	uint32_t tmp;
1254 	EVSYS_CRITICAL_SECTION_ENTER();
1255 	tmp = ((Evsys *)hw)->CHANNEL[index].reg;
1256 	tmp &= ~EVSYS_CHANNEL_RUNSTDBY;
1257 	tmp |= value << EVSYS_CHANNEL_RUNSTDBY_Pos;
1258 	((Evsys *)hw)->CHANNEL[index].reg = tmp;
1259 	EVSYS_CRITICAL_SECTION_LEAVE();
1260 }
1261 
hri_evsys_clear_CHANNEL_RUNSTDBY_bit(const void * const hw,uint8_t index)1262 static inline void hri_evsys_clear_CHANNEL_RUNSTDBY_bit(const void *const hw, uint8_t index)
1263 {
1264 	EVSYS_CRITICAL_SECTION_ENTER();
1265 	((Evsys *)hw)->CHANNEL[index].reg &= ~EVSYS_CHANNEL_RUNSTDBY;
1266 	EVSYS_CRITICAL_SECTION_LEAVE();
1267 }
1268 
hri_evsys_toggle_CHANNEL_RUNSTDBY_bit(const void * const hw,uint8_t index)1269 static inline void hri_evsys_toggle_CHANNEL_RUNSTDBY_bit(const void *const hw, uint8_t index)
1270 {
1271 	EVSYS_CRITICAL_SECTION_ENTER();
1272 	((Evsys *)hw)->CHANNEL[index].reg ^= EVSYS_CHANNEL_RUNSTDBY;
1273 	EVSYS_CRITICAL_SECTION_LEAVE();
1274 }
1275 
hri_evsys_set_CHANNEL_ONDEMAND_bit(const void * const hw,uint8_t index)1276 static inline void hri_evsys_set_CHANNEL_ONDEMAND_bit(const void *const hw, uint8_t index)
1277 {
1278 	EVSYS_CRITICAL_SECTION_ENTER();
1279 	((Evsys *)hw)->CHANNEL[index].reg |= EVSYS_CHANNEL_ONDEMAND;
1280 	EVSYS_CRITICAL_SECTION_LEAVE();
1281 }
1282 
hri_evsys_get_CHANNEL_ONDEMAND_bit(const void * const hw,uint8_t index)1283 static inline bool hri_evsys_get_CHANNEL_ONDEMAND_bit(const void *const hw, uint8_t index)
1284 {
1285 	uint32_t tmp;
1286 	tmp = ((Evsys *)hw)->CHANNEL[index].reg;
1287 	tmp = (tmp & EVSYS_CHANNEL_ONDEMAND) >> EVSYS_CHANNEL_ONDEMAND_Pos;
1288 	return (bool)tmp;
1289 }
1290 
hri_evsys_write_CHANNEL_ONDEMAND_bit(const void * const hw,uint8_t index,bool value)1291 static inline void hri_evsys_write_CHANNEL_ONDEMAND_bit(const void *const hw, uint8_t index, bool value)
1292 {
1293 	uint32_t tmp;
1294 	EVSYS_CRITICAL_SECTION_ENTER();
1295 	tmp = ((Evsys *)hw)->CHANNEL[index].reg;
1296 	tmp &= ~EVSYS_CHANNEL_ONDEMAND;
1297 	tmp |= value << EVSYS_CHANNEL_ONDEMAND_Pos;
1298 	((Evsys *)hw)->CHANNEL[index].reg = tmp;
1299 	EVSYS_CRITICAL_SECTION_LEAVE();
1300 }
1301 
hri_evsys_clear_CHANNEL_ONDEMAND_bit(const void * const hw,uint8_t index)1302 static inline void hri_evsys_clear_CHANNEL_ONDEMAND_bit(const void *const hw, uint8_t index)
1303 {
1304 	EVSYS_CRITICAL_SECTION_ENTER();
1305 	((Evsys *)hw)->CHANNEL[index].reg &= ~EVSYS_CHANNEL_ONDEMAND;
1306 	EVSYS_CRITICAL_SECTION_LEAVE();
1307 }
1308 
hri_evsys_toggle_CHANNEL_ONDEMAND_bit(const void * const hw,uint8_t index)1309 static inline void hri_evsys_toggle_CHANNEL_ONDEMAND_bit(const void *const hw, uint8_t index)
1310 {
1311 	EVSYS_CRITICAL_SECTION_ENTER();
1312 	((Evsys *)hw)->CHANNEL[index].reg ^= EVSYS_CHANNEL_ONDEMAND;
1313 	EVSYS_CRITICAL_SECTION_LEAVE();
1314 }
1315 
hri_evsys_set_CHANNEL_EVGEN_bf(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1316 static inline void hri_evsys_set_CHANNEL_EVGEN_bf(const void *const hw, uint8_t index, hri_evsys_channel_reg_t mask)
1317 {
1318 	EVSYS_CRITICAL_SECTION_ENTER();
1319 	((Evsys *)hw)->CHANNEL[index].reg |= EVSYS_CHANNEL_EVGEN(mask);
1320 	EVSYS_CRITICAL_SECTION_LEAVE();
1321 }
1322 
hri_evsys_get_CHANNEL_EVGEN_bf(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1323 static inline hri_evsys_channel_reg_t hri_evsys_get_CHANNEL_EVGEN_bf(const void *const hw, uint8_t index,
1324                                                                      hri_evsys_channel_reg_t mask)
1325 {
1326 	uint32_t tmp;
1327 	tmp = ((Evsys *)hw)->CHANNEL[index].reg;
1328 	tmp = (tmp & EVSYS_CHANNEL_EVGEN(mask)) >> EVSYS_CHANNEL_EVGEN_Pos;
1329 	return tmp;
1330 }
1331 
hri_evsys_write_CHANNEL_EVGEN_bf(const void * const hw,uint8_t index,hri_evsys_channel_reg_t data)1332 static inline void hri_evsys_write_CHANNEL_EVGEN_bf(const void *const hw, uint8_t index, hri_evsys_channel_reg_t data)
1333 {
1334 	uint32_t tmp;
1335 	EVSYS_CRITICAL_SECTION_ENTER();
1336 	tmp = ((Evsys *)hw)->CHANNEL[index].reg;
1337 	tmp &= ~EVSYS_CHANNEL_EVGEN_Msk;
1338 	tmp |= EVSYS_CHANNEL_EVGEN(data);
1339 	((Evsys *)hw)->CHANNEL[index].reg = tmp;
1340 	EVSYS_CRITICAL_SECTION_LEAVE();
1341 }
1342 
hri_evsys_clear_CHANNEL_EVGEN_bf(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1343 static inline void hri_evsys_clear_CHANNEL_EVGEN_bf(const void *const hw, uint8_t index, hri_evsys_channel_reg_t mask)
1344 {
1345 	EVSYS_CRITICAL_SECTION_ENTER();
1346 	((Evsys *)hw)->CHANNEL[index].reg &= ~EVSYS_CHANNEL_EVGEN(mask);
1347 	EVSYS_CRITICAL_SECTION_LEAVE();
1348 }
1349 
hri_evsys_toggle_CHANNEL_EVGEN_bf(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1350 static inline void hri_evsys_toggle_CHANNEL_EVGEN_bf(const void *const hw, uint8_t index, hri_evsys_channel_reg_t mask)
1351 {
1352 	EVSYS_CRITICAL_SECTION_ENTER();
1353 	((Evsys *)hw)->CHANNEL[index].reg ^= EVSYS_CHANNEL_EVGEN(mask);
1354 	EVSYS_CRITICAL_SECTION_LEAVE();
1355 }
1356 
hri_evsys_read_CHANNEL_EVGEN_bf(const void * const hw,uint8_t index)1357 static inline hri_evsys_channel_reg_t hri_evsys_read_CHANNEL_EVGEN_bf(const void *const hw, uint8_t index)
1358 {
1359 	uint32_t tmp;
1360 	tmp = ((Evsys *)hw)->CHANNEL[index].reg;
1361 	tmp = (tmp & EVSYS_CHANNEL_EVGEN_Msk) >> EVSYS_CHANNEL_EVGEN_Pos;
1362 	return tmp;
1363 }
1364 
hri_evsys_set_CHANNEL_PATH_bf(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1365 static inline void hri_evsys_set_CHANNEL_PATH_bf(const void *const hw, uint8_t index, hri_evsys_channel_reg_t mask)
1366 {
1367 	EVSYS_CRITICAL_SECTION_ENTER();
1368 	((Evsys *)hw)->CHANNEL[index].reg |= EVSYS_CHANNEL_PATH(mask);
1369 	EVSYS_CRITICAL_SECTION_LEAVE();
1370 }
1371 
hri_evsys_get_CHANNEL_PATH_bf(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1372 static inline hri_evsys_channel_reg_t hri_evsys_get_CHANNEL_PATH_bf(const void *const hw, uint8_t index,
1373                                                                     hri_evsys_channel_reg_t mask)
1374 {
1375 	uint32_t tmp;
1376 	tmp = ((Evsys *)hw)->CHANNEL[index].reg;
1377 	tmp = (tmp & EVSYS_CHANNEL_PATH(mask)) >> EVSYS_CHANNEL_PATH_Pos;
1378 	return tmp;
1379 }
1380 
hri_evsys_write_CHANNEL_PATH_bf(const void * const hw,uint8_t index,hri_evsys_channel_reg_t data)1381 static inline void hri_evsys_write_CHANNEL_PATH_bf(const void *const hw, uint8_t index, hri_evsys_channel_reg_t data)
1382 {
1383 	uint32_t tmp;
1384 	EVSYS_CRITICAL_SECTION_ENTER();
1385 	tmp = ((Evsys *)hw)->CHANNEL[index].reg;
1386 	tmp &= ~EVSYS_CHANNEL_PATH_Msk;
1387 	tmp |= EVSYS_CHANNEL_PATH(data);
1388 	((Evsys *)hw)->CHANNEL[index].reg = tmp;
1389 	EVSYS_CRITICAL_SECTION_LEAVE();
1390 }
1391 
hri_evsys_clear_CHANNEL_PATH_bf(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1392 static inline void hri_evsys_clear_CHANNEL_PATH_bf(const void *const hw, uint8_t index, hri_evsys_channel_reg_t mask)
1393 {
1394 	EVSYS_CRITICAL_SECTION_ENTER();
1395 	((Evsys *)hw)->CHANNEL[index].reg &= ~EVSYS_CHANNEL_PATH(mask);
1396 	EVSYS_CRITICAL_SECTION_LEAVE();
1397 }
1398 
hri_evsys_toggle_CHANNEL_PATH_bf(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1399 static inline void hri_evsys_toggle_CHANNEL_PATH_bf(const void *const hw, uint8_t index, hri_evsys_channel_reg_t mask)
1400 {
1401 	EVSYS_CRITICAL_SECTION_ENTER();
1402 	((Evsys *)hw)->CHANNEL[index].reg ^= EVSYS_CHANNEL_PATH(mask);
1403 	EVSYS_CRITICAL_SECTION_LEAVE();
1404 }
1405 
hri_evsys_read_CHANNEL_PATH_bf(const void * const hw,uint8_t index)1406 static inline hri_evsys_channel_reg_t hri_evsys_read_CHANNEL_PATH_bf(const void *const hw, uint8_t index)
1407 {
1408 	uint32_t tmp;
1409 	tmp = ((Evsys *)hw)->CHANNEL[index].reg;
1410 	tmp = (tmp & EVSYS_CHANNEL_PATH_Msk) >> EVSYS_CHANNEL_PATH_Pos;
1411 	return tmp;
1412 }
1413 
hri_evsys_set_CHANNEL_EDGSEL_bf(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1414 static inline void hri_evsys_set_CHANNEL_EDGSEL_bf(const void *const hw, uint8_t index, hri_evsys_channel_reg_t mask)
1415 {
1416 	EVSYS_CRITICAL_SECTION_ENTER();
1417 	((Evsys *)hw)->CHANNEL[index].reg |= EVSYS_CHANNEL_EDGSEL(mask);
1418 	EVSYS_CRITICAL_SECTION_LEAVE();
1419 }
1420 
hri_evsys_get_CHANNEL_EDGSEL_bf(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1421 static inline hri_evsys_channel_reg_t hri_evsys_get_CHANNEL_EDGSEL_bf(const void *const hw, uint8_t index,
1422                                                                       hri_evsys_channel_reg_t mask)
1423 {
1424 	uint32_t tmp;
1425 	tmp = ((Evsys *)hw)->CHANNEL[index].reg;
1426 	tmp = (tmp & EVSYS_CHANNEL_EDGSEL(mask)) >> EVSYS_CHANNEL_EDGSEL_Pos;
1427 	return tmp;
1428 }
1429 
hri_evsys_write_CHANNEL_EDGSEL_bf(const void * const hw,uint8_t index,hri_evsys_channel_reg_t data)1430 static inline void hri_evsys_write_CHANNEL_EDGSEL_bf(const void *const hw, uint8_t index, hri_evsys_channel_reg_t data)
1431 {
1432 	uint32_t tmp;
1433 	EVSYS_CRITICAL_SECTION_ENTER();
1434 	tmp = ((Evsys *)hw)->CHANNEL[index].reg;
1435 	tmp &= ~EVSYS_CHANNEL_EDGSEL_Msk;
1436 	tmp |= EVSYS_CHANNEL_EDGSEL(data);
1437 	((Evsys *)hw)->CHANNEL[index].reg = tmp;
1438 	EVSYS_CRITICAL_SECTION_LEAVE();
1439 }
1440 
hri_evsys_clear_CHANNEL_EDGSEL_bf(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1441 static inline void hri_evsys_clear_CHANNEL_EDGSEL_bf(const void *const hw, uint8_t index, hri_evsys_channel_reg_t mask)
1442 {
1443 	EVSYS_CRITICAL_SECTION_ENTER();
1444 	((Evsys *)hw)->CHANNEL[index].reg &= ~EVSYS_CHANNEL_EDGSEL(mask);
1445 	EVSYS_CRITICAL_SECTION_LEAVE();
1446 }
1447 
hri_evsys_toggle_CHANNEL_EDGSEL_bf(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1448 static inline void hri_evsys_toggle_CHANNEL_EDGSEL_bf(const void *const hw, uint8_t index, hri_evsys_channel_reg_t mask)
1449 {
1450 	EVSYS_CRITICAL_SECTION_ENTER();
1451 	((Evsys *)hw)->CHANNEL[index].reg ^= EVSYS_CHANNEL_EDGSEL(mask);
1452 	EVSYS_CRITICAL_SECTION_LEAVE();
1453 }
1454 
hri_evsys_read_CHANNEL_EDGSEL_bf(const void * const hw,uint8_t index)1455 static inline hri_evsys_channel_reg_t hri_evsys_read_CHANNEL_EDGSEL_bf(const void *const hw, uint8_t index)
1456 {
1457 	uint32_t tmp;
1458 	tmp = ((Evsys *)hw)->CHANNEL[index].reg;
1459 	tmp = (tmp & EVSYS_CHANNEL_EDGSEL_Msk) >> EVSYS_CHANNEL_EDGSEL_Pos;
1460 	return tmp;
1461 }
1462 
hri_evsys_set_CHANNEL_reg(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1463 static inline void hri_evsys_set_CHANNEL_reg(const void *const hw, uint8_t index, hri_evsys_channel_reg_t mask)
1464 {
1465 	EVSYS_CRITICAL_SECTION_ENTER();
1466 	((Evsys *)hw)->CHANNEL[index].reg |= mask;
1467 	EVSYS_CRITICAL_SECTION_LEAVE();
1468 }
1469 
hri_evsys_get_CHANNEL_reg(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1470 static inline hri_evsys_channel_reg_t hri_evsys_get_CHANNEL_reg(const void *const hw, uint8_t index,
1471                                                                 hri_evsys_channel_reg_t mask)
1472 {
1473 	uint32_t tmp;
1474 	tmp = ((Evsys *)hw)->CHANNEL[index].reg;
1475 	tmp &= mask;
1476 	return tmp;
1477 }
1478 
hri_evsys_write_CHANNEL_reg(const void * const hw,uint8_t index,hri_evsys_channel_reg_t data)1479 static inline void hri_evsys_write_CHANNEL_reg(const void *const hw, uint8_t index, hri_evsys_channel_reg_t data)
1480 {
1481 	EVSYS_CRITICAL_SECTION_ENTER();
1482 	((Evsys *)hw)->CHANNEL[index].reg = data;
1483 	EVSYS_CRITICAL_SECTION_LEAVE();
1484 }
1485 
hri_evsys_clear_CHANNEL_reg(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1486 static inline void hri_evsys_clear_CHANNEL_reg(const void *const hw, uint8_t index, hri_evsys_channel_reg_t mask)
1487 {
1488 	EVSYS_CRITICAL_SECTION_ENTER();
1489 	((Evsys *)hw)->CHANNEL[index].reg &= ~mask;
1490 	EVSYS_CRITICAL_SECTION_LEAVE();
1491 }
1492 
hri_evsys_toggle_CHANNEL_reg(const void * const hw,uint8_t index,hri_evsys_channel_reg_t mask)1493 static inline void hri_evsys_toggle_CHANNEL_reg(const void *const hw, uint8_t index, hri_evsys_channel_reg_t mask)
1494 {
1495 	EVSYS_CRITICAL_SECTION_ENTER();
1496 	((Evsys *)hw)->CHANNEL[index].reg ^= mask;
1497 	EVSYS_CRITICAL_SECTION_LEAVE();
1498 }
1499 
hri_evsys_read_CHANNEL_reg(const void * const hw,uint8_t index)1500 static inline hri_evsys_channel_reg_t hri_evsys_read_CHANNEL_reg(const void *const hw, uint8_t index)
1501 {
1502 	return ((Evsys *)hw)->CHANNEL[index].reg;
1503 }
1504 
hri_evsys_set_USER_CHANNEL_bf(const void * const hw,uint8_t index,hri_evsys_user_reg_t mask)1505 static inline void hri_evsys_set_USER_CHANNEL_bf(const void *const hw, uint8_t index, hri_evsys_user_reg_t mask)
1506 {
1507 	EVSYS_CRITICAL_SECTION_ENTER();
1508 	((Evsys *)hw)->USER[index].reg |= EVSYS_USER_CHANNEL(mask);
1509 	EVSYS_CRITICAL_SECTION_LEAVE();
1510 }
1511 
hri_evsys_get_USER_CHANNEL_bf(const void * const hw,uint8_t index,hri_evsys_user_reg_t mask)1512 static inline hri_evsys_user_reg_t hri_evsys_get_USER_CHANNEL_bf(const void *const hw, uint8_t index,
1513                                                                  hri_evsys_user_reg_t mask)
1514 {
1515 	uint32_t tmp;
1516 	tmp = ((Evsys *)hw)->USER[index].reg;
1517 	tmp = (tmp & EVSYS_USER_CHANNEL(mask)) >> EVSYS_USER_CHANNEL_Pos;
1518 	return tmp;
1519 }
1520 
hri_evsys_write_USER_CHANNEL_bf(const void * const hw,uint8_t index,hri_evsys_user_reg_t data)1521 static inline void hri_evsys_write_USER_CHANNEL_bf(const void *const hw, uint8_t index, hri_evsys_user_reg_t data)
1522 {
1523 	uint32_t tmp;
1524 	EVSYS_CRITICAL_SECTION_ENTER();
1525 	tmp = ((Evsys *)hw)->USER[index].reg;
1526 	tmp &= ~EVSYS_USER_CHANNEL_Msk;
1527 	tmp |= EVSYS_USER_CHANNEL(data);
1528 	((Evsys *)hw)->USER[index].reg = tmp;
1529 	EVSYS_CRITICAL_SECTION_LEAVE();
1530 }
1531 
hri_evsys_clear_USER_CHANNEL_bf(const void * const hw,uint8_t index,hri_evsys_user_reg_t mask)1532 static inline void hri_evsys_clear_USER_CHANNEL_bf(const void *const hw, uint8_t index, hri_evsys_user_reg_t mask)
1533 {
1534 	EVSYS_CRITICAL_SECTION_ENTER();
1535 	((Evsys *)hw)->USER[index].reg &= ~EVSYS_USER_CHANNEL(mask);
1536 	EVSYS_CRITICAL_SECTION_LEAVE();
1537 }
1538 
hri_evsys_toggle_USER_CHANNEL_bf(const void * const hw,uint8_t index,hri_evsys_user_reg_t mask)1539 static inline void hri_evsys_toggle_USER_CHANNEL_bf(const void *const hw, uint8_t index, hri_evsys_user_reg_t mask)
1540 {
1541 	EVSYS_CRITICAL_SECTION_ENTER();
1542 	((Evsys *)hw)->USER[index].reg ^= EVSYS_USER_CHANNEL(mask);
1543 	EVSYS_CRITICAL_SECTION_LEAVE();
1544 }
1545 
hri_evsys_read_USER_CHANNEL_bf(const void * const hw,uint8_t index)1546 static inline hri_evsys_user_reg_t hri_evsys_read_USER_CHANNEL_bf(const void *const hw, uint8_t index)
1547 {
1548 	uint32_t tmp;
1549 	tmp = ((Evsys *)hw)->USER[index].reg;
1550 	tmp = (tmp & EVSYS_USER_CHANNEL_Msk) >> EVSYS_USER_CHANNEL_Pos;
1551 	return tmp;
1552 }
1553 
hri_evsys_set_USER_reg(const void * const hw,uint8_t index,hri_evsys_user_reg_t mask)1554 static inline void hri_evsys_set_USER_reg(const void *const hw, uint8_t index, hri_evsys_user_reg_t mask)
1555 {
1556 	EVSYS_CRITICAL_SECTION_ENTER();
1557 	((Evsys *)hw)->USER[index].reg |= mask;
1558 	EVSYS_CRITICAL_SECTION_LEAVE();
1559 }
1560 
hri_evsys_get_USER_reg(const void * const hw,uint8_t index,hri_evsys_user_reg_t mask)1561 static inline hri_evsys_user_reg_t hri_evsys_get_USER_reg(const void *const hw, uint8_t index,
1562                                                           hri_evsys_user_reg_t mask)
1563 {
1564 	uint32_t tmp;
1565 	tmp = ((Evsys *)hw)->USER[index].reg;
1566 	tmp &= mask;
1567 	return tmp;
1568 }
1569 
hri_evsys_write_USER_reg(const void * const hw,uint8_t index,hri_evsys_user_reg_t data)1570 static inline void hri_evsys_write_USER_reg(const void *const hw, uint8_t index, hri_evsys_user_reg_t data)
1571 {
1572 	EVSYS_CRITICAL_SECTION_ENTER();
1573 	((Evsys *)hw)->USER[index].reg = data;
1574 	EVSYS_CRITICAL_SECTION_LEAVE();
1575 }
1576 
hri_evsys_clear_USER_reg(const void * const hw,uint8_t index,hri_evsys_user_reg_t mask)1577 static inline void hri_evsys_clear_USER_reg(const void *const hw, uint8_t index, hri_evsys_user_reg_t mask)
1578 {
1579 	EVSYS_CRITICAL_SECTION_ENTER();
1580 	((Evsys *)hw)->USER[index].reg &= ~mask;
1581 	EVSYS_CRITICAL_SECTION_LEAVE();
1582 }
1583 
hri_evsys_toggle_USER_reg(const void * const hw,uint8_t index,hri_evsys_user_reg_t mask)1584 static inline void hri_evsys_toggle_USER_reg(const void *const hw, uint8_t index, hri_evsys_user_reg_t mask)
1585 {
1586 	EVSYS_CRITICAL_SECTION_ENTER();
1587 	((Evsys *)hw)->USER[index].reg ^= mask;
1588 	EVSYS_CRITICAL_SECTION_LEAVE();
1589 }
1590 
hri_evsys_read_USER_reg(const void * const hw,uint8_t index)1591 static inline hri_evsys_user_reg_t hri_evsys_read_USER_reg(const void *const hw, uint8_t index)
1592 {
1593 	return ((Evsys *)hw)->USER[index].reg;
1594 }
1595 
hri_evsys_get_CHSTATUS_USRRDY0_bit(const void * const hw)1596 static inline bool hri_evsys_get_CHSTATUS_USRRDY0_bit(const void *const hw)
1597 {
1598 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_USRRDY0) >> EVSYS_CHSTATUS_USRRDY0_Pos;
1599 }
1600 
hri_evsys_get_CHSTATUS_USRRDY1_bit(const void * const hw)1601 static inline bool hri_evsys_get_CHSTATUS_USRRDY1_bit(const void *const hw)
1602 {
1603 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_USRRDY1) >> EVSYS_CHSTATUS_USRRDY1_Pos;
1604 }
1605 
hri_evsys_get_CHSTATUS_USRRDY2_bit(const void * const hw)1606 static inline bool hri_evsys_get_CHSTATUS_USRRDY2_bit(const void *const hw)
1607 {
1608 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_USRRDY2) >> EVSYS_CHSTATUS_USRRDY2_Pos;
1609 }
1610 
hri_evsys_get_CHSTATUS_USRRDY3_bit(const void * const hw)1611 static inline bool hri_evsys_get_CHSTATUS_USRRDY3_bit(const void *const hw)
1612 {
1613 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_USRRDY3) >> EVSYS_CHSTATUS_USRRDY3_Pos;
1614 }
1615 
hri_evsys_get_CHSTATUS_USRRDY4_bit(const void * const hw)1616 static inline bool hri_evsys_get_CHSTATUS_USRRDY4_bit(const void *const hw)
1617 {
1618 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_USRRDY4) >> EVSYS_CHSTATUS_USRRDY4_Pos;
1619 }
1620 
hri_evsys_get_CHSTATUS_USRRDY5_bit(const void * const hw)1621 static inline bool hri_evsys_get_CHSTATUS_USRRDY5_bit(const void *const hw)
1622 {
1623 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_USRRDY5) >> EVSYS_CHSTATUS_USRRDY5_Pos;
1624 }
1625 
hri_evsys_get_CHSTATUS_USRRDY6_bit(const void * const hw)1626 static inline bool hri_evsys_get_CHSTATUS_USRRDY6_bit(const void *const hw)
1627 {
1628 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_USRRDY6) >> EVSYS_CHSTATUS_USRRDY6_Pos;
1629 }
1630 
hri_evsys_get_CHSTATUS_USRRDY7_bit(const void * const hw)1631 static inline bool hri_evsys_get_CHSTATUS_USRRDY7_bit(const void *const hw)
1632 {
1633 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_USRRDY7) >> EVSYS_CHSTATUS_USRRDY7_Pos;
1634 }
1635 
hri_evsys_get_CHSTATUS_USRRDY8_bit(const void * const hw)1636 static inline bool hri_evsys_get_CHSTATUS_USRRDY8_bit(const void *const hw)
1637 {
1638 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_USRRDY8) >> EVSYS_CHSTATUS_USRRDY8_Pos;
1639 }
1640 
hri_evsys_get_CHSTATUS_USRRDY9_bit(const void * const hw)1641 static inline bool hri_evsys_get_CHSTATUS_USRRDY9_bit(const void *const hw)
1642 {
1643 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_USRRDY9) >> EVSYS_CHSTATUS_USRRDY9_Pos;
1644 }
1645 
hri_evsys_get_CHSTATUS_USRRDY10_bit(const void * const hw)1646 static inline bool hri_evsys_get_CHSTATUS_USRRDY10_bit(const void *const hw)
1647 {
1648 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_USRRDY10) >> EVSYS_CHSTATUS_USRRDY10_Pos;
1649 }
1650 
hri_evsys_get_CHSTATUS_USRRDY11_bit(const void * const hw)1651 static inline bool hri_evsys_get_CHSTATUS_USRRDY11_bit(const void *const hw)
1652 {
1653 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_USRRDY11) >> EVSYS_CHSTATUS_USRRDY11_Pos;
1654 }
1655 
hri_evsys_get_CHSTATUS_CHBUSY0_bit(const void * const hw)1656 static inline bool hri_evsys_get_CHSTATUS_CHBUSY0_bit(const void *const hw)
1657 {
1658 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_CHBUSY0) >> EVSYS_CHSTATUS_CHBUSY0_Pos;
1659 }
1660 
hri_evsys_get_CHSTATUS_CHBUSY1_bit(const void * const hw)1661 static inline bool hri_evsys_get_CHSTATUS_CHBUSY1_bit(const void *const hw)
1662 {
1663 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_CHBUSY1) >> EVSYS_CHSTATUS_CHBUSY1_Pos;
1664 }
1665 
hri_evsys_get_CHSTATUS_CHBUSY2_bit(const void * const hw)1666 static inline bool hri_evsys_get_CHSTATUS_CHBUSY2_bit(const void *const hw)
1667 {
1668 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_CHBUSY2) >> EVSYS_CHSTATUS_CHBUSY2_Pos;
1669 }
1670 
hri_evsys_get_CHSTATUS_CHBUSY3_bit(const void * const hw)1671 static inline bool hri_evsys_get_CHSTATUS_CHBUSY3_bit(const void *const hw)
1672 {
1673 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_CHBUSY3) >> EVSYS_CHSTATUS_CHBUSY3_Pos;
1674 }
1675 
hri_evsys_get_CHSTATUS_CHBUSY4_bit(const void * const hw)1676 static inline bool hri_evsys_get_CHSTATUS_CHBUSY4_bit(const void *const hw)
1677 {
1678 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_CHBUSY4) >> EVSYS_CHSTATUS_CHBUSY4_Pos;
1679 }
1680 
hri_evsys_get_CHSTATUS_CHBUSY5_bit(const void * const hw)1681 static inline bool hri_evsys_get_CHSTATUS_CHBUSY5_bit(const void *const hw)
1682 {
1683 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_CHBUSY5) >> EVSYS_CHSTATUS_CHBUSY5_Pos;
1684 }
1685 
hri_evsys_get_CHSTATUS_CHBUSY6_bit(const void * const hw)1686 static inline bool hri_evsys_get_CHSTATUS_CHBUSY6_bit(const void *const hw)
1687 {
1688 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_CHBUSY6) >> EVSYS_CHSTATUS_CHBUSY6_Pos;
1689 }
1690 
hri_evsys_get_CHSTATUS_CHBUSY7_bit(const void * const hw)1691 static inline bool hri_evsys_get_CHSTATUS_CHBUSY7_bit(const void *const hw)
1692 {
1693 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_CHBUSY7) >> EVSYS_CHSTATUS_CHBUSY7_Pos;
1694 }
1695 
hri_evsys_get_CHSTATUS_CHBUSY8_bit(const void * const hw)1696 static inline bool hri_evsys_get_CHSTATUS_CHBUSY8_bit(const void *const hw)
1697 {
1698 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_CHBUSY8) >> EVSYS_CHSTATUS_CHBUSY8_Pos;
1699 }
1700 
hri_evsys_get_CHSTATUS_CHBUSY9_bit(const void * const hw)1701 static inline bool hri_evsys_get_CHSTATUS_CHBUSY9_bit(const void *const hw)
1702 {
1703 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_CHBUSY9) >> EVSYS_CHSTATUS_CHBUSY9_Pos;
1704 }
1705 
hri_evsys_get_CHSTATUS_CHBUSY10_bit(const void * const hw)1706 static inline bool hri_evsys_get_CHSTATUS_CHBUSY10_bit(const void *const hw)
1707 {
1708 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_CHBUSY10) >> EVSYS_CHSTATUS_CHBUSY10_Pos;
1709 }
1710 
hri_evsys_get_CHSTATUS_CHBUSY11_bit(const void * const hw)1711 static inline bool hri_evsys_get_CHSTATUS_CHBUSY11_bit(const void *const hw)
1712 {
1713 	return (((Evsys *)hw)->CHSTATUS.reg & EVSYS_CHSTATUS_CHBUSY11) >> EVSYS_CHSTATUS_CHBUSY11_Pos;
1714 }
1715 
hri_evsys_get_CHSTATUS_reg(const void * const hw,hri_evsys_chstatus_reg_t mask)1716 static inline hri_evsys_chstatus_reg_t hri_evsys_get_CHSTATUS_reg(const void *const hw, hri_evsys_chstatus_reg_t mask)
1717 {
1718 	uint32_t tmp;
1719 	tmp = ((Evsys *)hw)->CHSTATUS.reg;
1720 	tmp &= mask;
1721 	return tmp;
1722 }
1723 
hri_evsys_read_CHSTATUS_reg(const void * const hw)1724 static inline hri_evsys_chstatus_reg_t hri_evsys_read_CHSTATUS_reg(const void *const hw)
1725 {
1726 	return ((Evsys *)hw)->CHSTATUS.reg;
1727 }
1728 
1729 #ifdef __cplusplus
1730 }
1731 #endif
1732 
1733 #endif /* _HRI_EVSYS_L21_H_INCLUDED */
1734 #endif /* _SAML21_EVSYS_COMPONENT_ */
1735