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 */
81 } hal_dual_timer_state_t;
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
107 } dual_timer_init_t;
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
128 } dual_timer_handle_t;
129 /** @} */
130
131 /** @} */
132
133 /** @addtogroup HAL_DUAL_TIMER_CALLBACK_STRUCTURES Callback Structures
134 * @{
135 */
136
137 /** @defgroup HAL_DUAL_TIMER_Callback Callback
138 * @{
139 */
140
141 /**
142 * @brief HAL_DUAL_TIMER Callback function definition
143 */
144
145 typedef struct _hal_dual_timer_callback
146 {
147 void (*dual_timer_msp_init)(dual_timer_handle_t *p_dual_timer); /**< DUAL_TIMER init MSP callback */
148 void (*dual_timer_msp_deinit)(dual_timer_handle_t *p_dual_timer); /**< DUAL_TIMER de-init MSP callback */
149 void (*dual_timer_period_elapsed_callback)(dual_timer_handle_t *p_dual_timer); /**< DUAL_TIMER period elapsed callback */
150 } hal_dual_timer_callback_t;
151 /** @} */
152
153 /** @} */
154
155 /**
156 * @defgroup HAL_DUAL_TIMER_MACRO Defines
157 * @{
158 */
159
160 /* Exported constants --------------------------------------------------------*/
161 /** @defgroup DUAL_TIMER_Exported_Constants DUAL TIMER Exported Constants
162 * @{
163 */
164
165 /** @defgroup DUAL_TIMER_Prescaler_Div DUAL TIMER Prescaler Division
166 * @{
167 */
168 #define DUAL_TIMER_PRESCALER_DIV0 LL_DUAL_TIMER_PRESCALER_DIV0 /**< 0 stage of prescale, clock is divided by 1. */
169 #define DUAL_TIMER_PRESCALER_DIV16 LL_DUAL_TIMER_PRESCALER_DIV16 /**< 4 stages of prescale, clock is divided by 16. */
170 #define DUAL_TIMER_PRESCALER_DIV256 LL_DUAL_TIMER_PRESCALER_DIV256 /**< 8 stages of prescale, clock is divided by 256. */
171 /** @} */
172
173 /** @defgroup DUAL_TIMER_Counter_Mode DUAL TIMER Counter Mode
174 * @{
175 */
176 #define DUAL_TIMER_COUNTERMODE_LOOP 0x00000000U /**< DUAL TIMER Loop mode.*/
177 #define DUAL_TIMER_COUNTERMODE_ONESHOT DUAL_TIMER_CTRL_ONESHOT /**< DUAL TIMER One-shot mode. */
178 /** @} */
179
180 /** @} */
181
182 /* Exported macro ------------------------------------------------------------*/
183 /** @defgroup DUAL_TIMER_Exported_Macros DUAL TIMER Exported Macros
184 * @{
185 */
186
187 /** @brief Reset DUAL TIMER handle states.
188 * @param __HANDLE__ DUAL TIMER handle.
189 * @retval None
190 */
191 #define __HAL_DUAL_TIMER_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->state = HAL_DUAL_TIMER_STATE_RESET)
192
193 /** @brief Enable the specified DUAL TIMER peripheral.
194 * @param __HANDLE__ Specifies the DUAL TIMER Handle.
195 * @retval None
196 */
197 #define __HAL_DUAL_TIMER_ENABLE(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->CTRL, DUAL_TIMER_CTRL_EN)
198
199 /** @brief Disable the specified DUAL TIMER peripheral.
200 * @param __HANDLE__ Specifies the DUAL TIMER Handle.
201 * @retval None
202 */
203 #define __HAL_DUAL_TIMER_DISABLE(__HANDLE__) CLEAR_BITS((__HANDLE__)->p_instance->CTRL, DUAL_TIMER_CTRL_EN)
204
205 /** @brief Enable the DUAL TIMER interrupt.
206 * @param __HANDLE__ Specifies the DUAL TIM Handle.
207 * @retval None
208 */
209 #define __HAL_DUAL_TIMER_ENABLE_IT(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->CTRL, DUAL_TIMER_CTRL_INTEN)
210
211 /** @brief Disable the DUAL TIMER interrupt.
212 * @param __HANDLE__ Specifies the DUAL TIM Handle.
213 * @retval None
214 */
215 #define __HAL_DUAL_TIMER_DISABLE_IT(__HANDLE__) CLEAR_BITS((__HANDLE__)->p_instance->CTRL, DUAL_TIMER_CTRL_INTEN)
216
217 /** @brief Check whether the DUAL TIMER interrupt has occurred or not.
218 * @param __HANDLE__ Specifies the DUAL TIMER Handle.
219 * @retval The new state of DUAL TIMER interrupt (SET or RESET).
220 */
221 #define __HAL_DUAL_TIMER_GET_FLAG_IT(__HANDLE__) ll_dual_timer_is_active_flag_it(__HANDLE__->p_instance)
222
223 /** @brief Clear the DUAL TIMER interrupt flag.
224 * @param __HANDLE__ Specifies the DUAL TIMER Handle.
225 * @retval None.
226 */
227 #define __HAL_DUAL_TIMER_CLEAR_FLAG_IT(__HANDLE__) ll_dual_timer_clear_flag_it(__HANDLE__->p_instance)
228
229 /** @} */
230
231 /* Private macros ------------------------------------------------------------*/
232 /** @defgroup DUAL_TIMER_Private_Macros DUAL TIMER Private Macros
233 * @{
234 */
235
236 /** @brief Check if DUAL TIMER prescaler is valid.
237 * @param __PRESCALER__ DUAL TIMER prescaler.
238 * @retval SET (__PRESCALER__ is valid) or RESET (__PRESCALER__ is invalid)
239 */
240 #define IS_DUAL_TIMER_PRESCALER(__PRESCALER__) (((__PRESCALER__) == DUAL_TIMER_PRESCALER_DIV0) || \
241 ((__PRESCALER__) == DUAL_TIMER_PRESCALER_DIV16) || \
242 ((__PRESCALER__) == DUAL_TIMER_PRESCALER_DIV256))
243
244 /** @brief Check if DUAL TIMER counter mode is valid.
245 * @param __MODE__ DUAL TIMER counter mode.
246 * @retval SET (__MODE__ is valid) or RESET (__MODE__ is invalid)
247 */
248 #define IS_DUAL_TIMER_COUNTERMODE(__MODE__) (((__MODE__) == DUAL_TIMER_COUNTERMODE_LOOP) || \
249 ((__MODE__) == DUAL_TIMER_COUNTERMODE_ONESHOT))
250 /** @} */
251
252 /** @} */
253
254 /* Exported functions --------------------------------------------------------*/
255 /** @addtogroup HAL_DUAL_TIMER_DRIVER_FUNCTIONS Functions
256 * @{
257 */
258
259 /** @addtogroup DUAL_TIMER_Exported_Functions_Group1 Initialization and de-initialization functions
260 * @brief Initialization and de-initialization functions
261 *
262 * @verbatim
263 ===============================================================================
264 ##### Initialization and de-initialization functions #####
265 ===============================================================================
266 [..]
267 This section provides functions allowing to:
268 (+) Initialize and configure the DUAL TIMER.
269 (+) De-initialize the DUAL TIMER.
270 (+) Start the Timer.
271 (+) Stop the Timer.
272 (+) Start the Timer and enable interrupt.
273 (+) Stop the Timer and disable interrupt.
274
275 @endverbatim
276 * @{
277 */
278
279 /**
280 ****************************************************************************************
281 * @brief Initialize the DUAL TIMER according to the specified parameters
282 * in the dual_timer_init_t and initialize the associated handle.
283 *
284 * @param[in] p_dual_timer: Pointer to a DUAL_TIMER handle which contains the configuration information for the specified DUAL TIMER.
285 *
286 * @retval ::HAL_OK: Operation is OK.
287 * @retval ::HAL_ERROR: Parameter error or operation not supported.
288 * @retval ::HAL_BUSY: Driver is busy.
289 * @retval ::HAL_TIMEOUT: Timeout occurred.
290 ****************************************************************************************
291 */
292 hal_status_t hal_dual_timer_base_init(dual_timer_handle_t *p_dual_timer);
293
294 /**
295 ****************************************************************************************
296 * @brief De-initialize the DUAL TIMER peripheral.
297 *
298 * @param[in] p_dual_timer: Pointer to a DUAL_TIM handle which contains the configuration information for the specified DUAL TIMER.
299 *
300 * @retval ::HAL_OK: Operation is OK.
301 * @retval ::HAL_ERROR: Parameter error or operation not supported.
302 * @retval ::HAL_BUSY: Driver is busy.
303 * @retval ::HAL_TIMEOUT: Timeout occurred.
304 ****************************************************************************************
305 */
306 hal_status_t hal_dual_timer_base_deinit(dual_timer_handle_t *p_dual_timer);
307
308 /**
309 ****************************************************************************************
310 * @brief Initialize the DUAL TIMER MSP.
311 *
312 * @note This function should not be modified. When the callback is needed,
313 * the hal_dual_timer_base_msp_init could be implemented in the user file
314 *
315 * @param[in] p_dual_timer: Pointer to a DUAL_TIMER handle which contains the configuration information for the specified DUAL TIMER.
316 ****************************************************************************************
317 */
318 void hal_dual_timer_base_msp_init(dual_timer_handle_t *p_dual_timer);
319
320 /**
321 ****************************************************************************************
322 * @brief De-initialize the DUAL TIMER MSP.
323 *
324 * @note This function should not be modified. When the callback is needed,
325 * the hal_dual_timer_base_msp_deinit could be implemented in the user file
326 *
327 * @param[in] p_dual_timer: Pointer to a DUAL_TIM handle which contains the configuration information for the specified DUAL TIMER.
328 ****************************************************************************************
329 */
330 void hal_dual_timer_base_msp_deinit(dual_timer_handle_t *p_dual_timer);
331
332 /**
333 ****************************************************************************************
334 * @brief Starts the DUAL TIMER counter.
335 *
336 * @param[in] p_dual_timer: Pointer to a DUAL_TIMER handle which contains the configuration information for the specified DUAL TIMER.
337 *
338 * @retval ::HAL_OK: Operation is OK.
339 * @retval ::HAL_ERROR: Parameter error or operation not supported.
340 * @retval ::HAL_BUSY: Driver is busy.
341 * @retval ::HAL_TIMEOUT: Timeout occurred.
342 ****************************************************************************************
343 */
344 hal_status_t hal_dual_timer_base_start(dual_timer_handle_t *p_dual_timer);
345
346 /**
347 ****************************************************************************************
348 * @brief Stops the DUAL TIMER counter.
349 *
350 * @param[in] p_dual_timer: Pointer to a DUAL_TIM handle which contains the configuration information for the specified DUAL TIMER.
351 *
352 * @retval ::HAL_OK: Operation is OK.
353 * @retval ::HAL_ERROR: Parameter error or operation not supported.
354 * @retval ::HAL_BUSY: Driver is busy.
355 * @retval ::HAL_TIMEOUT: Timeout occurred.
356 ****************************************************************************************
357 */
358 hal_status_t hal_dual_timer_base_stop(dual_timer_handle_t *p_dual_timer);
359
360 /**
361 ****************************************************************************************
362 * @brief Starts the DUAL TIMER counter in interrupt mode.
363 *
364 * @param[in] p_dual_timer: Pointer to a DUAL_TIM handle which contains the configuration information for the specified DUAL TIMER.
365 *
366 * @retval ::HAL_OK: Operation is OK.
367 * @retval ::HAL_ERROR: Parameter error or operation not supported.
368 * @retval ::HAL_BUSY: Driver is busy.
369 * @retval ::HAL_TIMEOUT: Timeout occurred.
370 ****************************************************************************************
371 */
372 hal_status_t hal_dual_timer_base_start_it(dual_timer_handle_t *p_dual_timer);
373
374 /**
375 ****************************************************************************************
376 * @brief Stops the DUAL TIMER counter in interrupt mode.
377 *
378 * @param[in] p_dual_timer: Pointer to a DUAL_TIMER handle which contains the configuration information for the specified DUAL TIMER.
379 *
380 * @retval ::HAL_OK: Operation is OK.
381 * @retval ::HAL_ERROR: Parameter error or operation not supported.
382 * @retval ::HAL_BUSY: Driver is busy.
383 * @retval ::HAL_TIMEOUT: Timeout occurred.
384 ****************************************************************************************
385 */
386 hal_status_t hal_dual_timer_base_stop_it(dual_timer_handle_t *p_dual_timer);
387
388 /** @} */
389
390 /** @addtogroup DUAL_TIMER_IRQ_Handler_and_Callbacks IRQ Handler and Callbacks
391 * @brief IRQ Handler and Callbacks functions
392 * @{
393 */
394
395 /**
396 ****************************************************************************************
397 * @brief Handle DUAL TIMER interrupt request.
398 *
399 * @param[in] p_dual_timer: Pointer to a DUAL_TIMER handle which contains the configuration information for the specified DUAL TIMER.
400 ****************************************************************************************
401 */
402 void hal_dual_timer_irq_handler(dual_timer_handle_t *p_dual_timer);
403
404 /**
405 ****************************************************************************************
406 * @brief Period elapsed callback in non-blocking mode.
407 *
408 * @note This function should not be modified. When the callback is needed,
409 * the hal_dual_timer_period_elapsed_callback can be implemented in the user file.
410 *
411 * @param[in] p_dual_timer: Pointer to a DUAL_TIMER handle which contains the configuration information for the specified DUAL TIMER.
412 ****************************************************************************************
413 */
414 void hal_dual_timer_period_elapsed_callback(dual_timer_handle_t *p_dual_timer);
415
416 /** @} */
417
418 /** @addtogroup DUAL_TIMER_Exported_Functions_Group2 Peripheral Control and State functions
419 * @brief DUAL TIMER Peripheral State functions
420 *
421 @verbatim
422 ==============================================================================
423 ##### Peripheral Control and State functions #####
424 ==============================================================================
425 [..]
426 This subsection provides functions allowing to :
427 (+) Return the DUAL TIMER handle state.
428 (+) Configure the DUAL TIMER.
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 */
446 hal_dual_timer_state_t hal_dual_timer_get_state(dual_timer_handle_t *p_dual_timer);
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 */
461 hal_status_t hal_dual_timer_set_config(dual_timer_handle_t *p_dual_timer, dual_timer_init_t *p_structure);
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 */
477 hal_status_t hal_dual_timer_set_background_reload(dual_timer_handle_t *p_dual_timer, uint32_t reload_value);
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_dual_timer_callback_t
struct _hal_dual_timer_callback hal_dual_timer_callback_t
HAL_DUAL_TIMER Callback function definition.
hal_lock_t
hal_lock_t
HAL Lock structures definition.
Definition: gr55xx_hal_def.h:81
_hal_dual_timer_callback
HAL_DUAL_TIMER Callback function definition.
Definition: gr55xx_hal_dual_tim.h:146
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_callback::dual_timer_msp_init
void(* dual_timer_msp_init)(dual_timer_handle_t *p_dual_timer)
Definition: gr55xx_hal_dual_tim.h:147
HAL_DUAL_TIMER_STATE_ERROR
@ HAL_DUAL_TIMER_STATE_ERROR
Definition: gr55xx_hal_dual_tim.h:80
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_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
_hal_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:148
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
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_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:149
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_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
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.