gr55xx_hal_dual_tim.h
Go to the documentation of this file.
1 /**
2  ****************************************************************************************
3  *
4  * @file gr55xx_hal_dual_tim.h
5  * @author BLE Driver Team
6  * @brief Header file containing functions prototypes of DUAL TIMER HAL 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 HAL_DRIVER HAL Driver
43  * @{
44  */
45 
46 /** @defgroup HAL_DUAL_TIMER DUAL TIMER
47  * @brief DUAL TIM HAL module driver.
48  * @{
49  */
50 
51 /* Define to prevent recursive inclusion -------------------------------------*/
52 #ifndef __GR55xx_HAL_DUAL_TIMER_H__
53 #define __GR55xx_HAL_DUAL_TIMER_H__
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 /* Includes ------------------------------------------------------------------*/
60 #include "gr55xx_hal_def.h"
61 #include "gr55xx_ll_dual_tim.h"
62 
63 /* Exported types ------------------------------------------------------------*/
64 /** @addtogroup HAL_DUAL_TIMER_ENUMERATIONS Enumerations
65  * @{
66  */
67 
68 /** @defgroup HAL_DUAL_TIMER_state HAL DUAL TIM state
69  * @{
70  */
71 
72 /**
73  * @brief HAL DUAL TIMER State Enumerations definition
74  */
75 typedef enum
76 {
77  HAL_DUAL_TIMER_STATE_RESET = 0x00, /**< Peripheral not yet initialized or disabled */
78  HAL_DUAL_TIMER_STATE_READY = 0x01, /**< Peripheral Initialized and ready for use */
79  HAL_DUAL_TIMER_STATE_BUSY = 0x02, /**< An internal process is ongoing */
80  HAL_DUAL_TIMER_STATE_ERROR = 0x04 /**< Reception process is ongoing */
82 /** @} */
83 
84 /** @} */
85 
86 /** @addtogroup HAL_DUAL_TIMER_STRUCTURES Structures
87  * @{
88  */
89 
90 /** @defgroup DUAL_TIMER_Configuration DUAL TIMER Configuration
91  * @{
92  */
93 
94 /**
95  * @brief DUAL TIMER init Structure definition
96  */
97 typedef struct _dual_timer_init
98 {
99  uint32_t prescaler; /**< Specifies the prescaler value used to divide the DUAL_TIMER clock.
100  This parameter can be a value of @ref DUAL_TIMER_Prescaler_Div */
101 
102  uint32_t counter_mode; /**< Specifies the counter mode.
103  This parameter can be a value of @ref DUAL_TIMER_Counter_Mode */
104 
105  uint32_t auto_reload; /**< Specifies the auto-reload value. */
106 
108 
109 /** @} */
110 
111 /** @defgroup DUAL_TIMER_handle DUAL TIMER handle
112  * @{
113  */
114 
115 /**
116  * @brief DUAL_TIMER handle Structure definition
117  */
118 typedef struct _dual_timer_handle
119 {
120  dual_timer_regs_t *p_instance; /**< Register base address */
121 
122  dual_timer_init_t init; /**< DUAL_TIMER Base required parameters */
123 
124  __IO hal_lock_t lock; /**< Locking object */
125 
126  __IO hal_dual_timer_state_t state; /**< DUAL_TIMER operation state */
127 
129 /** @} */
130 
131 /** @} */
132 
133 /** @addtogroup HAL_DUAL_TIMER_CALLBACK_STRUCTURES Callback Structures
134  * @{
135  */
136 
137 /** @defgroup DUAL_TIMER_Callback DUAL_TIMER Callback
138  * @{
139  */
140 
141 /**
142  * @brief HAL_DUAL_TIMER Callback function definition
143  */
144 typedef struct _dual_timer_callback
145 {
146  void (*dual_timer_msp_init)(dual_timer_handle_t *p_dual_timer); /**< DUAL_TIMER init MSP callback */
147  void (*dual_timer_msp_deinit)(dual_timer_handle_t *p_dual_timer); /**< DUAL_TIMER de-init MSP callback */
148  void (*dual_timer_period_elapsed_callback)(dual_timer_handle_t *p_dual_timer); /**< DUAL_TIMER period elapsed callback */
150 /** @} */
151 
152 /** @} */
153 
154 /**
155  * @defgroup HAL_DUAL_TIMER_MACRO Defines
156  * @{
157  */
158 
159 /* Exported constants --------------------------------------------------------*/
160 /** @defgroup DUAL_TIMER_Exported_Constants DUAL TIMER Exported Constants
161  * @{
162  */
163 
164 /** @defgroup DUAL_TIMER_Prescaler_Div DUAL TIMER Prescaler Division
165  * @{
166  */
167 #define DUAL_TIMER_PRESCALER_DIV0 LL_DUAL_TIMER_PRESCALER_DIV0 /**< 0 stage of prescale, clock is divided by 1. */
168 #define DUAL_TIMER_PRESCALER_DIV16 LL_DUAL_TIMER_PRESCALER_DIV16 /**< 4 stages of prescale, clock is divided by 16. */
169 #define DUAL_TIMER_PRESCALER_DIV256 LL_DUAL_TIMER_PRESCALER_DIV256 /**< 8 stages of prescale, clock is divided by 256. */
170 /** @} */
171 
172 /** @defgroup DUAL_TIMER_Counter_Mode DUAL TIMER Counter Mode
173  * @{
174  */
175 #define DUAL_TIMER_COUNTERMODE_LOOP 0x00000000U /**< DUAL TIMER Loop mode.*/
176 #define DUAL_TIMER_COUNTERMODE_ONESHOT DUAL_TIMER_CTRL_ONESHOT /**< DUAL TIMER One-shot mode. */
177 /** @} */
178 
179 /** @} */
180 
181 /* Exported macro ------------------------------------------------------------*/
182 /** @defgroup DUAL_TIMER_Exported_Macros DUAL TIMER Exported Macros
183  * @{
184  */
185 
186 /** @brief Reset DUAL TIMER handle states.
187  * @param __HANDLE__ DUAL TIMER handle.
188  * @retval None
189  */
190 #define __HAL_DUAL_TIMER_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->state = HAL_DUAL_TIMER_STATE_RESET)
191 
192 /** @brief Enable the specified DUAL TIMER peripheral.
193  * @param __HANDLE__ Specifies the DUAL TIMER Handle.
194  * @retval None
195  */
196 #define __HAL_DUAL_TIMER_ENABLE(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->CTRL, DUAL_TIMER_CTRL_EN)
197 
198 /** @brief Disable the specified DUAL TIMER peripheral.
199  * @param __HANDLE__ Specifies the DUAL TIMER Handle.
200  * @retval None
201  */
202 #define __HAL_DUAL_TIMER_DISABLE(__HANDLE__) CLEAR_BITS((__HANDLE__)->p_instance->CTRL, DUAL_TIMER_CTRL_EN)
203 
204 /** @brief Enable the DUAL TIMER interrupt.
205  * @param __HANDLE__ Specifies the DUAL TIM Handle.
206  * @retval None
207  */
208 #define __HAL_DUAL_TIMER_ENABLE_IT(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->CTRL, DUAL_TIMER_CTRL_INTEN)
209 
210 /** @brief Disable the DUAL TIMER interrupt.
211  * @param __HANDLE__ Specifies the DUAL TIM Handle.
212  * @retval None
213  */
214 #define __HAL_DUAL_TIMER_DISABLE_IT(__HANDLE__) CLEAR_BITS((__HANDLE__)->p_instance->CTRL, DUAL_TIMER_CTRL_INTEN)
215 
216 /** @brief Check whether the DUAL TIMER interrupt has occurred or not.
217  * @param __HANDLE__ Specifies the DUAL TIMER Handle.
218  * @retval The new state of DUAL TIMER interrupt (SET or RESET).
219  */
220 #define __HAL_DUAL_TIMER_GET_FLAG_IT(__HANDLE__) ll_dual_timer_is_active_flag_it(__HANDLE__->p_instance)
221 
222 /** @brief Clear the DUAL TIMER interrupt flag.
223  * @param __HANDLE__ Specifies the DUAL TIMER Handle.
224  * @retval None.
225  */
226 #define __HAL_DUAL_TIMER_CLEAR_FLAG_IT(__HANDLE__) ll_dual_timer_clear_flag_it(__HANDLE__->p_instance)
227 
228 /** @} */
229 
230 /* Private macros ------------------------------------------------------------*/
231 /** @defgroup DUAL_TIMER_Private_Macros DUAL TIMER Private Macros
232  * @{
233  */
234 
235 /** @brief Check if DUAL TIMER prescaler is valid.
236  * @param __PRESCALER__ DUAL TIMER prescaler.
237  * @retval SET (__PRESCALER__ is valid) or RESET (__PRESCALER__ is invalid)
238  */
239 #define IS_DUAL_TIMER_PRESCALER(__PRESCALER__) (((__PRESCALER__) == DUAL_TIMER_PRESCALER_DIV0) || \
240  ((__PRESCALER__) == DUAL_TIMER_PRESCALER_DIV16) || \
241  ((__PRESCALER__) == DUAL_TIMER_PRESCALER_DIV256))
242 
243 /** @brief Check if DUAL TIMER counter mode is valid.
244  * @param __MODE__ DUAL TIMER counter mode.
245  * @retval SET (__MODE__ is valid) or RESET (__MODE__ is invalid)
246  */
247 #define IS_DUAL_TIMER_COUNTERMODE(__MODE__) (((__MODE__) == DUAL_TIMER_COUNTERMODE_LOOP) || \
248  ((__MODE__) == DUAL_TIMER_COUNTERMODE_ONESHOT))
249 /** @} */
250 
251 /** @} */
252 
253 /* Exported functions --------------------------------------------------------*/
254 /** @addtogroup HAL_DUAL_TIMER_DRIVER_FUNCTIONS Functions
255  * @{
256  */
257 
258 /** @addtogroup DUAL_TIMER_Exported_Functions_Group1 Initialization and de-initialization functions
259  * @brief Initialization and de-initialization functions
260  *
261  * @verbatim
262 ===============================================================================
263  ##### Initialization and de-initialization functions #####
264  ===============================================================================
265  [..]
266  This section provides functions allowing to:
267  (+) Initialize and configure the DUAL TIMER.
268  (+) De-initialize the DUAL TIMER.
269  (+) Start the Timer.
270  (+) Stop the Timer.
271  (+) Start the Timer and enable interrupt.
272  (+) Stop the Timer and disable interrupt.
273 
274 @endverbatim
275  * @{
276  */
277 
278 /**
279  ****************************************************************************************
280  * @brief Initialize the DUAL TIMER according to the specified parameters
281  * in the dual_timer_init_t and initialize the associated handle.
282  *
283  * @param[in] p_dual_timer: Pointer to a DUAL_TIMER handle which contains the configuration information for the specified DUAL TIMER.
284  *
285  * @retval ::HAL_OK: Operation is OK.
286  * @retval ::HAL_ERROR: Parameter error or operation not supported.
287  * @retval ::HAL_BUSY: Driver is busy.
288  * @retval ::HAL_TIMEOUT: Timeout occurred.
289  ****************************************************************************************
290  */
292 
293 /**
294  ****************************************************************************************
295  * @brief De-initialize the DUAL TIMER peripheral.
296  *
297  * @param[in] p_dual_timer: Pointer to a DUAL_TIM handle which contains the configuration information for the specified DUAL TIMER.
298  *
299  * @retval ::HAL_OK: Operation is OK.
300  * @retval ::HAL_ERROR: Parameter error or operation not supported.
301  * @retval ::HAL_BUSY: Driver is busy.
302  * @retval ::HAL_TIMEOUT: Timeout occurred.
303  ****************************************************************************************
304  */
306 
307 /**
308  ****************************************************************************************
309  * @brief Initialize the DUAL TIMER MSP.
310  *
311  * @note This function should not be modified. When the callback is needed,
312  * the hal_dual_timer_base_msp_init could be implemented in the user file
313  *
314  * @param[in] p_dual_timer: Pointer to a DUAL_TIMER handle which contains the configuration information for the specified DUAL TIMER.
315  ****************************************************************************************
316  */
318 
319 /**
320  ****************************************************************************************
321  * @brief De-initialize the DUAL TIMER MSP.
322  *
323  * @note This function should not be modified. When the callback is needed,
324  * the hal_dual_timer_base_msp_deinit could be implemented in the user file
325  *
326  * @param[in] p_dual_timer: Pointer to a DUAL_TIM handle which contains the configuration information for the specified DUAL TIMER.
327  ****************************************************************************************
328  */
330 
331 /**
332  ****************************************************************************************
333  * @brief Starts the DUAL TIMER counter.
334  *
335  * @param[in] p_dual_timer: Pointer to a DUAL_TIMER handle which contains the configuration information for the specified DUAL TIMER.
336  *
337  * @retval ::HAL_OK: Operation is OK.
338  * @retval ::HAL_ERROR: Parameter error or operation not supported.
339  * @retval ::HAL_BUSY: Driver is busy.
340  * @retval ::HAL_TIMEOUT: Timeout occurred.
341  ****************************************************************************************
342  */
344 
345 /**
346  ****************************************************************************************
347  * @brief Stops the DUAL TIMER counter.
348  *
349  * @param[in] p_dual_timer: Pointer to a DUAL_TIM handle which contains the configuration information for the specified DUAL TIMER.
350  *
351  * @retval ::HAL_OK: Operation is OK.
352  * @retval ::HAL_ERROR: Parameter error or operation not supported.
353  * @retval ::HAL_BUSY: Driver is busy.
354  * @retval ::HAL_TIMEOUT: Timeout occurred.
355  ****************************************************************************************
356  */
358 
359 /**
360  ****************************************************************************************
361  * @brief Starts the DUAL TIMER counter in interrupt mode.
362  *
363  * @param[in] p_dual_timer: Pointer to a DUAL_TIM handle which contains the configuration information for the specified DUAL TIMER.
364  *
365  * @retval ::HAL_OK: Operation is OK.
366  * @retval ::HAL_ERROR: Parameter error or operation not supported.
367  * @retval ::HAL_BUSY: Driver is busy.
368  * @retval ::HAL_TIMEOUT: Timeout occurred.
369  ****************************************************************************************
370  */
372 
373 /**
374  ****************************************************************************************
375  * @brief Stops the DUAL TIMER counter in interrupt mode.
376  *
377  * @param[in] p_dual_timer: Pointer to a DUAL_TIMER handle which contains the configuration information for the specified DUAL TIMER.
378  *
379  * @retval ::HAL_OK: Operation is OK.
380  * @retval ::HAL_ERROR: Parameter error or operation not supported.
381  * @retval ::HAL_BUSY: Driver is busy.
382  * @retval ::HAL_TIMEOUT: Timeout occurred.
383  ****************************************************************************************
384  */
386 
387 /** @} */
388 
389 /** @addtogroup DUAL_TIMER_IRQ_Handler_and_Callbacks IRQ Handler and Callbacks
390  * @brief IRQ Handler and Callbacks functions
391  * @{
392  */
393 
394 /**
395  ****************************************************************************************
396  * @brief Handle DUAL TIMER interrupt request.
397  *
398  * @param[in] p_dual_timer: Pointer to a DUAL_TIMER handle which contains the configuration information for the specified DUAL TIMER.
399  ****************************************************************************************
400  */
402 
403 /**
404  ****************************************************************************************
405  * @brief Period elapsed callback in non-blocking mode.
406  *
407  * @note This function should not be modified. When the callback is needed,
408  * the hal_dual_timer_period_elapsed_callback can be implemented in the user file.
409  *
410  * @param[in] p_dual_timer: Pointer to a DUAL_TIMER handle which contains the configuration information for the specified DUAL TIMER.
411  ****************************************************************************************
412  */
414 
415 /** @} */
416 
417 /** @addtogroup DUAL_TIMER_Exported_Functions_Group2 Peripheral Control and State functions
418  * @brief DUAL TIMER Peripheral State functions
419  *
420 @verbatim
421  ==============================================================================
422  ##### Peripheral Control and State functions #####
423  ==============================================================================
424  [..]
425  This subsection provides functions allowing to :
426  (+) Return the DUAL TIMER handle state.
427  (+) Configure the DUAL TIMER.
428  (+) Set background reload value.
429 
430 @endverbatim
431  * @{
432  */
433 
434 /**
435  ****************************************************************************************
436  * @brief Return the DUAL TIMER handle state.
437  *
438  * @param[in] p_dual_timer: Pointer to a DUAL_TIMER handle which contains the configuration information for the specified DUAL TIMER.
439  *
440  * @retval ::HAL_DUAL_TIMER_STATE_RESET: Peripheral not yet initialized or disabled.
441  * @retval ::HAL_DUAL_TIMER_STATE_READY: Peripheral Initialized and ready for use.
442  * @retval ::HAL_DUAL_TIMER_STATE_BUSY: An internal process is ongoing.
443  * @retval ::HAL_DUAL_TIMER_STATE_ERROR: Reception process is ongoing.
444  ****************************************************************************************
445  */
447 
448 /**
449  ****************************************************************************************
450  * @brief DUAL TIMER configuration
451  *
452  * @param[in] p_dual_timer: Pointer to a DUAL_TIMER handle which contains the configuration information for the specified DUAL TIMER.
453  * @param[in] p_structure: The DUAL TIMER configuration structure
454  *
455  * @retval ::HAL_OK: Operation is OK.
456  * @retval ::HAL_ERROR: Parameter error or operation not supported.
457  * @retval ::HAL_BUSY: Driver is busy.
458  * @retval ::HAL_TIMEOUT: Timeout occurred.
459  ****************************************************************************************
460  */
462 
463 /**
464  ****************************************************************************************
465  * @brief DUAL TIMER set background reload value
466  * The background reload value contains the value from which the counter is to decrement.
467  * This is the value used to reload the counter when Periodic mode is enabled, and the current count reaches 0.
468  * The difference is that writes to background reload value do not cause the counter to immediately restart from the new value.
469  * @param[in] p_dual_timer: Pointer to a DUAL_TIMER handle which contains the configuration information for the specified DUAL TIMER.
470  * @param[in] reload_value: Background reload value
471  *
472  * @retval ::HAL_OK: Operation is OK.
473  * @retval ::HAL_ERROR: Parameter error or operation not supported.
474  * @retval ::HAL_BUSY: Driver is busy.
475  ****************************************************************************************
476  */
478 
479 /** @} */
480 
481 /** @} */
482 
483 #ifdef __cplusplus
484 }
485 #endif
486 
487 #endif /* __GR55xx_HAL_DUAL_TIMER_H__ */
488 
489 /** @} */
490 
491 /** @} */
492 
493 /** @} */
hal_lock_t
hal_lock_t
HAL Lock structures definition.
Definition: gr55xx_hal_def.h:81
hal_dual_timer_base_deinit
hal_status_t hal_dual_timer_base_deinit(dual_timer_handle_t *p_dual_timer)
De-initialize the DUAL TIMER peripheral.
hal_dual_timer_get_state
hal_dual_timer_state_t hal_dual_timer_get_state(dual_timer_handle_t *p_dual_timer)
Return the DUAL TIMER handle state.
HAL_DUAL_TIMER_STATE_RESET
@ HAL_DUAL_TIMER_STATE_RESET
Definition: gr55xx_hal_dual_tim.h:77
HAL_DUAL_TIMER_STATE_BUSY
@ HAL_DUAL_TIMER_STATE_BUSY
Definition: gr55xx_hal_dual_tim.h:79
HAL_DUAL_TIMER_STATE_READY
@ HAL_DUAL_TIMER_STATE_READY
Definition: gr55xx_hal_dual_tim.h:78
HAL_DUAL_TIMER_STATE_ERROR
@ HAL_DUAL_TIMER_STATE_ERROR
Definition: gr55xx_hal_dual_tim.h:80
_dual_timer_callback::dual_timer_msp_deinit
void(* dual_timer_msp_deinit)(dual_timer_handle_t *p_dual_timer)
Definition: gr55xx_hal_dual_tim.h:147
hal_dual_timer_set_background_reload
hal_status_t hal_dual_timer_set_background_reload(dual_timer_handle_t *p_dual_timer, uint32_t reload_value)
DUAL TIMER set background reload value The background reload value contains the value from which the ...
_dual_timer_handle
DUAL_TIMER handle Structure definition.
Definition: gr55xx_hal_dual_tim.h:119
hal_dual_timer_base_stop
hal_status_t hal_dual_timer_base_stop(dual_timer_handle_t *p_dual_timer)
Stops the DUAL TIMER counter.
dual_timer_callback_t
struct _dual_timer_callback dual_timer_callback_t
HAL_DUAL_TIMER Callback function definition.
_dual_timer_init::auto_reload
uint32_t auto_reload
Definition: gr55xx_hal_dual_tim.h:105
_dual_timer_handle::p_instance
dual_timer_regs_t * p_instance
Definition: gr55xx_hal_dual_tim.h:120
gr55xx_ll_dual_tim.h
Header file containing functions prototypes of DUAL TIMER LL library.
_dual_timer_init
DUAL TIMER init Structure definition.
Definition: gr55xx_hal_dual_tim.h:98
_dual_timer_callback::dual_timer_period_elapsed_callback
void(* dual_timer_period_elapsed_callback)(dual_timer_handle_t *p_dual_timer)
Definition: gr55xx_hal_dual_tim.h:148
hal_dual_timer_base_start
hal_status_t hal_dual_timer_base_start(dual_timer_handle_t *p_dual_timer)
Starts the DUAL TIMER counter.
hal_dual_timer_base_msp_deinit
void hal_dual_timer_base_msp_deinit(dual_timer_handle_t *p_dual_timer)
De-initialize the DUAL TIMER MSP.
hal_dual_timer_base_start_it
hal_status_t hal_dual_timer_base_start_it(dual_timer_handle_t *p_dual_timer)
Starts the DUAL TIMER counter in interrupt mode.
hal_dual_timer_state_t
hal_dual_timer_state_t
HAL DUAL TIMER State Enumerations definition.
Definition: gr55xx_hal_dual_tim.h:76
dual_timer_handle_t
struct _dual_timer_handle dual_timer_handle_t
DUAL_TIMER handle Structure definition.
hal_status_t
hal_status_t
HAL Status structures definition.
Definition: gr55xx_hal_def.h:70
_dual_timer_init::counter_mode
uint32_t counter_mode
Definition: gr55xx_hal_dual_tim.h:102
hal_dual_timer_base_init
hal_status_t hal_dual_timer_base_init(dual_timer_handle_t *p_dual_timer)
Initialize the DUAL TIMER according to the specified parameters in the dual_timer_init_t and initiali...
_dual_timer_init::prescaler
uint32_t prescaler
Definition: gr55xx_hal_dual_tim.h:99
dual_timer_init_t
struct _dual_timer_init dual_timer_init_t
DUAL TIMER init Structure definition.
hal_dual_timer_irq_handler
void hal_dual_timer_irq_handler(dual_timer_handle_t *p_dual_timer)
Handle DUAL TIMER interrupt request.
_dual_timer_handle::state
__IO hal_dual_timer_state_t state
Definition: gr55xx_hal_dual_tim.h:126
hal_dual_timer_period_elapsed_callback
void hal_dual_timer_period_elapsed_callback(dual_timer_handle_t *p_dual_timer)
Period elapsed callback in non-blocking mode.
hal_dual_timer_base_stop_it
hal_status_t hal_dual_timer_base_stop_it(dual_timer_handle_t *p_dual_timer)
Stops the DUAL TIMER counter in interrupt mode.
hal_dual_timer_set_config
hal_status_t hal_dual_timer_set_config(dual_timer_handle_t *p_dual_timer, dual_timer_init_t *p_structure)
DUAL TIMER configuration.
_dual_timer_callback::dual_timer_msp_init
void(* dual_timer_msp_init)(dual_timer_handle_t *p_dual_timer)
Definition: gr55xx_hal_dual_tim.h:146
_dual_timer_handle::init
dual_timer_init_t init
Definition: gr55xx_hal_dual_tim.h:122
_dual_timer_handle::lock
__IO hal_lock_t lock
Definition: gr55xx_hal_dual_tim.h:124
_dual_timer_callback
HAL_DUAL_TIMER Callback function definition.
Definition: gr55xx_hal_dual_tim.h:145
hal_dual_timer_base_msp_init
void hal_dual_timer_base_msp_init(dual_timer_handle_t *p_dual_timer)
Initialize the DUAL TIMER MSP.
gr55xx_hal_def.h
This file contains HAL common definitions, enumeration, macros and structures definitions.