gr55xx_ll_dual_tim.h
Go to the documentation of this file.
1 /**
2 ****************************************************************************************
3 *
4 * @file gr55xx_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 __GR55XX_LL_DUAL_TIMER_H__
53 #define __GR55XX_LL_DUAL_TIMER_H__
54
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58
59 /* Includes ------------------------------------------------------------------*/
60 #include "gr55xx.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_LL_EC_DEFAULT_CONFIG InitStrcut default configuartion
138 * @{
139 */
140
141 /**
142 * @brief LL DUAL_TIMER InitStrcut default configuartion
143 */
144 #define DUAL_TIMER_DEFAULT_CONFIG \
145 { \
146 .prescaler = LL_DUAL_TIMER_PRESCALER_DIV0, \
147 .counter_size = LL_DUAL_TIMER_COUNTERSIZE_32, \
148 .counter_mode = LL_DUAL_TIMER_PERIODIC_MODE, \
149 .auto_reload = SystemCoreClock - 1, \
150 }
151 /** @} */
152
153 /** @} */
154
155 /* Exported macro ------------------------------------------------------------*/
156 /** @defgroup DUAL_TIMER_LL_Exported_Macros DUAL_TIM Exported Macros
157 * @{
158 */
159
160 /** @defgroup DUAL_TIMER_LL_EM_WRITE_READ Common Write and read registers Macros
161 * @{
162 */
163
164 /**
165 * @brief Write a value in DUAL_TIMER register
166 * @param __instance__ DUAL_TIMER instance
167 * @param __REG__ Register to be written
168 * @param __VALUE__ Value to be written in the register
169 * @retval None
170 */
171 #define LL_DUAL_TIMER_WriteReg(__instance__, __REG__, __VALUE__) WRITE_REG(__instance__->__REG__, (__VALUE__))
172
173 /**
174 * @brief Read a value in DUAL_TIMER register
175 * @param __instance__ DUAL_TIMER instance
176 * @param __REG__ Register to be read
177 * @retval Register value
178 */
179 #define LL_DUAL_TIMER_ReadReg(__instance__, __REG__) READ_REG(__instance__->__REG__)
180
181 /** @} */
182
183 /** @} */
184
185 /** @} */
186
187 /* Exported functions --------------------------------------------------------*/
188 /** @defgroup DUAL_TIMER_LL_DRIVER_FUNCTIONS Functions
189 * @{
190 */
191
192 /** @defgroup DUAL_TIMER_LL_EF_Configuration Configuration functions
193 * @{
194 */
195
196
197 /**
198 * @brief Enable dual_timer counter.
199 *
200 * Register|BitsName
201 * --------|--------
202 * CTRL | EN
203 *
204 * @param DUAL_TIMERx Timer instance
205 * @retval None
206 */
207 __STATIC_INLINE void ll_dual_timer_enable_counter(dual_timer_regs_t *DUAL_TIMERx)
208 {
209 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_EN);
210 }
211
212 /**
213 * @brief Disable dual_timer counter.
214 *
215 * Register|BitsName
216 * --------|--------
217 * CTRL | EN
218 *
219 * @param DUAL_TIMERx Timer instance
220 * @retval None
221 */
222 __STATIC_INLINE void ll_dual_timer_disable_counter(dual_timer_regs_t *DUAL_TIMERx)
223 {
224 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_EN);
225 }
226
227 /**
228 * @brief Indicate whether the dual_timer counter is enabled.
229 *
230 * Register|BitsName
231 * --------|--------
232 * CTRL | EN
233 *
234 * @param DUAL_TIMERx Timer instance
235 * @retval State of bit (1 or 0).
236 */
237 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_counter(dual_timer_regs_t *DUAL_TIMERx)
238 {
239 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_EN) == (DUAL_TIMER_CTRL_EN));
240 }
241
242 /**
243 * @brief Set the counter mode.
244 *
245 * Register|BitsName
246 * --------|--------
247 * CTRL | MODE
248 *
249 * @param DUAL_TIMERx Timer instance
250 * @param counter_mode This parameter can be one of the following values:
251 * @arg @ref LL_DUAL_TIMER_FREERUNNING_MODE
252 * @arg @ref LL_DUAL_TIMER_PERIODIC_MODE
253 * @retval None
254 */
255 __STATIC_INLINE void ll_dual_timer_set_counter_mode(dual_timer_regs_t *DUAL_TIMERx, uint32_t counter_mode)
256 {
257 MODIFY_REG(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_MODE, counter_mode);
258 }
259
260 /**
261 * @brief Get the counter mode.
262 *
263 * Register|BitsName
264 * --------|--------
265 * CTRL | MODE
266 *
267 * @param DUAL_TIMERx Timer instance
268 * @retval Return value can be one of the following values:
269 * @arg @ref LL_DUAL_TIMER_FREERUNNING_MODE
270 * @arg @ref LL_DUAL_TIMER_PERIODIC_MODE
271 */
272 __STATIC_INLINE uint32_t ll_dual_timer_get_counter_mode(dual_timer_regs_t *DUAL_TIMERx)
273 {
274 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_MODE));
275 }
276
277 /**
278 * @brief Set the prescaler.
279 *
280 * Register|BitsName
281 * --------|--------
282 * CTRL | PRE
283 *
284 * @param DUAL_TIMERx Timer instance
285 * @param prescaler This parameter can be one of the following values:
286 * @arg @ref LL_DUAL_TIMER_PRESCALER_DIV0
287 * @arg @ref LL_DUAL_TIMER_PRESCALER_DIV16
288 * @arg @ref LL_DUAL_TIMER_PRESCALER_DIV256
289 * @retval None
290 */
291 __STATIC_INLINE void ll_dual_timer_set_prescaler(dual_timer_regs_t *DUAL_TIMERx, uint32_t prescaler)
292 {
293 MODIFY_REG(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_PRE, prescaler);
294 }
295
296 /**
297 * @brief Get the prescaler.
298 *
299 * Register|BitsName
300 * --------|--------
301 * CTRL | PRE
302 *
303 * @param DUAL_TIMERx Timer instance
304 * @retval Return value can be one of the following values:
305 * @arg @ref LL_DUAL_TIMER_PRESCALER_DIV0
306 * @arg @ref LL_DUAL_TIMER_PRESCALER_DIV16
307 * @arg @ref LL_DUAL_TIMER_PRESCALER_DIV256
308 */
309 __STATIC_INLINE uint32_t ll_dual_timer_get_prescaler(dual_timer_regs_t *DUAL_TIMERx)
310 {
311 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_PRE));
312 }
313
314 /**
315 * @brief Set the counter size.
316 *
317 * Register|BitsName
318 * --------|--------
319 * CTRL | SIZE
320 *
321 * @param DUAL_TIMERx Timer instance
322 * @param counter_size This parameter can be one of the following values:
323 * @arg @ref LL_DUAL_TIMER_COUNTERSIZE_16
324 * @arg @ref LL_DUAL_TIMER_COUNTERSIZE_32
325 * @retval None
326 */
327 __STATIC_INLINE void ll_dual_timer_set_counter_size(dual_timer_regs_t *DUAL_TIMERx, uint32_t counter_size)
328 {
329 MODIFY_REG(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_SIZE, counter_size);
330 }
331
332 /**
333 * @brief Get the counter size.
334 *
335 * Register|BitsName
336 * --------|--------
337 * CTRL | SIZE
338 *
339 * @param DUAL_TIMERx Timer instance
340 * @retval Return value can be one of the following values:
341 * @arg @ref LL_DUAL_TIMER_COUNTERSIZE_16
342 * @arg @ref LL_DUAL_TIMER_COUNTERSIZE_32
343 */
344 __STATIC_INLINE uint32_t ll_dual_timer_get_counter_size(dual_timer_regs_t *DUAL_TIMERx)
345 {
346 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_SIZE));
347 }
348
349 /**
350 * @brief Enable one-shot mode.
351 *
352 * Register|BitsName
353 * --------|--------
354 * CTRL | ONESHOT
355 *
356 * @param DUAL_TIMERx Timer instance
357 * @retval None
358 */
359 __STATIC_INLINE void ll_dual_timer_enable_oneshot(dual_timer_regs_t *DUAL_TIMERx)
360 {
361 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_ONESHOT);
362 }
363
364 /**
365 * @brief Disable one-shot mode.
366 *
367 * Register|BitsName
368 * --------|--------
369 * CTRL | ONESHOT
370 *
371 * @param DUAL_TIMERx Timer instance
372 * @retval None
373 */
374 __STATIC_INLINE void ll_dual_timer_disable_oneshot(dual_timer_regs_t *DUAL_TIMERx)
375 {
376 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_ONESHOT);
377 }
378
379 /**
380 * @brief Indicate whether the one-shot mode is enabled.
381 *
382 * Register|BitsName
383 * --------|--------
384 * CTRL | ONESHOT
385 *
386 * @param DUAL_TIMERx Timer instance
387 * @retval State of bit (1 or 0).
388 */
389 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_oneshot(dual_timer_regs_t *DUAL_TIMERx)
390 {
391 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_ONESHOT) == (DUAL_TIMER_CTRL_ONESHOT));
392 }
393
394 /**
395 * @brief Get the counter value.
396 *
397 * Register|BitsName
398 * --------|--------
399 * VALUE | VALUE
400 *
401 * @param DUAL_TIMERx Timer instance
402 * @retval Counter value (between Min_Data=0 and Max_Data=0xFFFFFFFF)
403 */
404 __STATIC_INLINE uint32_t ll_dual_timer_get_counter(dual_timer_regs_t *DUAL_TIMERx)
405 {
406 return (uint32_t)(READ_REG(DUAL_TIMERx->VALUE));
407 }
408
409 /**
410 * @brief Set the auto-reload value.
411 * @note The counter is blocked while the auto-reload value is null.
412 *
413 * Register|BitsName
414 * --------|--------
415 * RELOAD | RELOAD
416 *
417 * @param DUAL_TIMERx Timer instance
418 * @param auto_reload between Min_Data=0 and Max_Data=0xFFFFFFFF
419 * @retval None
420 */
421 __STATIC_INLINE void ll_dual_timer_set_auto_reload(dual_timer_regs_t *DUAL_TIMERx, uint32_t auto_reload)
422 {
423 WRITE_REG(DUAL_TIMERx->RELOAD, auto_reload);
424 }
425
426 /**
427 * @brief Get the auto-reload value.
428 *
429 * Register|BitsName
430 * --------|--------
431 * RELOAD | RELOAD
432 *
433 * @param DUAL_TIMERx Timer instance
434 * @retval Auto-reload value
435 */
436 __STATIC_INLINE uint32_t ll_dual_timer_get_auto_reload(dual_timer_regs_t *DUAL_TIMERx)
437 {
438 return (uint32_t)(READ_REG(DUAL_TIMERx->RELOAD));
439 }
440
441 /**
442 * @brief Set the backgroud-reload value.
443 *
444 * Register|BitsName
445 * --------|--------
446 * BG_LOAD | BG_LOAD
447 *
448 * @param DUAL_TIMERx Timer instance
449 * @param background_reload between Min_Data=0 and Max_Data=0xFFFFFFFF
450 * @retval None
451 */
452 __STATIC_INLINE void ll_dual_timer_set_background_reload(dual_timer_regs_t *DUAL_TIMERx, uint32_t background_reload)
453 {
454 WRITE_REG(DUAL_TIMERx->BG_LOAD, background_reload);
455 }
456
457 /**
458 * @brief Get the backgroud-reload value.
459 *
460 * Register|BitsName
461 * --------|--------
462 * BG_LOAD | BG_LOAD
463 *
464 * @param DUAL_TIMERx Timer instance
465 * @retval Return value between Min_Data=0 and Max_Data=0xFFFFFFFF
466 */
467 __STATIC_INLINE uint32_t ll_dual_timer_get_background_reload(dual_timer_regs_t *DUAL_TIMERx)
468 {
469 return (uint32_t)(READ_REG(DUAL_TIMERx->BG_LOAD));
470 }
471
472 /** @} */
473
474 /** @defgroup DUAL_TIM_LL_EF_IT_Management IT_Management
475 * @{
476 */
477
478 /**
479 * @brief Enable dual_timer interrupt.
480 *
481 * Register|BitsName
482 * --------|--------
483 * CTRL | INTEN
484 *
485 * @param DUAL_TIMERx Timer instance
486 * @retval None
487 */
488 __STATIC_INLINE void ll_dual_timer_enable_it(dual_timer_regs_t *DUAL_TIMERx)
489 {
490 SET_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_INTEN);
491 }
492
493 /**
494 * @brief Disable dual_timer interrput.
495 *
496 * Register|BitsName
497 * --------|--------
498 * CTRL | INTEN
499 *
500 * @param DUAL_TIMERx Timer instance
501 * @retval None
502 */
503 __STATIC_INLINE void ll_dual_timer_disable_it(dual_timer_regs_t *DUAL_TIMERx)
504 {
505 CLEAR_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_INTEN);
506 }
507
508 /**
509 * @brief Indicate whether the dual_timer interrput is enabled.
510 *
511 * Register|BitsName
512 * --------|--------
513 * CTRL | INTEN
514 *
515 * @param DUAL_TIMERx Timer instance
516 * @retval State of bit (1 or 0).
517 */
518 __STATIC_INLINE uint32_t ll_dual_timer_is_enabled_it(dual_timer_regs_t *DUAL_TIMERx)
519 {
520 return (READ_BITS(DUAL_TIMERx->CTRL, DUAL_TIMER_CTRL_INTEN) == (DUAL_TIMER_CTRL_INTEN));
521 }
522
523 /** @} */
524
525 /** @defgroup DUAL_TIMER_LL_EF_FLAG_Management FLAG_Management
526 * @{
527 */
528
529 /**
530 * @brief Clear the interrupt flag (INTSTAT).
531 *
532
533 * Register|BitsName
534 * --------|--------
535 * INTCLR | INTCLR
536 *
537 * @param DUAL_TIMERx Timer instance
538 * @retval None
539 */
540 __STATIC_INLINE void ll_dual_timer_clear_flag_it(dual_timer_regs_t *DUAL_TIMERx)
541 {
542 WRITE_REG(DUAL_TIMERx->INTCLR, DUAL_TIMER_INT_CLR);
543 }
544
545 /**
546 * @brief Indicate whether interrupt flag (INTSTAT) is set (interrupt is pending).
547 *
548 * Register|BitsName
549 * --------|--------
550 * INTSTAT | INTSTAT
551 *
552 * @param DUAL_TIMERx Timer instance
553 * @retval State of bit (1 or 0).
554 */
555 __STATIC_INLINE uint32_t ll_dual_timer_is_active_flag_it(dual_timer_regs_t *DUAL_TIMERx)
556 {
557 return (READ_BITS(DUAL_TIMERx->INTSTAT, DUAL_TIMER_ISR_TI) == (DUAL_TIMER_ISR_TI));
558 }
559
560 /**
561 * @brief Get Dual_timer raw interrupt flags
562 *
563 * Register|BitsName
564 * --------|--------
565 * RAW_INTSTAT | RAW_INTSTAT
566 *
567 * @param DUAL_TIMERx Timer instance
568 * @retval State of bit (1 or 0).
569 */
570 __STATIC_INLINE uint32_t ll_dual_timer_get_raw_it_flag(dual_timer_regs_t *DUAL_TIMERx)
571 {
572 return (READ_REG(DUAL_TIMERx->RAW_INTSTAT));
573 }
574
575 /** @} */
576
577 /** @defgroup DUAL_TIMER_LL_EF_Init Initialization and de-initialization functions
578 * @{
579 */
580
581 /**
582 * @brief De-initialize DUAL_TIMER registers (Registers restored to their default values).
583 * @param DUAL_TIMERx DUAL_TIM instance
584 * @retval An error_status_t enumeration value:
585 * - SUCCESS: DUAL_TIMER registers are de-initialized
586 * - ERROR: DUAL_TIMER registers are not de-initialized
587 */
588 error_status_t ll_dual_timer_deinit(dual_timer_regs_t *DUAL_TIMERx);
589
590 /**
591 * @brief Initialize DUAL_TIMER registers according to the specified
592 * parameters in p_dual_timer_init.
593 * @param DUAL_TIMERx DUAL_TIMER instance
594 * @param p_dual_timer_init Pointer to a ll_dual_timer_init_t structure that contains the configuration
595 * information for the specified DUAL_TIMER peripheral.
596 * @retval An error_status_t enumeration value:
597 * - SUCCESS: DUAL_TIMER registers are initialized according to p_dual_timer_init content
598 * - ERROR: Problem occurred during DUAL_TIM Registers initialization
599 */
600 error_status_t ll_dual_timer_init(dual_timer_regs_t *DUAL_TIMERx, ll_dual_timer_init_t *p_dual_timer_init);
601
602 /** @} */
603
604 /** @} */
605
606
607 #endif /* DUAL_TIMER0 || DUAL_TIMER1 */
608
609 #ifdef __cplusplus
610 }
611 #endif
612
613 #endif /* __GR55XX_LL_DUAL_TIMER_H__ */
614
615 /** @} */
616
617 /** @} */
618
619 /** @} */
ll_dual_timer_enable_it
__STATIC_INLINE void ll_dual_timer_enable_it(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer interrupt.
Definition: gr55xx_ll_dual_tim.h:488
ll_dual_timer_init_t
struct _ll_dual_timer_init ll_dual_timer_init_t
LL DUAL TIMER init Structure definition.
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: gr55xx_ll_dual_tim.h:570
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: gr55xx_ll_dual_tim.h:272
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: gr55xx_ll_dual_tim.h:555
ll_dual_timer_disable_it
__STATIC_INLINE void ll_dual_timer_disable_it(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer interrput.
Definition: gr55xx_ll_dual_tim.h:503
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: gr55xx_ll_dual_tim.h:291
_ll_dual_timer_init::prescaler
uint32_t prescaler
Definition: gr55xx_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: gr55xx_ll_dual_tim.h:421
ll_dual_timer_enable_counter
__STATIC_INLINE void ll_dual_timer_enable_counter(dual_timer_regs_t *DUAL_TIMERx)
Enable dual_timer counter.
Definition: gr55xx_ll_dual_tim.h:207
ll_dual_timer_get_prescaler
__STATIC_INLINE uint32_t ll_dual_timer_get_prescaler(dual_timer_regs_t *DUAL_TIMERx)
Get the prescaler.
Definition: gr55xx_ll_dual_tim.h:309
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: gr55xx_ll_dual_tim.h:540
ll_dual_timer_disable_oneshot
__STATIC_INLINE void ll_dual_timer_disable_oneshot(dual_timer_regs_t *DUAL_TIMERx)
Disable one-shot mode.
Definition: gr55xx_ll_dual_tim.h:374
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: gr55xx_ll_dual_tim.h:255
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: gr55xx_ll_dual_tim.h:452
ll_dual_timer_enable_oneshot
__STATIC_INLINE void ll_dual_timer_enable_oneshot(dual_timer_regs_t *DUAL_TIMERx)
Enable one-shot mode.
Definition: gr55xx_ll_dual_tim.h:359
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: gr55xx_ll_dual_tim.h:518
_ll_dual_timer_init::auto_reload
uint32_t auto_reload
Definition: gr55xx_ll_dual_tim.h:93
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: gr55xx_ll_dual_tim.h:467
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: gr55xx_ll_dual_tim.h:404
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: gr55xx_ll_dual_tim.h:389
_ll_dual_timer_init
LL DUAL TIMER init Structure definition.
Definition: gr55xx_ll_dual_tim.h:77
_ll_dual_timer_init::counter_size
uint32_t counter_size
Definition: gr55xx_ll_dual_tim.h:83
_ll_dual_timer_init::counter_mode
uint32_t counter_mode
Definition: gr55xx_ll_dual_tim.h:88
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: gr55xx_ll_dual_tim.h:237
ll_dual_timer_disable_counter
__STATIC_INLINE void ll_dual_timer_disable_counter(dual_timer_regs_t *DUAL_TIMERx)
Disable dual_timer counter.
Definition: gr55xx_ll_dual_tim.h:222
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: gr55xx_ll_dual_tim.h:436
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: gr55xx_ll_dual_tim.h:327
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: gr55xx_ll_dual_tim.h:344
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).