gr533x_ll_dual_tim.h
Go to the documentation of this file.
1 /**
2 ****************************************************************************************
3 *
4 * @file gr533x_ll_dual_tim.h
5 * @author BLE Driver Team
6 * @brief Header file containing functions prototypes of DUAL TIMER LL library.
7 *
8 ****************************************************************************************
9 * @attention
10 #####Copyright (c) 2019 GOODIX
11 All rights reserved.
12
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions are met:
15 * Redistributions of source code must retain the above copyright
16 notice, this list of conditions and the following disclaimer.
17 * Redistributions in binary form must reproduce the above copyright
18 notice, this list of conditions and the following disclaimer in the
19 documentation and/or other materials provided with the distribution.
20 * Neither the name of GOODIX nor the names of its contributors may be used
21 to endorse or promote products derived from this software without
22 specific prior written permission.
23
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 POSSIBILITY OF SUCH DAMAGE.
35 ****************************************************************************************
36 */
37
38 /** @addtogroup PERIPHERAL Peripheral Driver
39 * @{
40 */
41
42 /** @addtogroup LL_DRIVER LL Driver
43 * @{
44 */
45
46 /** @defgroup LL_DUAL_TIMER DUAL_TIMER
47 * @brief DUAL TIM LL module driver.
48 * @{
49 */
50
51 /* Define to prevent recursive inclusion -------------------------------------*/
52 #ifndef __GR533X_LL_DUAL_TIMER_H__
53 #define __GR533X_LL_DUAL_TIMER_H__
54
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58
59 /* Includes ------------------------------------------------------------------*/
60 #include "gr533x.h"
61
62 #if defined (DUAL_TIMER0) || defined (DUAL_TIMER1)
63
64 /** @defgroup DUAL_TIMER_LL_STRUCTURES Structures
65 * @{
66 */
67
68 /* Exported types ------------------------------------------------------------*/
69 /** @defgroup DUAL_TIMER_LL_ES_INIT DUAL_TIM Exported init structures
70 * @{
71 */
72
73 /**
74 * @brief LL DUAL TIMER init Structure definition
75 */
76 typedef struct _ll_dual_timer_init
77 {
78 uint32_t prescaler; /**< Specifies the prescaler value used to divide the TIMER clock.
79 This parameter can be a value of @ref DUAL_TIMER_EC_LL_PRESCALER.
80
81 This feature can be modified afterwards using unitary function @ref ll_dual_timer_set_prescaler().*/
82
83 uint32_t counter_size; /**< Specifies the prescaler value used to divide the DUAL_TIMER clock.
84 This parameter can be a value of @ref DUAL_TIMER_EC_LL_COUNTERSIZE.
85
86 This feature can be modified afterwards using unitary function @ref ll_dual_timer_set_counter_size().*/
87
88 uint32_t counter_mode; /**< Specifies the counter mode.
89 This parameter can be a value of @ref DUAL_TIMER_LL_EC_COUNTERMODE.
90
91 This feature can be modified afterwards using unitary function @ref ll_dual_timer_set_counter_mode().*/
92
93 uint32_t auto_reload; /**< Specifies the auto reload value to be loaded into the active
94 Auto-Reload Register at the next update event.
95 This parameter must be a number between Min_Data=0x00000000 and Max_Data=0xFFFFFFFF.
96 Some timer instances may support 16 bits counters. In that case this parameter must be a number between 0x0000 and 0xFFFF.
97
98 This feature can be modified afterwards using unitary function @ref ll_dual_timer_set_auto_reload().*/
99 } ll_dual_timer_init_t;
100
101 /** @} */
102
103 /** @} */
104
105 /**
106 * @defgroup DUAL_TIMER_LL_MACRO Defines
107 * @{
108 */
109
110 /* Exported constants --------------------------------------------------------*/
111 /** @defgroup DUAL_TIMER_LL_Exported_Constants DUAL_TIM Exported Constants
112 * @{
113 */
114
115 /** @defgroup DUAL_TIMER_LL_EC_COUNTERMODE DUAL_TIM counter mode
116 * @{
117 */
118 #define LL_DUAL_TIMER_FREERUNNING_MODE 0x00000000U /**< Free running mode */
119 #define LL_DUAL_TIMER_PERIODIC_MODE DUAL_TIMER_CTRL_MODE /**< Periodic mode */
120 /** @} */
121
122 /** @defgroup DUAL_TIMER_EC_LL_PRESCALER DUAL_TIM prescaler
123 * @{
124 */
125 #define LL_DUAL_TIMER_PRESCALER_DIV0 0x00000000U /**< 0 stage of prescale, clock is divided by 1. */
126 #define LL_DUAL_TIMER_PRESCALER_DIV16 (1UL << DUAL_TIMER_CTRL_PRE_Pos) /**< 4 stages of prescale, clock is divided by 16. */
127 #define LL_DUAL_TIMER_PRESCALER_DIV256 (2UL << DUAL_TIMER_CTRL_PRE_Pos) /**< 8 stages of prescale, clock is divided by 256. */
128 /** @} */
129
130 /** @defgroup DUAL_TIMER_EC_LL_COUNTERSIZE DUAL_TIM counter size
131 * @{
132 */
133 #define LL_DUAL_TIMER_COUNTERSIZE_16 0x00000000U /**< Counter size 16 bits */
134 #define LL_DUAL_TIMER_COUNTERSIZE_32 DUAL_TIMER_CTRL_SIZE /**< Counter size 32 bits */
135 /** @} */
136
137 /** @defgroup DUAL_TIMER_EC_LL_IO_ACTION DUAL_TIM io action
138 * @{
139 */
140 #define LL_DUAL_TIMER_IO_ACTION_NONE 0x00000000U /**< Do noting */
141 #define LL_DUAL_TIMER_IO_ACTION_SET 0x00000001U /**< io set */
142 #define LL_DUAL_TIMER_IO_ACTION_RESET 0x00000002U /**< io reset */
143 #define LL_DUAL_TIMER_IO_ACTION_TOGGLE 0x00000003U /**< io toggle */
144 /** @} */
145
146 /** @defgroup DUAL_TIMER_EC_LL_IO_INIT DUAL_TIM io init
147 * @{
148 */
149 #define LL_DUAL_TIMER_IO_INIT_RESET 0x00000000U /**< io init reset */
150 #define LL_DUAL_TIMER_IO_INIT_SET 0x00000001U /**< io init set */
151 /** @} */
152
153 /** @defgroup DUAL_TIMER_EC_LL_INTSTAT DUAL_TIM Interrupt source identify
154 * @{
155 */
156 #define LL_DUAL_TIMER_INTSTAT_COUNTDONE DUAL_TIMER_ISR_TI /**< COUNTDONE flag */
157 #define LL_DUAL_TIMER_INTSTAT_ACT_START DUAL_TIMER_INT_ACT_START /**< Action Start flag */
158 #define LL_DUAL_TIMER_INTSTAT_IOA_ACT_C1 DUAL_TIMER_INT_IOA_ACT_C1 /**< IOA Action Count 1 flag */
159 #define LL_DUAL_TIMER_INTSTAT_IOA_ACT_C2 DUAL_TIMER_INT_IOA_ACT_C2 /**< IOA Action Count 2 flag */
160 #define LL_DUAL_TIMER_INTSTAT_ACT_PERIOD DUAL_TIMER_INT_ACT_PERIOD /**< Action Period flag */
161 #define LL_DUAL_TIMER_INTSTAT_ACT_STOP DUAL_TIMER_INT_ACT_STOP /**< Action Stop flag */
162 #define LL_DUAL_TIMER_INTSTAT_IOB_ACT_C1 DUAL_TIMER_INT_IOB_ACT_C1 /**< IOB Action Count 1 flag */
163 #define LL_DUAL_TIMER_INTSTAT_IOB_ACT_C2 DUAL_TIMER_INT_IOB_ACT_C2 /**< IOB Action Count 2 flag */
164 #define LL_DUAL_TIMER_INTSTAT_IOC_ACT_C1 DUAL_TIMER_INT_IOC_ACT_C1 /**< IOC Action Count 1 flag */
165 #define LL_DUAL_TIMER_INTSTAT_IOC_ACT_C2 DUAL_TIMER_INT_IOC_ACT_C2 /**< IOC Action Count 2 flag */
166 #define LL_DUAL_TIMER_INTSTAT_BLEPULSE1 DUAL_TIMER_INT_BLEPULSE1 /**< BLE Pulse Count 1 flag */
167 #define LL_DUAL_TIMER_INTSTAT_BLEPULSE2 DUAL_TIMER_INT_BLEPULSE2 /**< BLE Pulse Count 2 flag */
168 /** @} */
169
170 /** @defgroup DUAL_TIMER_LL_EC_DEFAULT_CONFIG InitStrcut default configuartion
171 * @{
172 */
173
174 /**
175 * @brief LL DUAL_TIMER InitStrcut default configuartion
176 */
177 #define DUAL_TIMER_DEFAULT_CONFIG \
178 { \
179 .prescaler = LL_DUAL_TIMER_PRESCALER_DIV0, \
180 .counter_size = LL_DUAL_TIMER_COUNTERSIZE_32, \
181 .counter_mode = LL_DUAL_TIMER_PERIODIC_MODE, \
182 .auto_reload = SystemCoreClock - 1, \
183 }
184 /** @} */
185
186 /** @} */
187
188 /* Exported macro ------------------------------------------------------------*/
189 /** @defgroup DUAL_TIMER_LL_Exported_Macros DUAL_TIM Exported Macros
190 * @{
191 */
192
193 /** @defgroup DUAL_TIMER_LL_EM_WRITE_READ Common Write and read registers Macros
194 * @{
195 */
196
197 /**
198 * @brief Write a value in DUAL_TIMER register
199 * @param __instance__ DUAL_TIMER instance
200 * @param __REG__ Register to be written
201 * @param __VALUE__ Value to be written in the register
202 * @retval None
203 */
204 #define LL_DUAL_TIMER_WriteReg(__instance__, __REG__, __VALUE__) WRITE_REG(__instance__->__REG__, (__VALUE__))
205
206 /**
207 * @brief Read a value in DUAL_TIMER register
208 * @param __instance__ DUAL_TIMER instance
209 * @param __REG__ Register to be read
210 * @retval Register value
211 */
212 #define LL_DUAL_TIMER_ReadReg(__instance__, __REG__) READ_REG(__instance__->__REG__)
213
214 /** @} */
215
216 /** @} */
217
218 /** @} */
219
220 /* Exported functions --------------------------------------------------------*/
221 /** @defgroup DUAL_TIMER_LL_DRIVER_FUNCTIONS Functions
222 * @{
223 */
224
225 /** @defgroup DUAL_TIMER_LL_EF_Configuration Configuration functions
226 * @{
227 */
228
229
230 /**
231 * @brief Enable dual_timer counter.
232 *
233 * Register|BitsName
234 * --------|--------
235 * CTRL | EN
236 *
237 * @param DUAL_TIMERx Timer instance
238 * @retval None
239 */
240 __STATIC_INLINE void ll_dual_timer_enable_counter(dual_timer_regs_t *DUAL_TIMERx)
241 {
242 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_EN);
243 }
244
245 /**
246 * @brief Disable dual_timer counter.
247 *
248 * Register|BitsName
249 * --------|--------
250 * CTRL | EN
251 *
252 * @param DUAL_TIMERx Timer instance
253 * @retval None
254 */
255 __STATIC_INLINE void ll_dual_timer_disable_counter(dual_timer_regs_t *DUAL_TIMERx)
256 {
257 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_EN);
258 }
259
260 /**
261 * @brief Indicate whether the dual_timer counter is enabled.
262 *
263 * Register|BitsName
264 * --------|--------
265 * CTRL | EN
266 *
267 * @param DUAL_TIMERx Timer instance
268 * @retval State of bit (1 or 0).
269 */
270 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_counter(dual_timer_regs_t *DUAL_TIMERx)
271 {
272 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_EN) == (DUAL_TIMER_CTRL_EN));
273 }
274
275 /**
276 * @brief Set the counter mode.
277 *
278 * Register|BitsName
279 * --------|--------
280 * CTRL | MODE
281 *
282 * @param DUAL_TIMERx Timer instance
283 * @param counter_mode This parameter can be one of the following values:
284 * @arg @ref LL_DUAL_TIMER_FREERUNNING_MODE
285 * @arg @ref LL_DUAL_TIMER_PERIODIC_MODE
286 * @retval None
287 */
288 __STATIC_INLINE void ll_dual_timer_set_counter_mode(dual_timer_regs_t *DUAL_TIMERx, uint32_t counter_mode)
289 {
290 MODIFY_REG(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_MODE, counter_mode);
291 }
292
293 /**
294 * @brief Get the counter mode.
295 *
296 * Register|BitsName
297 * --------|--------
298 * CTRL | MODE
299 *
300 * @param DUAL_TIMERx Timer instance
301 * @retval Return value can be one of the following values:
302 * @arg @ref LL_DUAL_TIMER_FREERUNNING_MODE
303 * @arg @ref LL_DUAL_TIMER_PERIODIC_MODE
304 */
305 __STATIC_INLINE uint32_t ll_dual_timer_get_counter_mode(dual_timer_regs_t *DUAL_TIMERx)
306 {
307 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_MODE));
308 }
309
310 /**
311 * @brief Set the prescaler.
312 *
313 * Register|BitsName
314 * --------|--------
315 * CTRL | PRE
316 *
317 * @param DUAL_TIMERx Timer instance
318 * @param prescaler This parameter can be one of the following values:
319 * @arg @ref LL_DUAL_TIMER_PRESCALER_DIV0
320 * @arg @ref LL_DUAL_TIMER_PRESCALER_DIV16
321 * @arg @ref LL_DUAL_TIMER_PRESCALER_DIV256
322 * @retval None
323 */
324 __STATIC_INLINE void ll_dual_timer_set_prescaler(dual_timer_regs_t *DUAL_TIMERx, uint32_t prescaler)
325 {
326 MODIFY_REG(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_PRE, prescaler);
327 }
328
329 /**
330 * @brief Get the prescaler.
331 *
332 * Register|BitsName
333 * --------|--------
334 * CTRL | PRE
335 *
336 * @param DUAL_TIMERx Timer instance
337 * @retval Return value can be one of the following values:
338 * @arg @ref LL_DUAL_TIMER_PRESCALER_DIV0
339 * @arg @ref LL_DUAL_TIMER_PRESCALER_DIV16
340 * @arg @ref LL_DUAL_TIMER_PRESCALER_DIV256
341 */
342 __STATIC_INLINE uint32_t ll_dual_timer_get_prescaler(dual_timer_regs_t *DUAL_TIMERx)
343 {
344 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_PRE));
345 }
346
347 /**
348 * @brief Set the counter size.
349 *
350 * Register|BitsName
351 * --------|--------
352 * CTRL | SIZE
353 *
354 * @param DUAL_TIMERx Timer instance
355 * @param counter_size This parameter can be one of the following values:
356 * @arg @ref LL_DUAL_TIMER_COUNTERSIZE_16
357 * @arg @ref LL_DUAL_TIMER_COUNTERSIZE_32
358 * @retval None
359 */
360 __STATIC_INLINE void ll_dual_timer_set_counter_size(dual_timer_regs_t *DUAL_TIMERx, uint32_t counter_size)
361 {
362 MODIFY_REG(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_SIZE, counter_size);
363 }
364
365 /**
366 * @brief Get the counter size.
367 *
368 * Register|BitsName
369 * --------|--------
370 * CTRL | SIZE
371 *
372 * @param DUAL_TIMERx Timer instance
373 * @retval Return value can be one of the following values:
374 * @arg @ref LL_DUAL_TIMER_COUNTERSIZE_16
375 * @arg @ref LL_DUAL_TIMER_COUNTERSIZE_32
376 */
377 __STATIC_INLINE uint32_t ll_dual_timer_get_counter_size(dual_timer_regs_t *DUAL_TIMERx)
378 {
379 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_SIZE));
380 }
381
382 /**
383 * @brief Enable one-shot mode.
384 *
385 * Register|BitsName
386 * --------|--------
387 * CTRL | ONESHOT
388 *
389 * @param DUAL_TIMERx Timer instance
390 * @retval None
391 */
392 __STATIC_INLINE void ll_dual_timer_enable_oneshot(dual_timer_regs_t *DUAL_TIMERx)
393 {
394 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_ONESHOT);
395 }
396
397 /**
398 * @brief Disable one-shot mode.
399 *
400 * Register|BitsName
401 * --------|--------
402 * CTRL | ONESHOT
403 *
404 * @param DUAL_TIMERx Timer instance
405 * @retval None
406 */
407 __STATIC_INLINE void ll_dual_timer_disable_oneshot(dual_timer_regs_t *DUAL_TIMERx)
408 {
409 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_ONESHOT);
410 }
411
412 /**
413 * @brief Indicate whether the one-shot mode is enabled.
414 *
415 * Register|BitsName
416 * --------|--------
417 * CTRL | ONESHOT
418 *
419 * @param DUAL_TIMERx Timer instance
420 * @retval State of bit (1 or 0).
421 */
422 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_oneshot(dual_timer_regs_t *DUAL_TIMERx)
423 {
424 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_ONESHOT) == (DUAL_TIMER_CTRL_ONESHOT));
425 }
426
427 /**
428 * @brief Get the counter value.
429 *
430 * Register|BitsName
431 * --------|--------
432 * VALUE | VALUE
433 *
434 * @param DUAL_TIMERx Timer instance
435 * @retval Counter value (between Min_Data=0 and Max_Data=0xFFFFFFFF)
436 */
437 __STATIC_INLINE uint32_t ll_dual_timer_get_counter(dual_timer_regs_t *DUAL_TIMERx)
438 {
439 return (uint32_t)(READ_REG(DUAL_TIMERx->VALUE));
440 }
441
442 /**
443 * @brief Set the auto-reload value.
444 * @note The counter is blocked while the auto-reload value is null.
445 *
446 * Register|BitsName
447 * --------|--------
448 * RELOAD | RELOAD
449 *
450 * @param DUAL_TIMERx Timer instance
451 * @param auto_reload between Min_Data=0 and Max_Data=0xFFFFFFFF
452 * @retval None
453 */
454 __STATIC_INLINE void ll_dual_timer_set_auto_reload(dual_timer_regs_t *DUAL_TIMERx, uint32_t auto_reload)
455 {
456 WRITE_REG(DUAL_TIMERx->RELOAD, auto_reload);
457 }
458
459 /**
460 * @brief Get the auto-reload value.
461 *
462 * Register|BitsName
463 * --------|--------
464 * RELOAD | RELOAD
465 *
466 * @param DUAL_TIMERx Timer instance
467 * @retval Auto-reload value
468 */
469 __STATIC_INLINE uint32_t ll_dual_timer_get_auto_reload(dual_timer_regs_t *DUAL_TIMERx)
470 {
471 return (uint32_t)(READ_REG(DUAL_TIMERx->RELOAD));
472 }
473
474 /**
475 * @brief Set the backgroud-reload value.
476 *
477 * Register|BitsName
478 * --------|--------
479 * BG_LOAD | BG_LOAD
480 *
481 * @param DUAL_TIMERx Timer instance
482 * @param background_reload between Min_Data=0 and Max_Data=0xFFFFFFFF
483 * @retval None
484 */
485 __STATIC_INLINE void ll_dual_timer_set_background_reload(dual_timer_regs_t *DUAL_TIMERx, uint32_t background_reload)
486 {
487 WRITE_REG(DUAL_TIMERx->BG_LOAD, background_reload);
488 }
489
490 /**
491 * @brief Get the backgroud-reload value.
492 *
493 * Register|BitsName
494 * --------|--------
495 * BG_LOAD | BG_LOAD
496 *
497 * @param DUAL_TIMERx Timer instance
498 * @retval Return value between Min_Data=0 and Max_Data=0xFFFFFFFF
499 */
500 __STATIC_INLINE uint32_t ll_dual_timer_get_background_reload(dual_timer_regs_t *DUAL_TIMERx)
501 {
502 return (uint32_t)(READ_REG(DUAL_TIMERx->BG_LOAD));
503 }
504
505 /**
506 * @brief Enable dual_timer IOA ctrl.
507 *
508 * Register|BitsName
509 * --------|--------
510 * CTRL | IOA
511 *
512 * @param DUAL_TIMERx Timer instance
513 * @retval None
514 */
515 __STATIC_INLINE void ll_dual_timer_enable_ioa_ctrl(dual_timer_regs_t *DUAL_TIMERx)
516 {
517 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOA);
518 }
519
520 /**
521 * @brief Disable dual_timer IOA ctrl.
522 *
523 * Register|BitsName
524 * --------|--------
525 * CTRL | IOA
526 *
527 * @param DUAL_TIMERx Timer instance
528 * @retval None
529 */
530 __STATIC_INLINE void ll_dual_timer_disable_ioa_ctrl(dual_timer_regs_t *DUAL_TIMERx)
531 {
532 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOA);
533 }
534
535 /**
536 * @brief Indicate whether the dual_timer IOA ctrl is enabled.
537 *
538 * Register|BitsName
539 * --------|--------
540 * CTRL | IOA
541 *
542 * @param DUAL_TIMERx Timer instance
543 * @retval State of bit (1 or 0).
544 */
545 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ioa_ctrl(dual_timer_regs_t *DUAL_TIMERx)
546 {
547 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOA) == (DUAL_TIMER_CTRL_IOA));
548 }
549
550 /**
551 * @brief Enable dual_timer IOB ctrl.
552 *
553 * Register|BitsName
554 * --------|--------
555 * CTRL | IOB
556 *
557 * @param DUAL_TIMERx Timer instance
558 * @retval None
559 */
560 __STATIC_INLINE void ll_dual_timer_enable_iob_ctrl(dual_timer_regs_t *DUAL_TIMERx)
561 {
562 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOB);
563 }
564
565 /**
566 * @brief Disable dual_timer IOB ctrl.
567 *
568 * Register|BitsName
569 * --------|--------
570 * CTRL | IOB
571 *
572 * @param DUAL_TIMERx Timer instance
573 * @retval None
574 */
575 __STATIC_INLINE void ll_dual_timer_disable_iob_ctrl(dual_timer_regs_t *DUAL_TIMERx)
576 {
577 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOB);
578 }
579
580 /**
581 * @brief Indicate whether the dual_timer IOB ctrl is enabled.
582 *
583 * Register|BitsName
584 * --------|--------
585 * CTRL | IOB
586 *
587 * @param DUAL_TIMERx Timer instance
588 * @retval State of bit (1 or 0).
589 */
590 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_iob_ctrl(dual_timer_regs_t *DUAL_TIMERx)
591 {
592 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOB) == (DUAL_TIMER_CTRL_IOB));
593 }
594
595 /**
596 * @brief Enable dual_timer IOC ctrl.
597 *
598 * Register|BitsName
599 * --------|--------
600 * CTRL | IOC
601 *
602 * @param DUAL_TIMERx Timer instance
603 * @retval None
604 */
605 __STATIC_INLINE void ll_dual_timer_enable_ioc_ctrl(dual_timer_regs_t *DUAL_TIMERx)
606 {
607 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOC);
608 }
609
610 /**
611 * @brief Disable dual_timer IOC ctrl.
612 *
613 * Register|BitsName
614 * --------|--------
615 * CTRL | IOC
616 *
617 * @param DUAL_TIMERx Timer instance
618 * @retval None
619 */
620 __STATIC_INLINE void ll_dual_timer_disable_ioc_ctrl(dual_timer_regs_t *DUAL_TIMERx)
621 {
622 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOC);
623 }
624
625 /**
626 * @brief Indicate whether the dual_timer IOC ctrl is enabled.
627 *
628 * Register|BitsName
629 * --------|--------
630 * CTRL | IOC
631 *
632 * @param DUAL_TIMERx Timer instance
633 * @retval State of bit (1 or 0).
634 */
635 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ioc_ctrl(dual_timer_regs_t *DUAL_TIMERx)
636 {
637 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOC) == (DUAL_TIMER_CTRL_IOC));
638 }
639
640 /**
641 * @brief Enable dual_timer BLE ctrl.
642 *
643 * Register|BitsName
644 * --------|--------
645 * CTRL | BLE
646 *
647 * @param DUAL_TIMERx Timer instance
648 * @retval None
649 */
650 __STATIC_INLINE void ll_dual_timer_enable_ble_ctrl(dual_timer_regs_t *DUAL_TIMERx)
651 {
652 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_BLE);
653 }
654
655 /**
656 * @brief Disable dual_timer BLE ctrl.
657 *
658 * Register|BitsName
659 * --------|--------
660 * CTRL | BLE
661 *
662 * @param DUAL_TIMERx Timer instance
663 * @retval None
664 */
665 __STATIC_INLINE void ll_dual_timer_disable_ble_ctrl(dual_timer_regs_t *DUAL_TIMERx)
666 {
667 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_BLE);
668 }
669
670 /**
671 * @brief Indicate whether the dual_timer BLE ctrl is enabled.
672 *
673 * Register|BitsName
674 * --------|--------
675 * CTRL | BLE
676 *
677 * @param DUAL_TIMERx Timer instance
678 * @retval State of bit (1 or 0).
679 */
680 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ble_ctrl(dual_timer_regs_t *DUAL_TIMERx)
681 {
682 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_BLE) == (DUAL_TIMER_CTRL_BLE));
683 }
684
685 /**
686 * @brief Set the ioa count 1 value.
687 *
688 * Register|BitsName
689 * --------|--------
690 * COUNT_A1IO | COUNT_A1IO
691 *
692 * @param DUAL_TIMERx Timer instance
693 * @param count_value count 1 value between Min_Data=0 and Max_Data=0xFFFFFFFF
694 * @retval None
695 */
696 __STATIC_INLINE void ll_dual_timer_set_ioa_count1(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
697 {
698 WRITE_REG(DUAL_TIMERx->COUNT_A1IO, count_value);
699 }
700
701 /**
702 * @brief Get the ioa count 1 value.
703 *
704 * Register|BitsName
705 * --------|--------
706 * COUNT_A1IO | COUNT_A1IO
707 *
708 * @param DUAL_TIMERx Timer instance
709 * @retval Return value between Min_Data=0 and Max_Data=0xFFFFFFFF
710 */
711 __STATIC_INLINE uint32_t ll_dual_timer_get_ioa_count1(dual_timer_regs_t *DUAL_TIMERx)
712 {
713 return (uint32_t)(READ_REG(DUAL_TIMERx->COUNT_A1IO));
714 }
715
716 /**
717 * @brief Set the ioa count 2 value.
718 *
719 * Register|BitsName
720 * --------|--------
721 * COUNT_A2IO | COUNT_A2IO
722 *
723 * @param DUAL_TIMERx Timer instance
724 * @param count_value count 2 value between Min_Data=0 and Max_Data=0xFFFFFFFF
725 * @retval None
726 */
727 __STATIC_INLINE void ll_dual_timer_set_ioa_count2(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
728 {
729 WRITE_REG(DUAL_TIMERx->COUNT_A2IO, count_value);
730 }
731
732 /**
733 * @brief Get the ioa count 2 value.
734 *
735 * Register|BitsName
736 * --------|--------
737 * COUNT_A2IO | COUNT_A2IO
738 *
739 * @param DUAL_TIMERx Timer instance
740 * @retval Return value between Min_Data=0 and Max_Data=0xFFFFFFFF
741 */
742 __STATIC_INLINE uint32_t ll_dual_timer_get_ioa_count2(dual_timer_regs_t *DUAL_TIMERx)
743 {
744 return (uint32_t)(READ_REG(DUAL_TIMERx->COUNT_A2IO));
745 }
746
747 /**
748 * @brief Set the iob count 1 value.
749 *
750 * Register|BitsName
751 * --------|--------
752 * COUNT_B1IO | COUNT_B1IO
753 *
754 * @param DUAL_TIMERx Timer instance
755 * @param count_value count 1 value between Min_Data=0 and Max_Data=0xFFFFFFFF
756 * @retval None
757 */
758 __STATIC_INLINE void ll_dual_timer_set_iob_count1(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
759 {
760 WRITE_REG(DUAL_TIMERx->COUNT_B1IO, count_value);
761 }
762
763 /**
764 * @brief Get the iob count 1 value.
765 *
766 * Register|BitsName
767 * --------|--------
768 * COUNT_B1IO | COUNT_B1IO
769 *
770 * @param DUAL_TIMERx Timer instance
771 * @retval Return value between Min_Data=0 and Max_Data=0xFFFFFFFF
772 */
773 __STATIC_INLINE uint32_t ll_dual_timer_get_iob_count1(dual_timer_regs_t *DUAL_TIMERx)
774 {
775 return (uint32_t)(READ_REG(DUAL_TIMERx->COUNT_B1IO));
776 }
777
778 /**
779 * @brief Set the iob count 2 value.
780 *
781 * Register|BitsName
782 * --------|--------
783 * COUNT_B2IO | COUNT_B2IO
784 *
785 * @param DUAL_TIMERx Timer instance
786 * @param count_value count 2 value between Min_Data=0 and Max_Data=0xFFFFFFFF
787 * @retval None
788 */
789 __STATIC_INLINE void ll_dual_timer_set_iob_count2(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
790 {
791 WRITE_REG(DUAL_TIMERx->COUNT_B2IO, count_value);
792 }
793
794 /**
795 * @brief Get the iob count 2 value.
796 *
797 * Register|BitsName
798 * --------|--------
799 * COUNT_B2IO | COUNT_B2IO
800 *
801 * @param DUAL_TIMERx Timer instance
802 * @retval Return value between Min_Data=0 and Max_Data=0xFFFFFFFF
803 */
804 __STATIC_INLINE uint32_t ll_dual_timer_get_iob_count2(dual_timer_regs_t *DUAL_TIMERx)
805 {
806 return (uint32_t)(READ_REG(DUAL_TIMERx->COUNT_B2IO));
807 }
808
809 /**
810 * @brief Set the ioc count 1 value.
811 *
812 * Register|BitsName
813 * --------|--------
814 * COUNT_C1IO | COUNT_C1IO
815 *
816 * @param DUAL_TIMERx Timer instance
817 * @param count_value count 1 value between Min_Data=0 and Max_Data=0xFFFFFFFF
818 * @retval None
819 */
820 __STATIC_INLINE void ll_dual_timer_set_ioc_count1(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
821 {
822 WRITE_REG(DUAL_TIMERx->COUNT_C1IO, count_value);
823 }
824
825 /**
826 * @brief Get the ioc count 1 value.
827 *
828 * Register|BitsName
829 * --------|--------
830 * COUNT_C1IO | COUNT_C1IO
831 *
832 * @param DUAL_TIMERx Timer instance
833 * @retval Return value between Min_Data=0 and Max_Data=0xFFFFFFFF
834 */
835 __STATIC_INLINE uint32_t ll_dual_timer_get_ioc_count1(dual_timer_regs_t *DUAL_TIMERx)
836 {
837 return (uint32_t)(READ_REG(DUAL_TIMERx->COUNT_C1IO));
838 }
839
840 /**
841 * @brief Set the ioc count 2 value.
842 *
843 * Register|BitsName
844 * --------|--------
845 * COUNT_C2IO | COUNT_C2IO
846 *
847 * @param DUAL_TIMERx Timer instance
848 * @param count_value count 2 value between Min_Data=0 and Max_Data=0xFFFFFFFF
849 * @retval None
850 */
851 __STATIC_INLINE void ll_dual_timer_set_ioc_count2(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
852 {
853 WRITE_REG(DUAL_TIMERx->COUNT_C2IO, count_value);
854 }
855
856 /**
857 * @brief Get the ioc count 2 value.
858 *
859 * Register|BitsName
860 * --------|--------
861 * COUNT_C2IO | COUNT_C2IO
862 *
863 * @param DUAL_TIMERx Timer instance
864 * @retval Return value between Min_Data=0 and Max_Data=0xFFFFFFFF
865 */
866 __STATIC_INLINE uint32_t ll_dual_timer_get_ioc_count2(dual_timer_regs_t *DUAL_TIMERx)
867 {
868 return (uint32_t)(READ_REG(DUAL_TIMERx->COUNT_C2IO));
869 }
870
871 /**
872 * @brief Set ioa action when timer start.
873 *
874 * Register|BitsName
875 * --------|--------
876 * IO_ACT_CTRL | IOA_ACT_CTRL_START
877 *
878 * @param DUAL_TIMERx Timer instance
879 * @param action This parameter can be one of the following values:
880 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
881 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
882 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
883 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
884 * @retval None
885 */
886 __STATIC_INLINE void ll_dual_timer_set_ioa_action_start(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
887 {
888 MODIFY_REG(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOA_ACT_CTRL_START, (action << DUAL_TIMER_IOA_ACT_CTRL_START_Pos));
889 }
890
891 /**
892 * @brief Get ioa action when timer start.
893 *
894 * Register|BitsName
895 * --------|--------
896 * IO_ACT_CTRL | IOA_ACT_CTRL_START
897 *
898 * @param DUAL_TIMERx Timer instance
899 * @retval Return value can be one of the following values:
900 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
901 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
902 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
903 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
904 */
905 __STATIC_INLINE uint32_t ll_dual_timer_get_ioa_action_start(dual_timer_regs_t *DUAL_TIMERx)
906 {
907 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOA_ACT_CTRL_START) >> DUAL_TIMER_IOA_ACT_CTRL_START_Pos));
908 }
909
910 /**
911 * @brief Set ioa action when value meets to COUNT_A1IO.
912 *
913 * Register|BitsName
914 * --------|--------
915 * IO_ACT_CTRL | IOA_ACT_CTRL_C1
916 *
917 * @param DUAL_TIMERx Timer instance
918 * @param action This parameter can be one of the following values:
919 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
920 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
921 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
922 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
923 * @retval None
924 */
925 __STATIC_INLINE void ll_dual_timer_set_ioa_action_count1(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
926 {
927 MODIFY_REG(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOA_ACT_CTRL_C1, (action << DUAL_TIMER_IOA_ACT_CTRL_C1_Pos));
928 }
929
930 /**
931 * @brief Get ioa action when value meets to COUNT_A1IO.
932 *
933 * Register|BitsName
934 * --------|--------
935 * IO_ACT_CTRL | IOA_ACT_CTRL_C1
936 *
937 * @param DUAL_TIMERx Timer instance
938 * @retval Return value can be one of the following values:
939 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
940 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
941 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
942 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
943 */
944 __STATIC_INLINE uint32_t ll_dual_timer_get_ioa_action_count1(dual_timer_regs_t *DUAL_TIMERx)
945 {
946 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOA_ACT_CTRL_C1) >> DUAL_TIMER_IOA_ACT_CTRL_C1_Pos));
947 }
948
949 /**
950 * @brief Set ioa action when value meets to COUNT_A2IO.
951 *
952 * Register|BitsName
953 * --------|--------
954 * IO_ACT_CTRL | IOA_ACT_CTRL_C2
955 *
956 * @param DUAL_TIMERx Timer instance
957 * @param action This parameter can be one of the following values:
958 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
959 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
960 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
961 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
962 * @retval None
963 */
964 __STATIC_INLINE void ll_dual_timer_set_ioa_action_count2(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
965 {
966 MODIFY_REG(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOA_ACT_CTRL_C2, (action << DUAL_TIMER_IOA_ACT_CTRL_C2_Pos));
967 }
968
969 /**
970 * @brief Get ioa action when value meets to COUNT_A2IO.
971 *
972 * Register|BitsName
973 * --------|--------
974 * IO_ACT_CTRL | IOA_ACT_CTRL_C2
975 *
976 * @param DUAL_TIMERx Timer instance
977 * @retval Return value can be one of the following values:
978 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
979 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
980 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
981 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
982 */
983 __STATIC_INLINE uint32_t ll_dual_timer_get_ioa_action_count2(dual_timer_regs_t *DUAL_TIMERx)
984 {
985 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOA_ACT_CTRL_C2) >> DUAL_TIMER_IOA_ACT_CTRL_C2_Pos));
986 }
987
988 /**
989 * @brief Set ioa action when value downs to 0.
990 *
991 * Register|BitsName
992 * --------|--------
993 * IO_ACT_CTRL | IOA_ACT_CTRL_PERIOD
994 *
995 * @param DUAL_TIMERx Timer instance
996 * @param action This parameter can be one of the following values:
997 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
998 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
999 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1000 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1001 * @retval None
1002 */
1003 __STATIC_INLINE void ll_dual_timer_set_ioa_action_period(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
1004 {
1005 MODIFY_REG(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOA_ACT_CTRL_PERIOD, (action << DUAL_TIMER_IOA_ACT_CTRL_PERIOD_Pos));
1006 }
1007
1008 /**
1009 * @brief Get ioa action when value downs to 0.
1010 *
1011 * Register|BitsName
1012 * --------|--------
1013 * IO_ACT_CTRL | IOA_ACT_CTRL_PERIOD
1014 *
1015 * @param DUAL_TIMERx Timer instance
1016 * @retval Return value can be one of the following values:
1017 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1018 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1019 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1020 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1021 */
1022 __STATIC_INLINE uint32_t ll_dual_timer_get_ioa_action_period(dual_timer_regs_t *DUAL_TIMERx)
1023 {
1024 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOA_ACT_CTRL_PERIOD) >> DUAL_TIMER_IOA_ACT_CTRL_PERIOD_Pos));
1025 }
1026
1027 /**
1028 * @brief Set ioa action when timer stop.
1029 *
1030 * Register|BitsName
1031 * --------|--------
1032 * IO_ACT_CTRL | IOA_ACT_CTRL_STOP
1033 *
1034 * @param DUAL_TIMERx Timer instance
1035 * @param action This parameter can be one of the following values:
1036 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1037 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1038 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1039 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1040 * @retval None
1041 */
1042 __STATIC_INLINE void ll_dual_timer_set_ioa_action_stop(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
1043 {
1044 MODIFY_REG(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOA_ACT_CTRL_STOP, (action << DUAL_TIMER_IOA_ACT_CTRL_STOP_Pos));
1045 }
1046
1047 /**
1048 * @brief Get ioa action when timer stop.
1049 *
1050 * Register|BitsName
1051 * --------|--------
1052 * IO_ACT_CTRL | IOA_ACT_CTRL_STOP
1053 *
1054 * @param DUAL_TIMERx Timer instance
1055 * @retval Return value can be one of the following values:
1056 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1057 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1058 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1059 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1060 */
1061 __STATIC_INLINE uint32_t ll_dual_timer_get_ioa_action_stop(dual_timer_regs_t *DUAL_TIMERx)
1062 {
1063 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOA_ACT_CTRL_STOP) >> DUAL_TIMER_IOA_ACT_CTRL_STOP_Pos));
1064 }
1065
1066 /**
1067 * @brief Set iob action when timer start.
1068 *
1069 * Register|BitsName
1070 * --------|--------
1071 * IO_ACT_CTRL | IOB_ACT_CTRL_START
1072 *
1073 * @param DUAL_TIMERx Timer instance
1074 * @param action This parameter can be one of the following values:
1075 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1076 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1077 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1078 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1079 * @retval None
1080 */
1081 __STATIC_INLINE void ll_dual_timer_set_iob_action_start(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
1082 {
1083 MODIFY_REG(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOB_ACT_CTRL_START, (action << DUAL_TIMER_IOB_ACT_CTRL_START_Pos));
1084 }
1085
1086 /**
1087 * @brief Get iob action when timer start.
1088 *
1089 * Register|BitsName
1090 * --------|--------
1091 * IO_ACT_CTRL | IOB_ACT_CTRL_START
1092 *
1093 * @param DUAL_TIMERx Timer instance
1094 * @retval Return value can be one of the following values:
1095 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1096 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1097 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1098 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1099 */
1100 __STATIC_INLINE uint32_t ll_dual_timer_get_iob_action_start(dual_timer_regs_t *DUAL_TIMERx)
1101 {
1102 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOB_ACT_CTRL_START) >> DUAL_TIMER_IOB_ACT_CTRL_START_Pos));
1103 }
1104
1105 /**
1106 * @brief Set iob action when value meets to COUNT_B1IO.
1107 *
1108 * Register|BitsName
1109 * --------|--------
1110 * IO_ACT_CTRL | IOB_ACT_CTRL_C1
1111 *
1112 * @param DUAL_TIMERx Timer instance
1113 * @param action This parameter can be one of the following values:
1114 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1115 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1116 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1117 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1118 * @retval None
1119 */
1120 __STATIC_INLINE void ll_dual_timer_set_iob_action_count1(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
1121 {
1122 MODIFY_REG(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOB_ACT_CTRL_C1, (action << DUAL_TIMER_IOB_ACT_CTRL_C1_Pos));
1123 }
1124
1125 /**
1126 * @brief Get iob action when value meets to COUNT_B1IO.
1127 *
1128 * Register|BitsName
1129 * --------|--------
1130 * IO_ACT_CTRL | IOB_ACT_CTRL_C1
1131 *
1132 * @param DUAL_TIMERx Timer instance
1133 * @retval Return value can be one of the following values:
1134 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1135 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1136 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1137 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1138 */
1139 __STATIC_INLINE uint32_t ll_dual_timer_get_iob_action_count1(dual_timer_regs_t *DUAL_TIMERx)
1140 {
1141 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOB_ACT_CTRL_C1) >> DUAL_TIMER_IOB_ACT_CTRL_C1_Pos));
1142 }
1143
1144 /**
1145 * @brief Set iob action when value meets to COUNT_B2IO.
1146 *
1147 * Register|BitsName
1148 * --------|--------
1149 * IO_ACT_CTRL | IOB_ACT_CTRL_C2
1150 *
1151 * @param DUAL_TIMERx Timer instance
1152 * @param action This parameter can be one of the following values:
1153 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1154 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1155 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1156 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1157 * @retval None
1158 */
1159 __STATIC_INLINE void ll_dual_timer_set_iob_action_count2(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
1160 {
1161 MODIFY_REG(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOB_ACT_CTRL_C2, (action << DUAL_TIMER_IOB_ACT_CTRL_C2_Pos));
1162 }
1163
1164 /**
1165 * @brief Get iob action when value meets to COUNT_B2IO.
1166 *
1167 * Register|BitsName
1168 * --------|--------
1169 * IO_ACT_CTRL | IOB_ACT_CTRL_C2
1170 *
1171 * @param DUAL_TIMERx Timer instance
1172 * @retval Return value can be one of the following values:
1173 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1174 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1175 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1176 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1177 */
1178 __STATIC_INLINE uint32_t ll_dual_timer_get_iob_action_count2(dual_timer_regs_t *DUAL_TIMERx)
1179 {
1180 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOB_ACT_CTRL_C2) >> DUAL_TIMER_IOB_ACT_CTRL_C2_Pos));
1181 }
1182
1183 /**
1184 * @brief Set iob action when value downs to 0.
1185 *
1186 * Register|BitsName
1187 * --------|--------
1188 * IO_ACT_CTRL | IOB_ACT_CTRL_PERIOD
1189 *
1190 * @param DUAL_TIMERx Timer instance
1191 * @param action This parameter can be one of the following values:
1192 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1193 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1194 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1195 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1196 * @retval None
1197 */
1198 __STATIC_INLINE void ll_dual_timer_set_iob_action_period(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
1199 {
1200 MODIFY_REG(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOB_ACT_CTRL_PERIOD, (action << DUAL_TIMER_IOB_ACT_CTRL_PERIOD_Pos));
1201 }
1202
1203 /**
1204 * @brief Get iob action when value downs to 0.
1205 *
1206 * Register|BitsName
1207 * --------|--------
1208 * IO_ACT_CTRL | IOB_ACT_CTRL_PERIOD
1209 *
1210 * @param DUAL_TIMERx Timer instance
1211 * @retval Return value can be one of the following values:
1212 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1213 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1214 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1215 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1216 */
1217 __STATIC_INLINE uint32_t ll_dual_timer_get_iob_action_period(dual_timer_regs_t *DUAL_TIMERx)
1218 {
1219 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOB_ACT_CTRL_PERIOD) >> DUAL_TIMER_IOB_ACT_CTRL_PERIOD_Pos));
1220 }
1221
1222 /**
1223 * @brief Set iob action when timer stop.
1224 *
1225 * Register|BitsName
1226 * --------|--------
1227 * IO_ACT_CTRL | IOB_ACT_CTRL_STOP
1228 *
1229 * @param DUAL_TIMERx Timer instance
1230 * @param action This parameter can be one of the following values:
1231 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1232 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1233 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1234 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1235 * @retval None
1236 */
1237 __STATIC_INLINE void ll_dual_timer_set_iob_action_stop(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
1238 {
1239 MODIFY_REG(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOB_ACT_CTRL_STOP, (action << DUAL_TIMER_IOB_ACT_CTRL_STOP_Pos));
1240 }
1241
1242 /**
1243 * @brief Get iob action when timer stop.
1244 *
1245 * Register|BitsName
1246 * --------|--------
1247 * IO_ACT_CTRL | IOB_ACT_CTRL_STOP
1248 *
1249 * @param DUAL_TIMERx Timer instance
1250 * @retval Return value can be one of the following values:
1251 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1252 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1253 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1254 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1255 */
1256 __STATIC_INLINE uint32_t ll_dual_timer_get_iob_action_stop(dual_timer_regs_t *DUAL_TIMERx)
1257 {
1258 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOB_ACT_CTRL_STOP) >> DUAL_TIMER_IOB_ACT_CTRL_STOP_Pos));
1259 }
1260
1261 /**
1262 * @brief Set ioc action when timer start.
1263 *
1264 * Register|BitsName
1265 * --------|--------
1266 * IO_ACT_CTRL | IOC_ACT_CTRL_START
1267 *
1268 * @param DUAL_TIMERx Timer instance
1269 * @param action This parameter can be one of the following values:
1270 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1271 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1272 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1273 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1274 * @retval None
1275 */
1276 __STATIC_INLINE void ll_dual_timer_set_ioc_action_start(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
1277 {
1278 MODIFY_REG(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOC_ACT_CTRL_START, (action << DUAL_TIMER_IOC_ACT_CTRL_START_Pos));
1279 }
1280
1281 /**
1282 * @brief Get ioc action when timer start.
1283 *
1284 * Register|BitsName
1285 * --------|--------
1286 * IO_ACT_CTRL | IOC_ACT_CTRL_START
1287 *
1288 * @param DUAL_TIMERx Timer instance
1289 * @retval Return value can be one of the following values:
1290 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1291 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1292 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1293 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1294 */
1295 __STATIC_INLINE uint32_t ll_dual_timer_get_ioc_action_start(dual_timer_regs_t *DUAL_TIMERx)
1296 {
1297 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOC_ACT_CTRL_START) >> DUAL_TIMER_IOC_ACT_CTRL_START_Pos));
1298 }
1299
1300 /**
1301 * @brief Set ioc action when value meets to COUNT_C1IO.
1302 *
1303 * Register|BitsName
1304 * --------|--------
1305 * IO_ACT_CTRL | IOC_ACT_CTRL_C1
1306 *
1307 * @param DUAL_TIMERx Timer instance
1308 * @param action This parameter can be one of the following values:
1309 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1310 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1311 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1312 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1313 * @retval None
1314 */
1315 __STATIC_INLINE void ll_dual_timer_set_ioc_action_count1(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
1316 {
1317 MODIFY_REG(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOC_ACT_CTRL_C1, (action << DUAL_TIMER_IOC_ACT_CTRL_C1_Pos));
1318 }
1319
1320 /**
1321 * @brief Get ioc action when value meets to COUNT_C1IO.
1322 *
1323 * Register|BitsName
1324 * --------|--------
1325 * IO_ACT_CTRL | IOC_ACT_CTRL_C1
1326 *
1327 * @param DUAL_TIMERx Timer instance
1328 * @retval Return value can be one of the following values:
1329 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1330 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1331 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1332 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1333 */
1334 __STATIC_INLINE uint32_t ll_dual_timer_get_ioc_action_count1(dual_timer_regs_t *DUAL_TIMERx)
1335 {
1336 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOC_ACT_CTRL_C1) >> DUAL_TIMER_IOC_ACT_CTRL_C1_Pos));
1337 }
1338
1339 /**
1340 * @brief Set ioc action when value meets to COUNT_C2IO.
1341 *
1342 * Register|BitsName
1343 * --------|--------
1344 * IO_ACT_CTRL | IOC_ACT_CTRL_C2
1345 *
1346 * @param DUAL_TIMERx Timer instance
1347 * @param action This parameter can be one of the following values:
1348 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1349 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1350 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1351 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1352 * @retval None
1353 */
1354 __STATIC_INLINE void ll_dual_timer_set_ioc_action_count2(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
1355 {
1356 MODIFY_REG(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOC_ACT_CTRL_C2, (action << DUAL_TIMER_IOC_ACT_CTRL_C2_Pos));
1357 }
1358
1359 /**
1360 * @brief Get ioc action when value meets to COUNT_C2IO.
1361 *
1362 * Register|BitsName
1363 * --------|--------
1364 * IO_ACT_CTRL | IOC_ACT_CTRL_C2
1365 *
1366 * @param DUAL_TIMERx Timer instance
1367 * @retval Return value can be one of the following values:
1368 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1369 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1370 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1371 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1372 */
1373 __STATIC_INLINE uint32_t ll_dual_timer_get_ioc_action_count2(dual_timer_regs_t *DUAL_TIMERx)
1374 {
1375 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOC_ACT_CTRL_C2) >> DUAL_TIMER_IOC_ACT_CTRL_C2_Pos));
1376 }
1377
1378 /**
1379 * @brief Set ioc action when value downs to 0.
1380 *
1381 * Register|BitsName
1382 * --------|--------
1383 * IO_ACT_CTRL | IOC_ACT_CTRL_PERIOD
1384 *
1385 * @param DUAL_TIMERx Timer instance
1386 * @param action This parameter can be one of the following values:
1387 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1388 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1389 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1390 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1391 * @retval None
1392 */
1393 __STATIC_INLINE void ll_dual_timer_set_ioc_action_period(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
1394 {
1395 MODIFY_REG(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOC_ACT_CTRL_PERIOD, (action << DUAL_TIMER_IOC_ACT_CTRL_PERIOD_Pos));
1396 }
1397
1398 /**
1399 * @brief Get ioc action when value downs to 0.
1400 *
1401 * Register|BitsName
1402 * --------|--------
1403 * IO_ACT_CTRL | IOC_ACT_CTRL_PERIOD
1404 *
1405 * @param DUAL_TIMERx Timer instance
1406 * @retval Return value can be one of the following values:
1407 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1408 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1409 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1410 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1411 */
1412 __STATIC_INLINE uint32_t ll_dual_timer_get_ioc_action_period(dual_timer_regs_t *DUAL_TIMERx)
1413 {
1414 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOC_ACT_CTRL_PERIOD) >> DUAL_TIMER_IOC_ACT_CTRL_PERIOD_Pos));
1415 }
1416
1417 /**
1418 * @brief Set ioc action when timer stop.
1419 *
1420 * Register|BitsName
1421 * --------|--------
1422 * IO_ACT_CTRL | IOC_ACT_CTRL_STOP
1423 *
1424 * @param DUAL_TIMERx Timer instance
1425 * @param action This parameter can be one of the following values:
1426 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1427 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1428 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1429 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1430 * @retval None
1431 */
1432 __STATIC_INLINE void ll_dual_timer_set_ioc_action_stop(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
1433 {
1434 MODIFY_REG(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOC_ACT_CTRL_STOP, (action << DUAL_TIMER_IOC_ACT_CTRL_STOP_Pos));
1435 }
1436
1437 /**
1438 * @brief Get ioc action when timer stop.
1439 *
1440 * Register|BitsName
1441 * --------|--------
1442 * IO_ACT_CTRL | IOC_ACT_CTRL_STOP
1443 *
1444 * @param DUAL_TIMERx Timer instance
1445 * @retval Return value can be one of the following values:
1446 * @arg @ref LL_DUAL_TIMER_IO_ACTION_NONE
1447 * @arg @ref LL_DUAL_TIMER_IO_ACTION_SET
1448 * @arg @ref LL_DUAL_TIMER_IO_ACTION_RESET
1449 * @arg @ref LL_DUAL_TIMER_IO_ACTION_TOGGLE
1450 */
1451 __STATIC_INLINE uint32_t ll_dual_timer_get_ioc_action_stop(dual_timer_regs_t *DUAL_TIMERx)
1452 {
1453 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_ACT_CTRL, DUAL_TIMER_IOC_ACT_CTRL_STOP) >> DUAL_TIMER_IOC_ACT_CTRL_STOP_Pos));
1454 }
1455
1456 /**
1457 * @brief Set ioa initial vaule when DUAL_TIMER_CTRL_IOA is disable.
1458 *
1459 * Register|BitsName
1460 * --------|--------
1461 * IO_INIT_SET | IOA_ACT_INIT
1462 *
1463 * @param DUAL_TIMERx Timer instance
1464 * @param value This parameter can be one of the following values:
1465 * @arg @ref LL_DUAL_TIMER_IO_INIT_RESET
1466 * @arg @ref LL_DUAL_TIMER_IO_INIT_SET
1467 * @retval None
1468 */
1469 __STATIC_INLINE void ll_dual_timer_set_ioa_action_init(dual_timer_regs_t *DUAL_TIMERx, uint32_t value)
1470 {
1471 MODIFY_REG(DUAL_TIMERx->IO_INIT_SET, DUAL_TIMER_IOA_ACT_INIT, (value << DUAL_TIMER_IOA_ACT_INIT_Pos));
1472 }
1473
1474 /**
1475 * @brief Get ioa initial vaule.
1476 *
1477 * Register|BitsName
1478 * --------|--------
1479 * IO_INIT_SET | IOA_ACT_INIT
1480 *
1481 * @param DUAL_TIMERx Timer instance
1482 * @retval Return value can be one of the following values:
1483 * @arg @ref LL_DUAL_TIMER_IO_INIT_RESET
1484 * @arg @ref LL_DUAL_TIMER_IO_INIT_SET
1485 */
1486 __STATIC_INLINE uint32_t ll_dual_timer_get_ioa_action_init(dual_timer_regs_t *DUAL_TIMERx)
1487 {
1488 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_INIT_SET, DUAL_TIMER_IOA_ACT_INIT) >> DUAL_TIMER_IOA_ACT_INIT_Pos));
1489 }
1490
1491 /**
1492 * @brief Set iob initial vaule when DUAL_TIMER_CTRL_IOB is disable.
1493 *
1494 * Register|BitsName
1495 * --------|--------
1496 * IO_INIT_SET | IOB_ACT_INIT
1497 *
1498 * @param DUAL_TIMERx Timer instance
1499 * @param value This parameter can be one of the following values:
1500 * @arg @ref LL_DUAL_TIMER_IO_INIT_RESET
1501 * @arg @ref LL_DUAL_TIMER_IO_INIT_SET
1502 * @retval None
1503 */
1504 __STATIC_INLINE void ll_dual_timer_set_iob_action_init(dual_timer_regs_t *DUAL_TIMERx, uint32_t value)
1505 {
1506 MODIFY_REG(DUAL_TIMERx->IO_INIT_SET, DUAL_TIMER_IOB_ACT_INIT, (value << DUAL_TIMER_IOB_ACT_INIT_Pos));
1507 }
1508
1509 /**
1510 * @brief Get iob initial vaule.
1511 *
1512 * Register|BitsName
1513 * --------|--------
1514 * IO_INIT_SET | IOB_ACT_INIT
1515 *
1516 * @param DUAL_TIMERx Timer instance
1517 * @retval Return value can be one of the following values:
1518 * @arg @ref LL_DUAL_TIMER_IO_INIT_RESET
1519 * @arg @ref LL_DUAL_TIMER_IO_INIT_SET
1520 */
1521 __STATIC_INLINE uint32_t ll_dual_timer_get_iob_action_init(dual_timer_regs_t *DUAL_TIMERx)
1522 {
1523 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_INIT_SET, DUAL_TIMER_IOB_ACT_INIT) >> DUAL_TIMER_IOB_ACT_INIT_Pos));
1524 }
1525
1526 /**
1527 * @brief Set ioc initial vaule when DUAL_TIMER_CTRL_IOC is disable.
1528 *
1529 * Register|BitsName
1530 * --------|--------
1531 * IO_INIT_SET | IOC_ACT_INIT
1532 *
1533 * @param DUAL_TIMERx Timer instance
1534 * @param value This parameter can be one of the following values:
1535 * @arg @ref LL_DUAL_TIMER_IO_INIT_RESET
1536 * @arg @ref LL_DUAL_TIMER_IO_INIT_SET
1537 * @retval None
1538 */
1539 __STATIC_INLINE void ll_dual_timer_set_ioc_action_init(dual_timer_regs_t *DUAL_TIMERx, uint32_t value)
1540 {
1541 MODIFY_REG(DUAL_TIMERx->IO_INIT_SET, DUAL_TIMER_IOC_ACT_INIT, (value << DUAL_TIMER_IOC_ACT_INIT_Pos));
1542 }
1543
1544 /**
1545 * @brief Get ioc initial vaule.
1546 *
1547 * Register|BitsName
1548 * --------|--------
1549 * IO_INIT_SET | IOC_ACT_INIT
1550 *
1551 * @param DUAL_TIMERx Timer instance
1552 * @retval Return value can be one of the following values:
1553 * @arg @ref LL_DUAL_TIMER_IO_INIT_RESET
1554 * @arg @ref LL_DUAL_TIMER_IO_INIT_SET
1555 */
1556 __STATIC_INLINE uint32_t ll_dual_timer_get_ioc_action_init(dual_timer_regs_t *DUAL_TIMERx)
1557 {
1558 return (uint32_t)((READ_BITS(DUAL_TIMERx->IO_INIT_SET, DUAL_TIMER_IOC_ACT_INIT) >> DUAL_TIMER_IOC_ACT_INIT_Pos));
1559 }
1560
1561 /**
1562 * @brief Set the one-time reload value.
1563 *
1564 * Register|BitsName
1565 * --------|--------
1566 * TP_LOAD | TP_LOAD
1567 *
1568 * @param DUAL_TIMERx Timer instance
1569 * @param onetime_reload between Min_Data=0 and Max_Data=0xFFFFFFFF
1570 * @retval None
1571 */
1572 __STATIC_INLINE void ll_dual_timer_set_onetime_reload(dual_timer_regs_t *DUAL_TIMERx, uint32_t onetime_reload)
1573 {
1574 WRITE_REG(DUAL_TIMERx->TP_LOAD, onetime_reload);
1575 }
1576
1577 /**
1578 * @brief Get the one-time reload value.
1579 *
1580 * Register|BitsName
1581 * --------|--------
1582 * TP_LOAD | TP_LOAD
1583 *
1584 * @param DUAL_TIMERx Timer instance
1585 * @retval Return value between Min_Data=0 and Max_Data=0xFFFFFFFF
1586 */
1587 __STATIC_INLINE uint32_t ll_dual_timer_get_onetime_reload(dual_timer_regs_t *DUAL_TIMERx)
1588 {
1589 return (uint32_t)(READ_REG(DUAL_TIMERx->TP_LOAD));
1590 }
1591
1592 /**
1593 * @brief Set the BLE count 1 value.
1594 *
1595 * Register|BitsName
1596 * --------|--------
1597 * BLE_COUNT1 | BLE_COUNT1
1598 *
1599 * @param DUAL_TIMERx Timer instance
1600 * @param count_value count 1 value between Min_Data=0 and Max_Data=0xFFFFFFFF
1601 * @retval None
1602 */
1603 __STATIC_INLINE void ll_dual_timer_set_ble_count1(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
1604 {
1605 WRITE_REG(DUAL_TIMERx->BLE_COUNT1, count_value);
1606 }
1607
1608 /**
1609 * @brief Get the BLE count 1 value.
1610 *
1611 * Register|BitsName
1612 * --------|--------
1613 * BLE_COUNT1 | BLE_COUNT1
1614 *
1615 * @param DUAL_TIMERx Timer instance
1616 * @retval Return value between Min_Data=0 and Max_Data=0xFFFFFFFF
1617 */
1618 __STATIC_INLINE uint32_t ll_dual_timer_get_ble_count1(dual_timer_regs_t *DUAL_TIMERx)
1619 {
1620 return (uint32_t)(READ_REG(DUAL_TIMERx->BLE_COUNT1));
1621 }
1622
1623 /**
1624 * @brief Set the BLE count 2 value.
1625 *
1626 * Register|BitsName
1627 * --------|--------
1628 * BLE_COUNT2 | BLE_COUNT2
1629 *
1630 * @param DUAL_TIMERx Timer instance
1631 * @param count_value count 2 value between Min_Data=0 and Max_Data=0xFFFFFFFF
1632 * @retval None
1633 */
1634 __STATIC_INLINE void ll_dual_timer_set_ble_count2(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
1635 {
1636 WRITE_REG(DUAL_TIMERx->BLE_COUNT2, count_value);
1637 }
1638
1639 /**
1640 * @brief Get the BLE count 2 value.
1641 *
1642 * Register|BitsName
1643 * --------|--------
1644 * BLE_COUNT2 | BLE_COUNT2
1645 *
1646 * @param DUAL_TIMERx Timer instance
1647 * @retval Return value between Min_Data=0 and Max_Data=0xFFFFFFFF
1648 */
1649 __STATIC_INLINE uint32_t ll_dual_timer_get_ble_count2(dual_timer_regs_t *DUAL_TIMERx)
1650 {
1651 return (uint32_t)(READ_REG(DUAL_TIMERx->BLE_COUNT2));
1652 }
1653
1654 /**
1655 * @brief Set the BLE pulse width.
1656 *
1657 * Register|BitsName
1658 * --------|--------
1659 * BLE_PULSEWIDTH | BLE_PULSEWIDTH
1660 *
1661 * @param DUAL_TIMERx Timer instance
1662 * @param width pulse width
1663 * @retval None
1664 */
1665 __STATIC_INLINE void ll_dual_timer_set_ble_pulse_width(dual_timer_regs_t *DUAL_TIMERx, uint32_t width)
1666 {
1667 MODIFY_REG(DUAL_TIMERx->BLE_PULSEWIDTH, DUAL_TIMER_BLE_PULSEWIDTH, (width << DUAL_TIMER_BLE_PULSEWIDTH_Pos));
1668 }
1669
1670 /**
1671 * @brief Get the BLE pulse width.
1672 *
1673 * Register|BitsName
1674 * --------|--------
1675 * BLE_PULSEWIDTH | BLE_PULSEWIDTH
1676 *
1677 * @param DUAL_TIMERx Timer instance
1678 * @retval BLE pulse width
1679 */
1680 __STATIC_INLINE uint32_t ll_dual_timer_get_ble_pulse_width(dual_timer_regs_t *DUAL_TIMERx)
1681 {
1682 return (uint32_t)((READ_BITS(DUAL_TIMERx->BLE_PULSEWIDTH, DUAL_TIMER_BLE_PULSEWIDTH) >> DUAL_TIMER_BLE_PULSEWIDTH_Pos));
1683 }
1684
1685 /**
1686 * @brief Set the period count in period mode.
1687 *
1688 * Register|BitsName
1689 * --------|--------
1690 * PERIOD_COUNT | PERIOD_COUNT
1691 *
1692 * @param DUAL_TIMERx Timer instance
1693 * @param count between Min_Data=2 and Max_Data=0xFFFF
1694 * @retval None
1695 */
1696 __STATIC_INLINE void ll_dual_timer_set_period_count(dual_timer_regs_t *DUAL_TIMERx, uint32_t count)
1697 {
1698 WRITE_REG(DUAL_TIMERx->PERIOD_COUNT, count);
1699 }
1700
1701 /**
1702 * @brief Get the period count in period mode.
1703 *
1704 * Register|BitsName
1705 * --------|--------
1706 * PERIOD_COUNT | PERIOD_COUNT
1707 *
1708 * @param DUAL_TIMERx Timer instance
1709 * @retval Return value between Min_Data=2 and Max_Data=0xFFFF
1710 */
1711 __STATIC_INLINE uint32_t ll_dual_timer_get_period_count(dual_timer_regs_t *DUAL_TIMERx)
1712 {
1713 return (uint32_t)(READ_REG(DUAL_TIMERx->PERIOD_COUNT));
1714 }
1715 /** @} */
1716
1717 /** @defgroup DUAL_TIM_LL_EF_IT_Management IT_Management
1718 * @{
1719 */
1720
1721 /**
1722 * @brief Enable dual_timer interrupt.
1723 *
1724 * Register|BitsName
1725 * --------|--------
1726 * CTRL | INTEN
1727 *
1728 * @param DUAL_TIMERx Timer instance
1729 * @retval None
1730 */
1731 __STATIC_INLINE void ll_dual_timer_enable_it(dual_timer_regs_t *DUAL_TIMERx)
1732 {
1733 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_INTEN);
1734 }
1735
1736 /**
1737 * @brief Disable dual_timer interrput.
1738 *
1739 * Register|BitsName
1740 * --------|--------
1741 * CTRL | INTEN
1742 *
1743 * @param DUAL_TIMERx Timer instance
1744 * @retval None
1745 */
1746 __STATIC_INLINE void ll_dual_timer_disable_it(dual_timer_regs_t *DUAL_TIMERx)
1747 {
1748 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_INTEN);
1749 }
1750
1751 /**
1752 * @brief Indicate whether the dual_timer interrput is enabled.
1753 *
1754 * Register|BitsName
1755 * --------|--------
1756 * CTRL | INTEN
1757 *
1758 * @param DUAL_TIMERx Timer instance
1759 * @retval State of bit (1 or 0).
1760 */
1761 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_it(dual_timer_regs_t *DUAL_TIMERx)
1762 {
1763 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_INTEN) == (DUAL_TIMER_CTRL_INTEN));
1764 }
1765
1766 /**
1767 * @brief Enable dual_timer action interrupt when timer start.
1768 *
1769 * Register|BitsName
1770 * --------|--------
1771 * CTRL | ACT_START_INTEN
1772 *
1773 * @param DUAL_TIMERx Timer instance
1774 * @retval None
1775 */
1776 __STATIC_INLINE void ll_dual_timer_enable_act_start_it(dual_timer_regs_t *DUAL_TIMERx)
1777 {
1778 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_ACT_START_INTEN);
1779 }
1780
1781 /**
1782 * @brief Disable dual_timer action interrupt when timer start.
1783 *
1784 * Register|BitsName
1785 * --------|--------
1786 * CTRL | ACT_START_INTEN
1787 *
1788 * @param DUAL_TIMERx Timer instance
1789 * @retval None
1790 */
1791 __STATIC_INLINE void ll_dual_timer_disable_act_start_it(dual_timer_regs_t *DUAL_TIMERx)
1792 {
1793 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_ACT_START_INTEN);
1794 }
1795
1796 /**
1797 * @brief Indicate whether the dual_timer action interrupt when timer start is enabled.
1798 *
1799 * Register|BitsName
1800 * --------|--------
1801 * CTRL | ACT_START_INTEN
1802 *
1803 * @param DUAL_TIMERx Timer instance
1804 * @retval State of bit (1 or 0).
1805 */
1806 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_act_start_it(dual_timer_regs_t *DUAL_TIMERx)
1807 {
1808 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_ACT_START_INTEN) == (DUAL_TIMER_CTRL_ACT_START_INTEN));
1809 }
1810
1811 /**
1812 * @brief Enable dual_timer action interrupt when timer value meets to COUNT_A1IO.
1813 *
1814 * Register|BitsName
1815 * --------|--------
1816 * CTRL | IOA_ACT_C1_INTEN
1817 *
1818 * @param DUAL_TIMERx Timer instance
1819 * @retval None
1820 */
1821 __STATIC_INLINE void ll_dual_timer_enable_ioa_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
1822 {
1823 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOA_ACT_C1_INTEN);
1824 }
1825
1826 /**
1827 * @brief Disable dual_timer action interrupt when timer value meets to COUNT_A1IO.
1828 *
1829 * Register|BitsName
1830 * --------|--------
1831 * CTRL | IOA_ACT_C1_INTEN
1832 *
1833 * @param DUAL_TIMERx Timer instance
1834 * @retval None
1835 */
1836 __STATIC_INLINE void ll_dual_timer_disable_ioa_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
1837 {
1838 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOA_ACT_C1_INTEN);
1839 }
1840
1841 /**
1842 * @brief Indicate whether the dual_timer action interrupt when timer value meets to COUNT_A1IO is enabled.
1843 *
1844 * Register|BitsName
1845 * --------|--------
1846 * CTRL | IOA_ACT_C1_INTEN
1847 *
1848 * @param DUAL_TIMERx Timer instance
1849 * @retval State of bit (1 or 0).
1850 */
1851 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ioa_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
1852 {
1853 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOA_ACT_C1_INTEN) == (DUAL_TIMER_CTRL_IOA_ACT_C1_INTEN));
1854 }
1855
1856 /**
1857 * @brief Enable dual_timer action interrupt when timer value meets to COUNT_A2IO.
1858 *
1859 * Register|BitsName
1860 * --------|--------
1861 * CTRL | IOA_ACT_C2_INTEN
1862 *
1863 * @param DUAL_TIMERx Timer instance
1864 * @retval None
1865 */
1866 __STATIC_INLINE void ll_dual_timer_enable_ioa_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
1867 {
1868 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOA_ACT_C2_INTEN);
1869 }
1870
1871 /**
1872 * @brief Disable dual_timer action interrupt when timer value meets to COUNT_A2IO.
1873 *
1874 * Register|BitsName
1875 * --------|--------
1876 * CTRL | IOA_ACT_C2_INTEN
1877 *
1878 * @param DUAL_TIMERx Timer instance
1879 * @retval None
1880 */
1881 __STATIC_INLINE void ll_dual_timer_disable_ioa_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
1882 {
1883 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOA_ACT_C2_INTEN);
1884 }
1885
1886 /**
1887 * @brief Indicate whether the dual_timer action interrupt when timer value meets to COUNT_A2IO is enabled.
1888 *
1889 * Register|BitsName
1890 * --------|--------
1891 * CTRL | IOA_ACT_C2_INTEN
1892 *
1893 * @param DUAL_TIMERx Timer instance
1894 * @retval State of bit (1 or 0).
1895 */
1896 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ioa_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
1897 {
1898 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOA_ACT_C2_INTEN) == (DUAL_TIMER_CTRL_IOA_ACT_C2_INTEN));
1899 }
1900
1901 /**
1902 * @brief Enable dual_timer action interrupt when timer value meets to 0.
1903 *
1904 * Register|BitsName
1905 * --------|--------
1906 * CTRL | ACT_PERIOD_INTEN
1907 *
1908 * @param DUAL_TIMERx Timer instance
1909 * @retval None
1910 */
1911 __STATIC_INLINE void ll_dual_timer_enable_act_period_it(dual_timer_regs_t *DUAL_TIMERx)
1912 {
1913 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_ACT_PERIOD_INTEN);
1914 }
1915
1916 /**
1917 * @brief Disable dual_timer action interrupt when timer value meets to 0.
1918 *
1919 * Register|BitsName
1920 * --------|--------
1921 * CTRL | ACT_PERIOD_INTEN
1922 *
1923 * @param DUAL_TIMERx Timer instance
1924 * @retval None
1925 */
1926 __STATIC_INLINE void ll_dual_timer_disable_act_period_it(dual_timer_regs_t *DUAL_TIMERx)
1927 {
1928 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_ACT_PERIOD_INTEN);
1929 }
1930
1931 /**
1932 * @brief Indicate whether the dual_timer action interrupt when timer value meets to 0 is enabled.
1933 *
1934 * Register|BitsName
1935 * --------|--------
1936 * CTRL | ACT_PERIOD_INTEN
1937 *
1938 * @param DUAL_TIMERx Timer instance
1939 * @retval State of bit (1 or 0).
1940 */
1941 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_act_period_it(dual_timer_regs_t *DUAL_TIMERx)
1942 {
1943 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_ACT_PERIOD_INTEN) == (DUAL_TIMER_CTRL_ACT_PERIOD_INTEN));
1944 }
1945
1946 /**
1947 * @brief Enable dual_timer action interrupt when timer stop.
1948 *
1949 * Register|BitsName
1950 * --------|--------
1951 * CTRL | ACT_STOP_INTEN
1952 *
1953 * @param DUAL_TIMERx Timer instance
1954 * @retval None
1955 */
1956 __STATIC_INLINE void ll_dual_timer_enable_act_stop_it(dual_timer_regs_t *DUAL_TIMERx)
1957 {
1958 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_ACT_STOP_INTEN);
1959 }
1960
1961 /**
1962 * @brief Disable dual_timer action interrupt when timer stop.
1963 *
1964 * Register|BitsName
1965 * --------|--------
1966 * CTRL | ACT_STOP_INTEN
1967 *
1968 * @param DUAL_TIMERx Timer instance
1969 * @retval None
1970 */
1971 __STATIC_INLINE void ll_dual_timer_disable_act_stop_it(dual_timer_regs_t *DUAL_TIMERx)
1972 {
1973 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_ACT_STOP_INTEN);
1974 }
1975
1976 /**
1977 * @brief Indicate whether the dual_timer action interrupt when timer stop.
1978 *
1979 * Register|BitsName
1980 * --------|--------
1981 * CTRL | ACT_STOP_INTEN
1982 *
1983 * @param DUAL_TIMERx Timer instance
1984 * @retval State of bit (1 or 0).
1985 */
1986 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_act_stop_it(dual_timer_regs_t *DUAL_TIMERx)
1987 {
1988 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_ACT_STOP_INTEN) == (DUAL_TIMER_CTRL_ACT_STOP_INTEN));
1989 }
1990
1991 /**
1992 * @brief Enable dual_timer action interrupt when timer value meets to COUNT_B1IO.
1993 *
1994 * Register|BitsName
1995 * --------|--------
1996 * CTRL | IOB_ACT_C1_INTEN
1997 *
1998 * @param DUAL_TIMERx Timer instance
1999 * @retval None
2000 */
2001 __STATIC_INLINE void ll_dual_timer_enable_iob_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
2002 {
2003 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOB_ACT_C1_INTEN);
2004 }
2005
2006 /**
2007 * @brief Disable dual_timer action interrupt when timer value meets to COUNT_B1IO.
2008 *
2009 * Register|BitsName
2010 * --------|--------
2011 * CTRL | IOB_ACT_C1_INTEN
2012 *
2013 * @param DUAL_TIMERx Timer instance
2014 * @retval None
2015 */
2016 __STATIC_INLINE void ll_dual_timer_disable_iob_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
2017 {
2018 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOB_ACT_C1_INTEN);
2019 }
2020
2021 /**
2022 * @brief Indicate whether the dual_timer action interrupt when timer value meets to COUNT_B1IO is enabled.
2023 *
2024 * Register|BitsName
2025 * --------|--------
2026 * CTRL | IOB_ACT_C1_INTEN
2027 *
2028 * @param DUAL_TIMERx Timer instance
2029 * @retval State of bit (1 or 0).
2030 */
2031 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_iob_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
2032 {
2033 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOB_ACT_C1_INTEN) == (DUAL_TIMER_CTRL_IOB_ACT_C1_INTEN));
2034 }
2035
2036 /**
2037 * @brief Enable dual_timer action interrupt when timer value meets to COUNT_B2IO.
2038 *
2039 * Register|BitsName
2040 * --------|--------
2041 * CTRL | IOB_ACT_C2_INTEN
2042 *
2043 * @param DUAL_TIMERx Timer instance
2044 * @retval None
2045 */
2046 __STATIC_INLINE void ll_dual_timer_enable_iob_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
2047 {
2048 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOB_ACT_C2_INTEN);
2049 }
2050
2051 /**
2052 * @brief Disable dual_timer action interrupt when timer value meets to COUNT_B2IO.
2053 *
2054 * Register|BitsName
2055 * --------|--------
2056 * CTRL | IOB_ACT_C2_INTEN
2057 *
2058 * @param DUAL_TIMERx Timer instance
2059 * @retval None
2060 */
2061 __STATIC_INLINE void ll_dual_timer_disable_iob_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
2062 {
2063 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOB_ACT_C2_INTEN);
2064 }
2065
2066 /**
2067 * @brief Indicate whether the dual_timer action interrupt when timer value meets to COUNT_B2IO is enabled.
2068 *
2069 * Register|BitsName
2070 * --------|--------
2071 * CTRL | IOB_ACT_C2_INTEN
2072 *
2073 * @param DUAL_TIMERx Timer instance
2074 * @retval State of bit (1 or 0).
2075 */
2076 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_iob_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
2077 {
2078 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOB_ACT_C2_INTEN) == (DUAL_TIMER_CTRL_IOB_ACT_C2_INTEN));
2079 }
2080
2081 /**
2082 * @brief Enable dual_timer action interrupt when timer value meets to COUNT_C1IO.
2083 *
2084 * Register|BitsName
2085 * --------|--------
2086 * CTRL | IOC_ACT_C1_INTEN
2087 *
2088 * @param DUAL_TIMERx Timer instance
2089 * @retval None
2090 */
2091 __STATIC_INLINE void ll_dual_timer_enable_ioc_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
2092 {
2093 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOC_ACT_C1_INTEN);
2094 }
2095
2096 /**
2097 * @brief Disable dual_timer action interrupt when timer value meets to COUNT_C1IO.
2098 *
2099 * Register|BitsName
2100 * --------|--------
2101 * CTRL | IOC_ACT_C1_INTEN
2102 *
2103 * @param DUAL_TIMERx Timer instance
2104 * @retval None
2105 */
2106 __STATIC_INLINE void ll_dual_timer_disable_ioc_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
2107 {
2108 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOC_ACT_C1_INTEN);
2109 }
2110
2111 /**
2112 * @brief Indicate whether the dual_timer action interrupt when timer value meets to COUNT_C1IO is enabled.
2113 *
2114 * Register|BitsName
2115 * --------|--------
2116 * CTRL | IOC_ACT_C1_INTEN
2117 *
2118 * @param DUAL_TIMERx Timer instance
2119 * @retval State of bit (1 or 0).
2120 */
2121 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ioc_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
2122 {
2123 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOC_ACT_C1_INTEN) == (DUAL_TIMER_CTRL_IOC_ACT_C1_INTEN));
2124 }
2125
2126 /**
2127 * @brief Enable dual_timer action interrupt when timer value meets to COUNT_C2IO.
2128 *
2129 * Register|BitsName
2130 * --------|--------
2131 * CTRL | IOC_ACT_C2_INTEN
2132 *
2133 * @param DUAL_TIMERx Timer instance
2134 * @retval None
2135 */
2136 __STATIC_INLINE void ll_dual_timer_enable_ioc_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
2137 {
2138 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOC_ACT_C2_INTEN);
2139 }
2140
2141 /**
2142 * @brief Disable dual_timer action interrupt when timer value meets to COUNT_C2IO.
2143 *
2144 * Register|BitsName
2145 * --------|--------
2146 * CTRL | IOC_ACT_C2_INTEN
2147 *
2148 * @param DUAL_TIMERx Timer instance
2149 * @retval None
2150 */
2151 __STATIC_INLINE void ll_dual_timer_disable_ioc_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
2152 {
2153 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOC_ACT_C2_INTEN);
2154 }
2155
2156 /**
2157 * @brief Indicate whether the dual_timer action interrupt when timer value meets to COUNT_C2IO is enabled.
2158 *
2159 * Register|BitsName
2160 * --------|--------
2161 * CTRL | IOC_ACT_C2_INTEN
2162 *
2163 * @param DUAL_TIMERx Timer instance
2164 * @retval State of bit (1 or 0).
2165 */
2166 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ioc_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
2167 {
2168 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_IOC_ACT_C2_INTEN) == (DUAL_TIMER_CTRL_IOC_ACT_C2_INTEN));
2169 }
2170
2171 /**
2172 * @brief Enable dual_timer interrupt when timer value meets to BLE_COUNT1.
2173 *
2174 * Register|BitsName
2175 * --------|--------
2176 * CTRL | BLEPULSE1_INTEN
2177 *
2178 * @param DUAL_TIMERx Timer instance
2179 * @retval None
2180 */
2181 __STATIC_INLINE void ll_dual_timer_enable_ble_pulse1_it(dual_timer_regs_t *DUAL_TIMERx)
2182 {
2183 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_BLEPULSE1_INTEN);
2184 }
2185
2186 /**
2187 * @brief Disable dual_timer interrupt when timer value meets to BLE_COUNT1.
2188 *
2189 * Register|BitsName
2190 * --------|--------
2191 * CTRL | BLEPULSE1_INTEN
2192 *
2193 * @param DUAL_TIMERx Timer instance
2194 * @retval None
2195 */
2196 __STATIC_INLINE void ll_dual_timer_disable_ble_pulse1_it(dual_timer_regs_t *DUAL_TIMERx)
2197 {
2198 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_BLEPULSE1_INTEN);
2199 }
2200
2201 /**
2202 * @brief Indicate whether the dual_timer interrupt when timer value meets to BLE_COUNT1 is enabled.
2203 *
2204 * Register|BitsName
2205 * --------|--------
2206 * CTRL | BLEPULSE1_INTEN
2207 *
2208 * @param DUAL_TIMERx Timer instance
2209 * @retval State of bit (1 or 0).
2210 */
2211 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ble_pulse1_it(dual_timer_regs_t *DUAL_TIMERx)
2212 {
2213 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_BLEPULSE1_INTEN) == (DUAL_TIMER_CTRL_BLEPULSE1_INTEN));
2214 }
2215
2216 /**
2217 * @brief Enable dual_timer interrupt when timer value meets to BLE_COUNT2.
2218 *
2219 * Register|BitsName
2220 * --------|--------
2221 * CTRL | BLEPULSE2_INTEN
2222 *
2223 * @param DUAL_TIMERx Timer instance
2224 * @retval None
2225 */
2226 __STATIC_INLINE void ll_dual_timer_enable_ble_pulse2_it(dual_timer_regs_t *DUAL_TIMERx)
2227 {
2228 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_BLEPULSE2_INTEN);
2229 }
2230
2231 /**
2232 * @brief Disable dual_timer interrupt when timer value meets to BLE_COUNT2.
2233 *
2234 * Register|BitsName
2235 * --------|--------
2236 * CTRL | BLEPULSE2_INTEN
2237 *
2238 * @param DUAL_TIMERx Timer instance
2239 * @retval None
2240 */
2241 __STATIC_INLINE void ll_dual_timer_disable_ble_pulse2_it(dual_timer_regs_t *DUAL_TIMERx)
2242 {
2243 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_BLEPULSE2_INTEN);
2244 }
2245
2246 /**
2247 * @brief Indicate whether the dual_timer interrupt when timer value meets to BLE_COUNT2 is enabled.
2248 *
2249 * Register|BitsName
2250 * --------|--------
2251 * CTRL | BLEPULSE2_INTEN
2252 *
2253 * @param DUAL_TIMERx Timer instance
2254 * @retval State of bit (1 or 0).
2255 */
2256 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ble_pulse2_it(dual_timer_regs_t *DUAL_TIMERx)
2257 {
2258 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_BLEPULSE2_INTEN) == (DUAL_TIMER_CTRL_BLEPULSE2_INTEN));
2259 }
2260 /** @} */
2261
2262 /** @defgroup DUAL_TIMER_LL_EF_FLAG_Management FLAG_Management
2263 * @{
2264 */
2265
2266 /**
2267 * @brief Clear the interrupt flag (INTSTAT).
2268 *
2269
2270 * Register|BitsName
2271 * --------|--------
2272 * INTCLR | INTCLR
2273 *
2274 * @param DUAL_TIMERx Timer instance
2275 * @retval None
2276 */
2277 __STATIC_INLINE void ll_dual_timer_clear_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2278 {
2279 WRITE_REG(DUAL_TIMERx->INTCLR, DUAL_TIMER_INT_CLR);
2280 }
2281
2282 /**
2283 * @brief Indicate whether interrupt flag (INTSTAT) is set (interrupt is pending).
2284 *
2285 * Register|BitsName
2286 * --------|--------
2287 * INTSTAT | INTSTAT
2288 *
2289 * @param DUAL_TIMERx Timer instance
2290 * @retval State of bit (1 or 0).
2291 */
2292 __STATIC_INLINE uint32_t ll_dual_timer_is_active_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2293 {
2294 return (READ_BITS(DUAL_TIMERx->INTSTAT, DUAL_TIMER_ISR_TI) == (DUAL_TIMER_ISR_TI));
2295 }
2296
2297 /**
2298 * @brief Get Dual_timer raw interrupt flags
2299 *
2300 * Register|BitsName
2301 * --------|--------
2302 * RAW_INTSTAT | RAW_INTSTAT
2303 *
2304 * @param DUAL_TIMERx Timer instance
2305 * @retval State of bit (1 or 0).
2306 */
2307 __STATIC_INLINE uint32_t ll_dual_timer_get_raw_it_flag(dual_timer_regs_t *DUAL_TIMERx)
2308 {
2309 return (READ_REG(DUAL_TIMERx->RAW_INTSTAT));
2310 }
2311
2312 /**
2313 * @brief Get dual timer interrupt flag
2314 *
2315 * Register|BitsName
2316 * --------|--------
2317 * INTSTAT | INTSTAT
2318 *
2319 * @param DUAL_TIMERx Timer instance
2320 * @retval interrupt flag
2321 */
2322 __STATIC_INLINE uint32_t ll_dual_timer_get_it_flag(dual_timer_regs_t *DUAL_TIMERx)
2323 {
2324 return (uint32_t )(READ_BITS(DUAL_TIMERx->INTSTAT, DUAL_TIMER_INT_STAT));
2325 }
2326
2327 /**
2328 * @brief Indicate whether action interrupt flag is set when timer start.
2329 *
2330 * Register|BitsName
2331 * --------|--------
2332 * INTSTAT | ACT_START
2333 *
2334 * @param DUAL_TIMERx Timer instance
2335 * @retval State of bit (1 or 0).
2336 */
2337 __STATIC_INLINE uint32_t ll_dual_timer_is_action_start_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2338 {
2339 return (READ_BITS(DUAL_TIMERx->INTSTAT, DUAL_TIMER_INT_ACT_START) == (DUAL_TIMER_INT_ACT_START));
2340 }
2341
2342 /**
2343 * @brief Indicate whether action interrupt flag is set when timer value meets to COUNT_A1IO.
2344 *
2345 * Register|BitsName
2346 * --------|--------
2347 * INTSTAT | IOA_ACT_C1
2348 *
2349 * @param DUAL_TIMERx Timer instance
2350 * @retval State of bit (1 or 0).
2351 */
2352 __STATIC_INLINE uint32_t ll_dual_timer_is_ioa_action_c1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2353 {
2354 return (READ_BITS(DUAL_TIMERx->INTSTAT, DUAL_TIMER_INT_IOA_ACT_C1) == (DUAL_TIMER_INT_IOA_ACT_C1));
2355 }
2356
2357 /**
2358 * @brief Indicate whether action interrupt flag is set when timer value meets to COUNT_A2IO.
2359 *
2360 * Register|BitsName
2361 * --------|--------
2362 * INTSTAT | IOA_ACT_C2
2363 *
2364 * @param DUAL_TIMERx Timer instance
2365 * @retval State of bit (1 or 0).
2366 */
2367 __STATIC_INLINE uint32_t ll_dual_timer_is_ioa_action_c2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2368 {
2369 return (READ_BITS(DUAL_TIMERx->INTSTAT, DUAL_TIMER_INT_IOA_ACT_C2) == (DUAL_TIMER_INT_IOA_ACT_C2));
2370 }
2371
2372 /**
2373 * @brief Indicate whether action interrupt flag is set when timer value meets to 0.
2374 *
2375 * Register|BitsName
2376 * --------|--------
2377 * INTSTAT | ACT_PERIOD
2378 *
2379 * @param DUAL_TIMERx Timer instance
2380 * @retval State of bit (1 or 0).
2381 */
2382 __STATIC_INLINE uint32_t ll_dual_timer_is_action_period_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2383 {
2384 return (READ_BITS(DUAL_TIMERx->INTSTAT, DUAL_TIMER_INT_ACT_PERIOD) == (DUAL_TIMER_INT_ACT_PERIOD));
2385 }
2386
2387 /**
2388 * @brief Indicate whether action interrupt flag is set when timer stop.
2389 *
2390 * Register|BitsName
2391 * --------|--------
2392 * INTSTAT | ACT_STOP
2393 *
2394 * @param DUAL_TIMERx Timer instance
2395 * @retval State of bit (1 or 0).
2396 */
2397 __STATIC_INLINE uint32_t ll_dual_timer_is_action_stop_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2398 {
2399 return (READ_BITS(DUAL_TIMERx->INTSTAT, DUAL_TIMER_INT_ACT_STOP) == (DUAL_TIMER_INT_ACT_STOP));
2400 }
2401
2402 /**
2403 * @brief Indicate whether action interrupt flag is set when timer value meets to COUNT_B1IO.
2404 *
2405 * Register|BitsName
2406 * --------|--------
2407 * INTSTAT | IOB_ACT_C1
2408 *
2409 * @param DUAL_TIMERx Timer instance
2410 * @retval State of bit (1 or 0).
2411 */
2412 __STATIC_INLINE uint32_t ll_dual_timer_is_iob_action_c1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2413 {
2414 return (READ_BITS(DUAL_TIMERx->INTSTAT, DUAL_TIMER_INT_IOB_ACT_C1) == (DUAL_TIMER_INT_IOB_ACT_C1));
2415 }
2416
2417 /**
2418 * @brief Indicate whether action interrupt flag is set when timer value meets to COUNT_B2IO.
2419 *
2420 * Register|BitsName
2421 * --------|--------
2422 * INTSTAT | IOB_ACT_C2
2423 *
2424 * @param DUAL_TIMERx Timer instance
2425 * @retval State of bit (1 or 0).
2426 */
2427 __STATIC_INLINE uint32_t ll_dual_timer_is_iob_action_c2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2428 {
2429 return (READ_BITS(DUAL_TIMERx->INTSTAT, DUAL_TIMER_INT_IOB_ACT_C2) == (DUAL_TIMER_INT_IOB_ACT_C2));
2430 }
2431
2432 /**
2433 * @brief Indicate whether action interrupt flag is set when timer value meets to COUNT_C1IO.
2434 *
2435 * Register|BitsName
2436 * --------|--------
2437 * INTSTAT | IOC_ACT_C1
2438 *
2439 * @param DUAL_TIMERx Timer instance
2440 * @retval State of bit (1 or 0).
2441 */
2442 __STATIC_INLINE uint32_t ll_dual_timer_is_ioc_action_c1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2443 {
2444 return (READ_BITS(DUAL_TIMERx->INTSTAT, DUAL_TIMER_INT_IOC_ACT_C1) == (DUAL_TIMER_INT_IOC_ACT_C1));
2445 }
2446
2447 /**
2448 * @brief Indicate whether action interrupt flag is set when timer value meets to COUNT_C2IO.
2449 *
2450 * Register|BitsName
2451 * --------|--------
2452 * INTSTAT | IOC_ACT_C2
2453 *
2454 * @param DUAL_TIMERx Timer instance
2455 * @retval State of bit (1 or 0).
2456 */
2457 __STATIC_INLINE uint32_t ll_dual_timer_is_ioc_action_c2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2458 {
2459 return (READ_BITS(DUAL_TIMERx->INTSTAT, DUAL_TIMER_INT_IOC_ACT_C2) == (DUAL_TIMER_INT_IOC_ACT_C2));
2460 }
2461
2462 /**
2463 * @brief Indicate whether interrupt flag is set when timer value meets to BLE_COUNT1.
2464 *
2465 * Register|BitsName
2466 * --------|--------
2467 * INTSTAT | BLEPULSE1
2468 *
2469 * @param DUAL_TIMERx Timer instance
2470 * @retval State of bit (1 or 0).
2471 */
2472 __STATIC_INLINE uint32_t ll_dual_timer_is_ble_pulse1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2473 {
2474 return (READ_BITS(DUAL_TIMERx->INTSTAT, DUAL_TIMER_INT_BLEPULSE1) == (DUAL_TIMER_INT_BLEPULSE1));
2475 }
2476
2477 /**
2478 * @brief Indicate whether interrupt flag is set when timer value meets to BLE_COUNT2.
2479 *
2480 * Register|BitsName
2481 * --------|--------
2482 * INTSTAT | BLEPULSE2
2483 *
2484 * @param DUAL_TIMERx Timer instance
2485 * @retval State of bit (1 or 0).
2486 */
2487 __STATIC_INLINE uint32_t ll_dual_timer_is_ble_pulse2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2488 {
2489 return (READ_BITS(DUAL_TIMERx->INTSTAT, DUAL_TIMER_INT_BLEPULSE2) == (DUAL_TIMER_INT_BLEPULSE2));
2490 }
2491
2492 /**
2493 * @brief Clear the start action interrupt flag.
2494 *
2495 * Register|BitsName
2496 * --------|--------
2497 * IO_BLE_INTCLR | ACT_START_INTCLR
2498 *
2499 * @param DUAL_TIMERx Timer instance
2500 * @retval None
2501 */
2502 __STATIC_INLINE void ll_dual_timer_clear_act_start_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2503 {
2504 WRITE_REG(DUAL_TIMERx->IO_BLE_INTCLR, DUAL_TIMER_ACT_START_INTCLR);
2505 }
2506
2507 /**
2508 * @brief Clear the ioa action interrupt flag when timer value meets to COUNT_A1IO.
2509 *
2510 * Register|BitsName
2511 * --------|--------
2512 * IO_BLE_INTCLR | IOA_ACT_C1_INTCLR
2513 *
2514 * @param DUAL_TIMERx Timer instance
2515 * @retval None
2516 */
2517 __STATIC_INLINE void ll_dual_timer_clear_ioa_act_c1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2518 {
2519 WRITE_REG(DUAL_TIMERx->IO_BLE_INTCLR, DUAL_TIMER_IOA_ACT_C1_INTCLR);
2520 }
2521
2522 /**
2523 * @brief Clear the ioa action interrupt flag when timer value meets to COUNT_A2IO.
2524 *
2525 * Register|BitsName
2526 * --------|--------
2527 * IO_BLE_INTCLR | IOA_ACT_C2_INTCLR
2528 *
2529 * @param DUAL_TIMERx Timer instance
2530 * @retval None
2531 */
2532 __STATIC_INLINE void ll_dual_timer_clear_ioa_act_c2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2533 {
2534 WRITE_REG(DUAL_TIMERx->IO_BLE_INTCLR, DUAL_TIMER_IOA_ACT_C2_INTCLR);
2535 }
2536
2537 /**
2538 * @brief Clear the period action interrupt flag.
2539 *
2540 * Register|BitsName
2541 * --------|--------
2542 * IO_BLE_INTCLR | ACT_PERIOD_INTCLR
2543 *
2544 * @param DUAL_TIMERx Timer instance
2545 * @retval None
2546 */
2547 __STATIC_INLINE void ll_dual_timer_clear_act_period_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2548 {
2549 WRITE_REG(DUAL_TIMERx->IO_BLE_INTCLR, DUAL_TIMER_ACT_PERIOD_INTCLR);
2550 }
2551
2552 /**
2553 * @brief Clear the stop action interrupt flag.
2554 *
2555 * Register|BitsName
2556 * --------|--------
2557 * IO_BLE_INTCLR | ACT_STOP_INTCLR
2558 *
2559 * @param DUAL_TIMERx Timer instance
2560 * @retval None
2561 */
2562 __STATIC_INLINE void ll_dual_timer_clear_act_stop_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2563 {
2564 WRITE_REG(DUAL_TIMERx->IO_BLE_INTCLR, DUAL_TIMER_ACT_STOP_INTCLR);
2565 }
2566
2567 /**
2568 * @brief Clear the iob action interrupt flag when timer value meets to COUNT_B1IO.
2569 *
2570 * Register|BitsName
2571 * --------|--------
2572 * IO_BLE_INTCLR | IOB_ACT_C1_INTCLR
2573 *
2574 * @param DUAL_TIMERx Timer instance
2575 * @retval None
2576 */
2577 __STATIC_INLINE void ll_dual_timer_clear_iob_act_c1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2578 {
2579 WRITE_REG(DUAL_TIMERx->IO_BLE_INTCLR, DUAL_TIMER_IOB_ACT_C1_INTCLR);
2580 }
2581
2582 /**
2583 * @brief Clear the iob action interrupt flag when timer value meets to COUNT_B2IO.
2584 *
2585 * Register|BitsName
2586 * --------|--------
2587 * IO_BLE_INTCLR | IOB_ACT_C2_INTCLR
2588 *
2589 * @param DUAL_TIMERx Timer instance
2590 * @retval None
2591 */
2592 __STATIC_INLINE void ll_dual_timer_clear_iob_act_c2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2593 {
2594 WRITE_REG(DUAL_TIMERx->IO_BLE_INTCLR, DUAL_TIMER_IOB_ACT_C2_INTCLR);
2595 }
2596
2597 /**
2598 * @brief Clear the ioc action interrupt flag when timer value meets to COUNT_C1IO.
2599 *
2600 * Register|BitsName
2601 * --------|--------
2602 * IO_BLE_INTCLR | IOC_ACT_C1_INTCLR
2603 *
2604 * @param DUAL_TIMERx Timer instance
2605 * @retval None
2606 */
2607 __STATIC_INLINE void ll_dual_timer_clear_ioc_act_c1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2608 {
2609 WRITE_REG(DUAL_TIMERx->IO_BLE_INTCLR, DUAL_TIMER_IOC_ACT_C1_INTCLR);
2610 }
2611
2612 /**
2613 * @brief Clear the ioc action interrupt flag when timer value meets to COUNT_C2IO.
2614 *
2615 * Register|BitsName
2616 * --------|--------
2617 * IO_BLE_INTCLR | IOC_ACT_C2_INTCLR
2618 *
2619 * @param DUAL_TIMERx Timer instance
2620 * @retval None
2621 */
2622 __STATIC_INLINE void ll_dual_timer_clear_ioc_act_c2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2623 {
2624 WRITE_REG(DUAL_TIMERx->IO_BLE_INTCLR, DUAL_TIMER_IOC_ACT_C2_INTCLR);
2625 }
2626
2627 /**
2628 * @brief Clear the interrupt flag when timer value meets to BLE_COUNT1.
2629 *
2630 * Register|BitsName
2631 * --------|--------
2632 * IO_BLE_INTCLR | BLEPULSE1_INTCLR
2633 *
2634 * @param DUAL_TIMERx Timer instance
2635 * @retval None
2636 */
2637 __STATIC_INLINE void ll_dual_timer_clear_ble_pulse1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2638 {
2639 WRITE_REG(DUAL_TIMERx->IO_BLE_INTCLR, DUAL_TIMER_BLEPULSE1_INTCLR);
2640 }
2641
2642 /**
2643 * @brief Clear the interrupt flag when timer value meets to BLE_COUNT2.
2644 *
2645 * Register|BitsName
2646 * --------|--------
2647 * IO_BLE_INTCLR | BLEPULSE2_INTCLR
2648 *
2649 * @param DUAL_TIMERx Timer instance
2650 * @retval None
2651 */
2652 __STATIC_INLINE void ll_dual_timer_clear_ble_pulse2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2653 {
2654 WRITE_REG(DUAL_TIMERx->IO_BLE_INTCLR, DUAL_TIMER_BLEPULSE2_INTCLR);
2655 }
2656
2657 /**
2658 * @brief Clear all of the io action interrupt flag.
2659 *
2660 * Register|BitsName
2661 * --------|--------
2662 * IO_BLE_INTCLR | ACT_ALL_INTCLR
2663 *
2664 * @param DUAL_TIMERx Timer instance
2665 * @retval None
2666 */
2667 __STATIC_INLINE void ll_dual_timer_clear_act_all_flag_it(dual_timer_regs_t *DUAL_TIMERx)
2668 {
2669 WRITE_REG(DUAL_TIMERx->IO_BLE_INTCLR, DUAL_TIMER_IO_ACT_ALL_INTCLR);
2670 }
2671 /** @} */
2672
2673 /** @defgroup DUAL_TIMER_LL_EF_Init Initialization and de-initialization functions
2674 * @{
2675 */
2676
2677 /**
2678 * @brief De-initialize DUAL_TIMER registers (Registers restored to their default values).
2679 * @param DUAL_TIMERx DUAL_TIM instance
2680 * @retval An error_status_t enumeration value:
2681 * - SUCCESS: DUAL_TIMER registers are de-initialized
2682 * - ERROR: DUAL_TIMER registers are not de-initialized
2683 */
2684 error_status_t ll_dual_timer_deinit(dual_timer_regs_t *DUAL_TIMERx);
2685
2686 /**
2687 * @brief Initialize DUAL_TIMER registers according to the specified
2688 * parameters in p_dual_timer_init.
2689 * @param DUAL_TIMERx DUAL_TIMER instance
2690 * @param p_dual_timer_init Pointer to a ll_dual_timer_init_t structure that contains the configuration
2691 * information for the specified DUAL_TIMER peripheral.
2692 * @retval An error_status_t enumeration value:
2693 * - SUCCESS: DUAL_TIMER registers are initialized according to p_dual_timer_init content
2694 * - ERROR: Problem occurred during DUAL_TIM Registers initialization
2695 */
2696 error_status_t ll_dual_timer_init(dual_timer_regs_t *DUAL_TIMERx, ll_dual_timer_init_t *p_dual_timer_init);
2697
2698 /** @} */
2699
2700 /** @} */
2701
2702
2703 #endif /* DUAL_TIMER0 || DUAL_TIMER1 */
2704
2705 #ifdef __cplusplus
2706 }
2707 #endif
2708
2709 #endif /* __GR533X_LL_DUAL_TIMER_H__ */
2710
2711 /** @} */
2712
2713 /** @} */
2714
2715 /** @} */
ll_dual_timer_clear_act_period_flag_it
__STATIC_INLINE void ll_dual_timer_clear_act_period_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Clear the period action interrupt flag.
Definition: gr533x_ll_dual_tim.h:2547
ll_dual_timer_set_ioa_action_count1
__STATIC_INLINE void ll_dual_timer_set_ioa_action_count1(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
Set ioa action when value meets to COUNT_A1IO.
Definition: gr533x_ll_dual_tim.h:925
ll_dual_timer_enable_it
__STATIC_INLINE void ll_dual_timer_enable_it(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer interrupt.
Definition: gr533x_ll_dual_tim.h:1731
ll_dual_timer_get_ioa_action_stop
__STATIC_INLINE uint32_t ll_dual_timer_get_ioa_action_stop(dual_timer_regs_t *DUAL_TIMERx)
Get ioa action when timer stop.
Definition: gr533x_ll_dual_tim.h:1061
ll_dual_timer_init_t
struct _ll_dual_timer_init ll_dual_timer_init_t
LL DUAL TIMER init Structure definition.
ll_dual_timer_clear_ioc_act_c1_flag_it
__STATIC_INLINE void ll_dual_timer_clear_ioc_act_c1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Clear the ioc action interrupt flag when timer value meets to COUNT_C1IO.
Definition: gr533x_ll_dual_tim.h:2607
ll_dual_timer_disable_act_period_it
__STATIC_INLINE void ll_dual_timer_disable_act_period_it(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer action interrupt when timer value meets to 0.
Definition: gr533x_ll_dual_tim.h:1926
ll_dual_timer_is_ioc_action_c2_flag_it
__STATIC_INLINE uint32_t ll_dual_timer_is_ioc_action_c2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether action interrupt flag is set when timer value meets to COUNT_C2IO.
Definition: gr533x_ll_dual_tim.h:2457
ll_dual_timer_set_ioc_action_start
__STATIC_INLINE void ll_dual_timer_set_ioc_action_start(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
Set ioc action when timer start.
Definition: gr533x_ll_dual_tim.h:1276
ll_dual_timer_disable_ioa_act_c2_it
__STATIC_INLINE void ll_dual_timer_disable_ioa_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer action interrupt when timer value meets to COUNT_A2IO.
Definition: gr533x_ll_dual_tim.h:1881
ll_dual_timer_set_iob_action_stop
__STATIC_INLINE void ll_dual_timer_set_iob_action_stop(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
Set iob action when timer stop.
Definition: gr533x_ll_dual_tim.h:1237
ll_dual_timer_get_raw_it_flag
__STATIC_INLINE uint32_t ll_dual_timer_get_raw_it_flag(dual_timer_regs_t *DUAL_TIMERx)
Get Dual_timer raw interrupt flags.
Definition: gr533x_ll_dual_tim.h:2307
ll_dual_timer_disable_ble_ctrl
__STATIC_INLINE void ll_dual_timer_disable_ble_ctrl(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer BLE ctrl.
Definition: gr533x_ll_dual_tim.h:665
ll_dual_timer_is_ble_pulse1_flag_it
__STATIC_INLINE uint32_t ll_dual_timer_is_ble_pulse1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether interrupt flag is set when timer value meets to BLE_COUNT1.
Definition: gr533x_ll_dual_tim.h:2472
ll_dual_timer_set_ble_count2
__STATIC_INLINE void ll_dual_timer_set_ble_count2(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
Set the BLE count 2 value.
Definition: gr533x_ll_dual_tim.h:1634
ll_dual_timer_disable_act_stop_it
__STATIC_INLINE void ll_dual_timer_disable_act_stop_it(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer action interrupt when timer stop.
Definition: gr533x_ll_dual_tim.h:1971
ll_dual_timer_set_iob_action_init
__STATIC_INLINE void ll_dual_timer_set_iob_action_init(dual_timer_regs_t *DUAL_TIMERx, uint32_t value)
Set iob initial vaule when DUAL_TIMER_CTRL_IOB is disable.
Definition: gr533x_ll_dual_tim.h:1504
ll_dual_timer_get_iob_action_start
__STATIC_INLINE uint32_t ll_dual_timer_get_iob_action_start(dual_timer_regs_t *DUAL_TIMERx)
Get iob action when timer start.
Definition: gr533x_ll_dual_tim.h:1100
ll_dual_timer_get_counter_mode
__STATIC_INLINE uint32_t ll_dual_timer_get_counter_mode(dual_timer_regs_t *DUAL_TIMERx)
Get the counter mode.
Definition: gr533x_ll_dual_tim.h:305
ll_dual_timer_set_iob_action_count2
__STATIC_INLINE void ll_dual_timer_set_iob_action_count2(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
Set iob action when value meets to COUNT_B2IO.
Definition: gr533x_ll_dual_tim.h:1159
ll_dual_timer_get_iob_action_stop
__STATIC_INLINE uint32_t ll_dual_timer_get_iob_action_stop(dual_timer_regs_t *DUAL_TIMERx)
Get iob action when timer stop.
Definition: gr533x_ll_dual_tim.h:1256
ll_dual_timer_is_active_flag_it
__STATIC_INLINE uint32_t ll_dual_timer_is_active_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether interrupt flag (INTSTAT) is set (interrupt is pending).
Definition: gr533x_ll_dual_tim.h:2292
ll_dual_timer_clear_act_start_flag_it
__STATIC_INLINE void ll_dual_timer_clear_act_start_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Clear the start action interrupt flag.
Definition: gr533x_ll_dual_tim.h:2502
ll_dual_timer_enable_iob_ctrl
__STATIC_INLINE void ll_dual_timer_enable_iob_ctrl(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer IOB ctrl.
Definition: gr533x_ll_dual_tim.h:560
ll_dual_timer_clear_act_all_flag_it
__STATIC_INLINE void ll_dual_timer_clear_act_all_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Clear all of the io action interrupt flag.
Definition: gr533x_ll_dual_tim.h:2667
ll_dual_timer_disable_it
__STATIC_INLINE void ll_dual_timer_disable_it(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer interrput.
Definition: gr533x_ll_dual_tim.h:1746
ll_dual_timer_disable_iob_act_c1_it
__STATIC_INLINE void ll_dual_timer_disable_iob_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer action interrupt when timer value meets to COUNT_B1IO.
Definition: gr533x_ll_dual_tim.h:2016
ll_dual_timer_enable_ioa_act_c2_it
__STATIC_INLINE void ll_dual_timer_enable_ioa_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer action interrupt when timer value meets to COUNT_A2IO.
Definition: gr533x_ll_dual_tim.h:1866
ll_dual_timer_set_prescaler
__STATIC_INLINE void ll_dual_timer_set_prescaler(dual_timer_regs_t *DUAL_TIMERx, uint32_t prescaler)
Set the prescaler.
Definition: gr533x_ll_dual_tim.h:324
ll_dual_timer_is_enabled_iob_act_c2_it
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_iob_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer action interrupt when timer value meets to COUNT_B2IO is enabled.
Definition: gr533x_ll_dual_tim.h:2076
ll_dual_timer_clear_iob_act_c2_flag_it
__STATIC_INLINE void ll_dual_timer_clear_iob_act_c2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Clear the iob action interrupt flag when timer value meets to COUNT_B2IO.
Definition: gr533x_ll_dual_tim.h:2592
ll_dual_timer_clear_ioa_act_c1_flag_it
__STATIC_INLINE void ll_dual_timer_clear_ioa_act_c1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Clear the ioa action interrupt flag when timer value meets to COUNT_A1IO.
Definition: gr533x_ll_dual_tim.h:2517
_ll_dual_timer_init::prescaler
uint32_t prescaler
Definition: gr533x_ll_dual_tim.h:78
ll_dual_timer_set_auto_reload
__STATIC_INLINE void ll_dual_timer_set_auto_reload(dual_timer_regs_t *DUAL_TIMERx, uint32_t auto_reload)
Set the auto-reload value.
Definition: gr533x_ll_dual_tim.h:454
ll_dual_timer_is_enabled_ioc_ctrl
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ioc_ctrl(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer IOC ctrl is enabled.
Definition: gr533x_ll_dual_tim.h:635
ll_dual_timer_set_ioa_action_start
__STATIC_INLINE void ll_dual_timer_set_ioa_action_start(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
Set ioa action when timer start.
Definition: gr533x_ll_dual_tim.h:886
ll_dual_timer_is_enabled_ioc_act_c2_it
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ioc_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer action interrupt when timer value meets to COUNT_C2IO is enabled.
Definition: gr533x_ll_dual_tim.h:2166
ll_dual_timer_disable_ioc_act_c2_it
__STATIC_INLINE void ll_dual_timer_disable_ioc_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer action interrupt when timer value meets to COUNT_C2IO.
Definition: gr533x_ll_dual_tim.h:2151
ll_dual_timer_set_iob_count1
__STATIC_INLINE void ll_dual_timer_set_iob_count1(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
Set the iob count 1 value.
Definition: gr533x_ll_dual_tim.h:758
ll_dual_timer_enable_counter
__STATIC_INLINE void ll_dual_timer_enable_counter(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer counter.
Definition: gr533x_ll_dual_tim.h:240
ll_dual_timer_enable_ble_ctrl
__STATIC_INLINE void ll_dual_timer_enable_ble_ctrl(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer BLE ctrl.
Definition: gr533x_ll_dual_tim.h:650
ll_dual_timer_disable_ioa_ctrl
__STATIC_INLINE void ll_dual_timer_disable_ioa_ctrl(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer IOA ctrl.
Definition: gr533x_ll_dual_tim.h:530
ll_dual_timer_set_ioc_action_stop
__STATIC_INLINE void ll_dual_timer_set_ioc_action_stop(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
Set ioc action when timer stop.
Definition: gr533x_ll_dual_tim.h:1432
ll_dual_timer_get_prescaler
__STATIC_INLINE uint32_t ll_dual_timer_get_prescaler(dual_timer_regs_t *DUAL_TIMERx)
Get the prescaler.
Definition: gr533x_ll_dual_tim.h:342
ll_dual_timer_get_ble_pulse_width
__STATIC_INLINE uint32_t ll_dual_timer_get_ble_pulse_width(dual_timer_regs_t *DUAL_TIMERx)
Get the BLE pulse width.
Definition: gr533x_ll_dual_tim.h:1680
ll_dual_timer_is_enabled_act_start_it
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_act_start_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer action interrupt when timer start is enabled.
Definition: gr533x_ll_dual_tim.h:1806
ll_dual_timer_get_onetime_reload
__STATIC_INLINE uint32_t ll_dual_timer_get_onetime_reload(dual_timer_regs_t *DUAL_TIMERx)
Get the one-time reload value.
Definition: gr533x_ll_dual_tim.h:1587
ll_dual_timer_set_ioc_action_count1
__STATIC_INLINE void ll_dual_timer_set_ioc_action_count1(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
Set ioc action when value meets to COUNT_C1IO.
Definition: gr533x_ll_dual_tim.h:1315
ll_dual_timer_clear_act_stop_flag_it
__STATIC_INLINE void ll_dual_timer_clear_act_stop_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Clear the stop action interrupt flag.
Definition: gr533x_ll_dual_tim.h:2562
ll_dual_timer_init
error_status_t ll_dual_timer_init(dual_timer_regs_t *DUAL_TIMERx, ll_dual_timer_init_t *p_dual_timer_init)
Initialize DUAL_TIMER registers according to the specified parameters in p_dual_timer_init.
ll_dual_timer_clear_flag_it
__STATIC_INLINE void ll_dual_timer_clear_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Clear the interrupt flag (INTSTAT).
Definition: gr533x_ll_dual_tim.h:2277
ll_dual_timer_get_ioa_action_start
__STATIC_INLINE uint32_t ll_dual_timer_get_ioa_action_start(dual_timer_regs_t *DUAL_TIMERx)
Get ioa action when timer start.
Definition: gr533x_ll_dual_tim.h:905
ll_dual_timer_enable_ioc_act_c2_it
__STATIC_INLINE void ll_dual_timer_enable_ioc_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer action interrupt when timer value meets to COUNT_C2IO.
Definition: gr533x_ll_dual_tim.h:2136
ll_dual_timer_get_iob_count2
__STATIC_INLINE uint32_t ll_dual_timer_get_iob_count2(dual_timer_regs_t *DUAL_TIMERx)
Get the iob count 2 value.
Definition: gr533x_ll_dual_tim.h:804
ll_dual_timer_disable_oneshot
__STATIC_INLINE void ll_dual_timer_disable_oneshot(dual_timer_regs_t *DUAL_TIMERx)
Disable one-shot mode.
Definition: gr533x_ll_dual_tim.h:407
ll_dual_timer_get_it_flag
__STATIC_INLINE uint32_t ll_dual_timer_get_it_flag(dual_timer_regs_t *DUAL_TIMERx)
Get dual timer interrupt flag.
Definition: gr533x_ll_dual_tim.h:2322
ll_dual_timer_get_ioa_action_init
__STATIC_INLINE uint32_t ll_dual_timer_get_ioa_action_init(dual_timer_regs_t *DUAL_TIMERx)
Get ioa initial vaule.
Definition: gr533x_ll_dual_tim.h:1486
ll_dual_timer_disable_ioc_act_c1_it
__STATIC_INLINE void ll_dual_timer_disable_ioc_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer action interrupt when timer value meets to COUNT_C1IO.
Definition: gr533x_ll_dual_tim.h:2106
ll_dual_timer_is_enabled_ioa_ctrl
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ioa_ctrl(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer IOA ctrl is enabled.
Definition: gr533x_ll_dual_tim.h:545
ll_dual_timer_set_counter_mode
__STATIC_INLINE void ll_dual_timer_set_counter_mode(dual_timer_regs_t *DUAL_TIMERx, uint32_t counter_mode)
Set the counter mode.
Definition: gr533x_ll_dual_tim.h:288
ll_dual_timer_get_ioa_count2
__STATIC_INLINE uint32_t ll_dual_timer_get_ioa_count2(dual_timer_regs_t *DUAL_TIMERx)
Get the ioa count 2 value.
Definition: gr533x_ll_dual_tim.h:742
ll_dual_timer_set_ioc_count1
__STATIC_INLINE void ll_dual_timer_set_ioc_count1(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
Set the ioc count 1 value.
Definition: gr533x_ll_dual_tim.h:820
ll_dual_timer_set_background_reload
__STATIC_INLINE void ll_dual_timer_set_background_reload(dual_timer_regs_t *DUAL_TIMERx, uint32_t background_reload)
Set the backgroud-reload value.
Definition: gr533x_ll_dual_tim.h:485
ll_dual_timer_get_ble_count2
__STATIC_INLINE uint32_t ll_dual_timer_get_ble_count2(dual_timer_regs_t *DUAL_TIMERx)
Get the BLE count 2 value.
Definition: gr533x_ll_dual_tim.h:1649
ll_dual_timer_disable_ble_pulse1_it
__STATIC_INLINE void ll_dual_timer_disable_ble_pulse1_it(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer interrupt when timer value meets to BLE_COUNT1.
Definition: gr533x_ll_dual_tim.h:2196
ll_dual_timer_enable_iob_act_c2_it
__STATIC_INLINE void ll_dual_timer_enable_iob_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer action interrupt when timer value meets to COUNT_B2IO.
Definition: gr533x_ll_dual_tim.h:2046
ll_dual_timer_enable_act_stop_it
__STATIC_INLINE void ll_dual_timer_enable_act_stop_it(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer action interrupt when timer stop.
Definition: gr533x_ll_dual_tim.h:1956
ll_dual_timer_is_ioc_action_c1_flag_it
__STATIC_INLINE uint32_t ll_dual_timer_is_ioc_action_c1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether action interrupt flag is set when timer value meets to COUNT_C1IO.
Definition: gr533x_ll_dual_tim.h:2442
ll_dual_timer_get_iob_action_period
__STATIC_INLINE uint32_t ll_dual_timer_get_iob_action_period(dual_timer_regs_t *DUAL_TIMERx)
Get iob action when value downs to 0.
Definition: gr533x_ll_dual_tim.h:1217
ll_dual_timer_is_enabled_act_stop_it
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_act_stop_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer action interrupt when timer stop.
Definition: gr533x_ll_dual_tim.h:1986
ll_dual_timer_is_ioa_action_c1_flag_it
__STATIC_INLINE uint32_t ll_dual_timer_is_ioa_action_c1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether action interrupt flag is set when timer value meets to COUNT_A1IO.
Definition: gr533x_ll_dual_tim.h:2352
ll_dual_timer_is_enabled_iob_act_c1_it
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_iob_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer action interrupt when timer value meets to COUNT_B1IO is enabled.
Definition: gr533x_ll_dual_tim.h:2031
ll_dual_timer_enable_ble_pulse1_it
__STATIC_INLINE void ll_dual_timer_enable_ble_pulse1_it(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer interrupt when timer value meets to BLE_COUNT1.
Definition: gr533x_ll_dual_tim.h:2181
ll_dual_timer_get_ioc_count2
__STATIC_INLINE uint32_t ll_dual_timer_get_ioc_count2(dual_timer_regs_t *DUAL_TIMERx)
Get the ioc count 2 value.
Definition: gr533x_ll_dual_tim.h:866
ll_dual_timer_enable_oneshot
__STATIC_INLINE void ll_dual_timer_enable_oneshot(dual_timer_regs_t *DUAL_TIMERx)
Enable one-shot mode.
Definition: gr533x_ll_dual_tim.h:392
ll_dual_timer_set_iob_action_period
__STATIC_INLINE void ll_dual_timer_set_iob_action_period(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
Set iob action when value downs to 0.
Definition: gr533x_ll_dual_tim.h:1198
ll_dual_timer_is_enabled_it
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer interrput is enabled.
Definition: gr533x_ll_dual_tim.h:1761
ll_dual_timer_is_iob_action_c2_flag_it
__STATIC_INLINE uint32_t ll_dual_timer_is_iob_action_c2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether action interrupt flag is set when timer value meets to COUNT_B2IO.
Definition: gr533x_ll_dual_tim.h:2427
ll_dual_timer_set_iob_action_count1
__STATIC_INLINE void ll_dual_timer_set_iob_action_count1(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
Set iob action when value meets to COUNT_B1IO.
Definition: gr533x_ll_dual_tim.h:1120
ll_dual_timer_enable_ioa_ctrl
__STATIC_INLINE void ll_dual_timer_enable_ioa_ctrl(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer IOA ctrl.
Definition: gr533x_ll_dual_tim.h:515
ll_dual_timer_is_enabled_iob_ctrl
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_iob_ctrl(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer IOB ctrl is enabled.
Definition: gr533x_ll_dual_tim.h:590
ll_dual_timer_set_iob_action_start
__STATIC_INLINE void ll_dual_timer_set_iob_action_start(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
Set iob action when timer start.
Definition: gr533x_ll_dual_tim.h:1081
ll_dual_timer_clear_ioa_act_c2_flag_it
__STATIC_INLINE void ll_dual_timer_clear_ioa_act_c2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Clear the ioa action interrupt flag when timer value meets to COUNT_A2IO.
Definition: gr533x_ll_dual_tim.h:2532
ll_dual_timer_set_ioa_action_init
__STATIC_INLINE void ll_dual_timer_set_ioa_action_init(dual_timer_regs_t *DUAL_TIMERx, uint32_t value)
Set ioa initial vaule when DUAL_TIMER_CTRL_IOA is disable.
Definition: gr533x_ll_dual_tim.h:1469
ll_dual_timer_enable_ble_pulse2_it
__STATIC_INLINE void ll_dual_timer_enable_ble_pulse2_it(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer interrupt when timer value meets to BLE_COUNT2.
Definition: gr533x_ll_dual_tim.h:2226
ll_dual_timer_disable_ioc_ctrl
__STATIC_INLINE void ll_dual_timer_disable_ioc_ctrl(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer IOC ctrl.
Definition: gr533x_ll_dual_tim.h:620
ll_dual_timer_disable_ioa_act_c1_it
__STATIC_INLINE void ll_dual_timer_disable_ioa_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer action interrupt when timer value meets to COUNT_A1IO.
Definition: gr533x_ll_dual_tim.h:1836
ll_dual_timer_set_ioc_count2
__STATIC_INLINE void ll_dual_timer_set_ioc_count2(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
Set the ioc count 2 value.
Definition: gr533x_ll_dual_tim.h:851
ll_dual_timer_is_enabled_ioc_act_c1_it
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ioc_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer action interrupt when timer value meets to COUNT_C1IO is enabled.
Definition: gr533x_ll_dual_tim.h:2121
_ll_dual_timer_init::auto_reload
uint32_t auto_reload
Definition: gr533x_ll_dual_tim.h:93
ll_dual_timer_get_iob_action_init
__STATIC_INLINE uint32_t ll_dual_timer_get_iob_action_init(dual_timer_regs_t *DUAL_TIMERx)
Get iob initial vaule.
Definition: gr533x_ll_dual_tim.h:1521
ll_dual_timer_clear_iob_act_c1_flag_it
__STATIC_INLINE void ll_dual_timer_clear_iob_act_c1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Clear the iob action interrupt flag when timer value meets to COUNT_B1IO.
Definition: gr533x_ll_dual_tim.h:2577
ll_dual_timer_get_background_reload
__STATIC_INLINE uint32_t ll_dual_timer_get_background_reload(dual_timer_regs_t *DUAL_TIMERx)
Get the backgroud-reload value.
Definition: gr533x_ll_dual_tim.h:500
ll_dual_timer_get_ioa_action_count1
__STATIC_INLINE uint32_t ll_dual_timer_get_ioa_action_count1(dual_timer_regs_t *DUAL_TIMERx)
Get ioa action when value meets to COUNT_A1IO.
Definition: gr533x_ll_dual_tim.h:944
ll_dual_timer_enable_ioc_act_c1_it
__STATIC_INLINE void ll_dual_timer_enable_ioc_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer action interrupt when timer value meets to COUNT_C1IO.
Definition: gr533x_ll_dual_tim.h:2091
ll_dual_timer_get_counter
__STATIC_INLINE uint32_t ll_dual_timer_get_counter(dual_timer_regs_t *DUAL_TIMERx)
Get the counter value.
Definition: gr533x_ll_dual_tim.h:437
ll_dual_timer_enable_ioa_act_c1_it
__STATIC_INLINE void ll_dual_timer_enable_ioa_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer action interrupt when timer value meets to COUNT_A1IO.
Definition: gr533x_ll_dual_tim.h:1821
ll_dual_timer_set_onetime_reload
__STATIC_INLINE void ll_dual_timer_set_onetime_reload(dual_timer_regs_t *DUAL_TIMERx, uint32_t onetime_reload)
Set the one-time reload value.
Definition: gr533x_ll_dual_tim.h:1572
ll_dual_timer_is_enabled_oneshot
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_oneshot(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the one-shot mode is enabled.
Definition: gr533x_ll_dual_tim.h:422
ll_dual_timer_enable_act_period_it
__STATIC_INLINE void ll_dual_timer_enable_act_period_it(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer action interrupt when timer value meets to 0.
Definition: gr533x_ll_dual_tim.h:1911
ll_dual_timer_set_ioc_action_count2
__STATIC_INLINE void ll_dual_timer_set_ioc_action_count2(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
Set ioc action when value meets to COUNT_C2IO.
Definition: gr533x_ll_dual_tim.h:1354
ll_dual_timer_set_ioa_count2
__STATIC_INLINE void ll_dual_timer_set_ioa_count2(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
Set the ioa count 2 value.
Definition: gr533x_ll_dual_tim.h:727
ll_dual_timer_get_ioa_count1
__STATIC_INLINE uint32_t ll_dual_timer_get_ioa_count1(dual_timer_regs_t *DUAL_TIMERx)
Get the ioa count 1 value.
Definition: gr533x_ll_dual_tim.h:711
ll_dual_timer_clear_ioc_act_c2_flag_it
__STATIC_INLINE void ll_dual_timer_clear_ioc_act_c2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Clear the ioc action interrupt flag when timer value meets to COUNT_C2IO.
Definition: gr533x_ll_dual_tim.h:2622
_ll_dual_timer_init
LL DUAL TIMER init Structure definition.
Definition: gr533x_ll_dual_tim.h:77
ll_dual_timer_clear_ble_pulse2_flag_it
__STATIC_INLINE void ll_dual_timer_clear_ble_pulse2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Clear the interrupt flag when timer value meets to BLE_COUNT2.
Definition: gr533x_ll_dual_tim.h:2652
ll_dual_timer_set_ble_count1
__STATIC_INLINE void ll_dual_timer_set_ble_count1(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
Set the BLE count 1 value.
Definition: gr533x_ll_dual_tim.h:1603
_ll_dual_timer_init::counter_size
uint32_t counter_size
Definition: gr533x_ll_dual_tim.h:83
ll_dual_timer_set_period_count
__STATIC_INLINE void ll_dual_timer_set_period_count(dual_timer_regs_t *DUAL_TIMERx, uint32_t count)
Set the period count in period mode.
Definition: gr533x_ll_dual_tim.h:1696
ll_dual_timer_disable_ble_pulse2_it
__STATIC_INLINE void ll_dual_timer_disable_ble_pulse2_it(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer interrupt when timer value meets to BLE_COUNT2.
Definition: gr533x_ll_dual_tim.h:2241
_ll_dual_timer_init::counter_mode
uint32_t counter_mode
Definition: gr533x_ll_dual_tim.h:88
ll_dual_timer_enable_ioc_ctrl
__STATIC_INLINE void ll_dual_timer_enable_ioc_ctrl(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer IOC ctrl.
Definition: gr533x_ll_dual_tim.h:605
ll_dual_timer_get_iob_action_count2
__STATIC_INLINE uint32_t ll_dual_timer_get_iob_action_count2(dual_timer_regs_t *DUAL_TIMERx)
Get iob action when value meets to COUNT_B2IO.
Definition: gr533x_ll_dual_tim.h:1178
ll_dual_timer_get_ioc_action_count1
__STATIC_INLINE uint32_t ll_dual_timer_get_ioc_action_count1(dual_timer_regs_t *DUAL_TIMERx)
Get ioc action when value meets to COUNT_C1IO.
Definition: gr533x_ll_dual_tim.h:1334
ll_dual_timer_disable_iob_ctrl
__STATIC_INLINE void ll_dual_timer_disable_iob_ctrl(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer IOB ctrl.
Definition: gr533x_ll_dual_tim.h:575
ll_dual_timer_is_enabled_counter
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_counter(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer counter is enabled.
Definition: gr533x_ll_dual_tim.h:270
ll_dual_timer_get_ioc_action_init
__STATIC_INLINE uint32_t ll_dual_timer_get_ioc_action_init(dual_timer_regs_t *DUAL_TIMERx)
Get ioc initial vaule.
Definition: gr533x_ll_dual_tim.h:1556
ll_dual_timer_disable_act_start_it
__STATIC_INLINE void ll_dual_timer_disable_act_start_it(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer action interrupt when timer start.
Definition: gr533x_ll_dual_tim.h:1791
ll_dual_timer_is_enabled_ioa_act_c1_it
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ioa_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer action interrupt when timer value meets to COUNT_A1IO is enabled.
Definition: gr533x_ll_dual_tim.h:1851
ll_dual_timer_is_enabled_ble_pulse1_it
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ble_pulse1_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer interrupt when timer value meets to BLE_COUNT1 is enabled.
Definition: gr533x_ll_dual_tim.h:2211
ll_dual_timer_is_ble_pulse2_flag_it
__STATIC_INLINE uint32_t ll_dual_timer_is_ble_pulse2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether interrupt flag is set when timer value meets to BLE_COUNT2.
Definition: gr533x_ll_dual_tim.h:2487
ll_dual_timer_get_ioc_action_start
__STATIC_INLINE uint32_t ll_dual_timer_get_ioc_action_start(dual_timer_regs_t *DUAL_TIMERx)
Get ioc action when timer start.
Definition: gr533x_ll_dual_tim.h:1295
ll_dual_timer_set_ioc_action_init
__STATIC_INLINE void ll_dual_timer_set_ioc_action_init(dual_timer_regs_t *DUAL_TIMERx, uint32_t value)
Set ioc initial vaule when DUAL_TIMER_CTRL_IOC is disable.
Definition: gr533x_ll_dual_tim.h:1539
ll_dual_timer_clear_ble_pulse1_flag_it
__STATIC_INLINE void ll_dual_timer_clear_ble_pulse1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Clear the interrupt flag when timer value meets to BLE_COUNT1.
Definition: gr533x_ll_dual_tim.h:2637
ll_dual_timer_is_action_start_flag_it
__STATIC_INLINE uint32_t ll_dual_timer_is_action_start_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether action interrupt flag is set when timer start.
Definition: gr533x_ll_dual_tim.h:2337
ll_dual_timer_is_enabled_act_period_it
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_act_period_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer action interrupt when timer value meets to 0 is enabled.
Definition: gr533x_ll_dual_tim.h:1941
ll_dual_timer_enable_iob_act_c1_it
__STATIC_INLINE void ll_dual_timer_enable_iob_act_c1_it(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer action interrupt when timer value meets to COUNT_B1IO.
Definition: gr533x_ll_dual_tim.h:2001
ll_dual_timer_get_ioc_count1
__STATIC_INLINE uint32_t ll_dual_timer_get_ioc_count1(dual_timer_regs_t *DUAL_TIMERx)
Get the ioc count 1 value.
Definition: gr533x_ll_dual_tim.h:835
ll_dual_timer_get_ioc_action_stop
__STATIC_INLINE uint32_t ll_dual_timer_get_ioc_action_stop(dual_timer_regs_t *DUAL_TIMERx)
Get ioc action when timer stop.
Definition: gr533x_ll_dual_tim.h:1451
ll_dual_timer_get_iob_count1
__STATIC_INLINE uint32_t ll_dual_timer_get_iob_count1(dual_timer_regs_t *DUAL_TIMERx)
Get the iob count 1 value.
Definition: gr533x_ll_dual_tim.h:773
ll_dual_timer_disable_iob_act_c2_it
__STATIC_INLINE void ll_dual_timer_disable_iob_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer action interrupt when timer value meets to COUNT_B2IO.
Definition: gr533x_ll_dual_tim.h:2061
ll_dual_timer_disable_counter
__STATIC_INLINE void ll_dual_timer_disable_counter(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer counter.
Definition: gr533x_ll_dual_tim.h:255
ll_dual_timer_get_ioc_action_count2
__STATIC_INLINE uint32_t ll_dual_timer_get_ioc_action_count2(dual_timer_regs_t *DUAL_TIMERx)
Get ioc action when value meets to COUNT_C2IO.
Definition: gr533x_ll_dual_tim.h:1373
ll_dual_timer_get_period_count
__STATIC_INLINE uint32_t ll_dual_timer_get_period_count(dual_timer_regs_t *DUAL_TIMERx)
Get the period count in period mode.
Definition: gr533x_ll_dual_tim.h:1711
ll_dual_timer_set_ioa_action_stop
__STATIC_INLINE void ll_dual_timer_set_ioa_action_stop(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
Set ioa action when timer stop.
Definition: gr533x_ll_dual_tim.h:1042
ll_dual_timer_is_ioa_action_c2_flag_it
__STATIC_INLINE uint32_t ll_dual_timer_is_ioa_action_c2_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether action interrupt flag is set when timer value meets to COUNT_A2IO.
Definition: gr533x_ll_dual_tim.h:2367
ll_dual_timer_get_auto_reload
__STATIC_INLINE uint32_t ll_dual_timer_get_auto_reload(dual_timer_regs_t *DUAL_TIMERx)
Get the auto-reload value.
Definition: gr533x_ll_dual_tim.h:469
ll_dual_timer_get_ble_count1
__STATIC_INLINE uint32_t ll_dual_timer_get_ble_count1(dual_timer_regs_t *DUAL_TIMERx)
Get the BLE count 1 value.
Definition: gr533x_ll_dual_tim.h:1618
ll_dual_timer_set_ioa_action_period
__STATIC_INLINE void ll_dual_timer_set_ioa_action_period(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
Set ioa action when value downs to 0.
Definition: gr533x_ll_dual_tim.h:1003
ll_dual_timer_is_enabled_ble_pulse2_it
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ble_pulse2_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer interrupt when timer value meets to BLE_COUNT2 is enabled.
Definition: gr533x_ll_dual_tim.h:2256
ll_dual_timer_is_action_stop_flag_it
__STATIC_INLINE uint32_t ll_dual_timer_is_action_stop_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether action interrupt flag is set when timer stop.
Definition: gr533x_ll_dual_tim.h:2397
ll_dual_timer_is_action_period_flag_it
__STATIC_INLINE uint32_t ll_dual_timer_is_action_period_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether action interrupt flag is set when timer value meets to 0.
Definition: gr533x_ll_dual_tim.h:2382
ll_dual_timer_get_ioc_action_period
__STATIC_INLINE uint32_t ll_dual_timer_get_ioc_action_period(dual_timer_regs_t *DUAL_TIMERx)
Get ioc action when value downs to 0.
Definition: gr533x_ll_dual_tim.h:1412
ll_dual_timer_is_iob_action_c1_flag_it
__STATIC_INLINE uint32_t ll_dual_timer_is_iob_action_c1_flag_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether action interrupt flag is set when timer value meets to COUNT_B1IO.
Definition: gr533x_ll_dual_tim.h:2412
ll_dual_timer_get_ioa_action_count2
__STATIC_INLINE uint32_t ll_dual_timer_get_ioa_action_count2(dual_timer_regs_t *DUAL_TIMERx)
Get ioa action when value meets to COUNT_A2IO.
Definition: gr533x_ll_dual_tim.h:983
ll_dual_timer_set_ioc_action_period
__STATIC_INLINE void ll_dual_timer_set_ioc_action_period(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
Set ioc action when value downs to 0.
Definition: gr533x_ll_dual_tim.h:1393
ll_dual_timer_set_counter_size
__STATIC_INLINE void ll_dual_timer_set_counter_size(dual_timer_regs_t *DUAL_TIMERx, uint32_t counter_size)
Set the counter size.
Definition: gr533x_ll_dual_tim.h:360
ll_dual_timer_is_enabled_ioa_act_c2_it
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ioa_act_c2_it(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer action interrupt when timer value meets to COUNT_A2IO is enabled.
Definition: gr533x_ll_dual_tim.h:1896
ll_dual_timer_set_ioa_count1
__STATIC_INLINE void ll_dual_timer_set_ioa_count1(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
Set the ioa count 1 value.
Definition: gr533x_ll_dual_tim.h:696
ll_dual_timer_get_counter_size
__STATIC_INLINE uint32_t ll_dual_timer_get_counter_size(dual_timer_regs_t *DUAL_TIMERx)
Get the counter size.
Definition: gr533x_ll_dual_tim.h:377
ll_dual_timer_is_enabled_ble_ctrl
__STATIC_INLINE uint32_t ll_dual_timer_is_enabled_ble_ctrl(dual_timer_regs_t *DUAL_TIMERx)
Indicate whether the dual_timer BLE ctrl is enabled.
Definition: gr533x_ll_dual_tim.h:680
ll_dual_timer_deinit
error_status_t ll_dual_timer_deinit(dual_timer_regs_t *DUAL_TIMERx)
De-initialize DUAL_TIMER registers (Registers restored to their default values).
ll_dual_timer_set_ble_pulse_width
__STATIC_INLINE void ll_dual_timer_set_ble_pulse_width(dual_timer_regs_t *DUAL_TIMERx, uint32_t width)
Set the BLE pulse width.
Definition: gr533x_ll_dual_tim.h:1665
ll_dual_timer_set_iob_count2
__STATIC_INLINE void ll_dual_timer_set_iob_count2(dual_timer_regs_t *DUAL_TIMERx, uint32_t count_value)
Set the iob count 2 value.
Definition: gr533x_ll_dual_tim.h:789
ll_dual_timer_get_ioa_action_period
__STATIC_INLINE uint32_t ll_dual_timer_get_ioa_action_period(dual_timer_regs_t *DUAL_TIMERx)
Get ioa action when value downs to 0.
Definition: gr533x_ll_dual_tim.h:1022
ll_dual_timer_get_iob_action_count1
__STATIC_INLINE uint32_t ll_dual_timer_get_iob_action_count1(dual_timer_regs_t *DUAL_TIMERx)
Get iob action when value meets to COUNT_B1IO.
Definition: gr533x_ll_dual_tim.h:1139
ll_dual_timer_enable_act_start_it
__STATIC_INLINE void ll_dual_timer_enable_act_start_it(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer action interrupt when timer start.
Definition: gr533x_ll_dual_tim.h:1776
ll_dual_timer_set_ioa_action_count2
__STATIC_INLINE void ll_dual_timer_set_ioa_action_count2(dual_timer_regs_t *DUAL_TIMERx, uint32_t action)
Set ioa action when value meets to COUNT_A2IO.
Definition: gr533x_ll_dual_tim.h:964