gr55xx_hal_rtc.h
Go to the documentation of this file.
1 /**
2  ****************************************************************************************
3  *
4  * @file gr55xx_hal_rtc.h
5  * @author BLE Driver Team
6  * @brief Header file containing functions prototypes of RTC 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_RTC RTC
47  * @brief RTC HAL module driver.
48  * @{
49  */
50 
51 #ifndef __GR55XX_HAL_RTC_H__
52 #define __GR55XX_HAL_RTC_H__
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
58 /* Includes ------------------------------------------------------------------*/
59 #include "gr55xx_ll_rtc.h"
60 #include "gr55xx_hal_def.h"
61 
62 /**
63  * @defgroup HAL_RTC_MACRO Defines
64  * @{
65  */
66 
67 /* Exported constants --------------------------------------------------------*/
68 /** @defgroup RTC_Exported_Constants RTC Exported Constants
69  * @{
70  */
71 
72 /** @defgroup RTC_INTERRUPT_STATUS RTC Interrupt Status
73  * @{
74  */
75 #define RTC_FLAG_ALARM RTC_INT_STAT_ALARM /**< Alarm interrupt flag */
76 #define RTC_FLAG_WRAP RTC_INT_STAT_WRAP /**< Wrap interrupt flag */
77 #define RTC_FLAG_TICK RTC_INT_STAT_TICK /**< Tick interrupt flag */
78 /** @} */
79 
80 /** @defgroup RTC_INTERRUPT_ENABLE RTC Interrupt Enable
81  * @{
82  */
83 #define RTC_IT_ALARM RTC_INT_EN_ALARM /**< Alarm interrupt */
84 #define RTC_IT_WRAP RTC_INT_EN_WRAP /**< Wrap interrupt */
85 #define RTC_IT_TICK RTC_INT_EN_TICK /**< Tick interrupt */
86 /** @} */
87 
88 /** @defgroup RTC_Error_Code_definition RTC Error Code definition
89  * @{
90  */
91 #define HAL_RTC_ERROR_NONE (0x00000000U) /**< No error */
92 #define HAL_RTC_ERROR_INVALID_PARAM (0x00000001U) /**< Invalid parameter error */
93 #define HAL_RTC_ERROR_TIMEOUT (0x00000002U) /**< Timeout error */
94 /** @} */
95 
96 /** @defgroup RTC_CLOCK_DIV Clock divider
97  * @{
98  */
99 #define RTC_DIV_NONE LL_RTC_DIV_NONE /**< Select SLP_CLK */
100 #define RTC_DIV_2 LL_RTC_DIV_2 /**< Select 1/32 divider */
101 #define RTC_DIV_4 LL_RTC_DIV_4 /**< Select 1/32 divider */
102 #define RTC_DIV_8 LL_RTC_DIV_8 /**< Select 1/32 divider */
103 #define RTC_DIV_16 LL_RTC_DIV_16 /**< Select 1/32 divider */
104 #define RTC_DIV_32 LL_RTC_DIV_32 /**< Select 1/64 divider */
105 #define RTC_DIV_64 LL_RTC_DIV_64 /**< Select 1/128 divider */
106 #define RTC_DIV_128 LL_RTC_DIV_128 /**< Select 1/256 divider */
107 /** @} */
108 
109 /** @defgroup RTC_TICK relaod mode
110  * @{
111  */
112 #define ONE_TIME LL_RTC_TIMER_TICK_TYPE_SINGLE /**< Select periodic alarm one-time */
113 #define AUTO_RELOAD LL_RTC_TIMER_TICK_TYPE_AUTO /**< Select periodic alarm auto-reload */
114 /** @} */
115 
116 /** @} */
117 
118 /* Private macros ------------------------------------------------------------*/
119 /** @defgroup RTC_Private_Macro RTC Private Macros
120  * @{
121  */
122 
123 #define __HAL_RTC_DISABLE(RTCx) MODIFY_REG(RTCx->CFG0, 0xFFFFFFFF, RTC_CFG0_CFG); /**<set all 0 to CFG0 registers */
124 
125 #define __HAL_RTC_ENABLE(RTCx) SET_BITS(RTCx->CFG0, RTC_CFG0_CFG | RTC_CFG0_EN); /**<set CFG0[0] to 1 */
126 
127 #define __HAL_RTC_BUSY_FLAG(RTCx) ((READ_BITS(RTCx->STAT, RTC_STAT_BUSY) == RTC_STAT_BUSY))
128 
129 #define __HAL_RTC_CLEAR_FLAG(RTCx, __FLAG__) WRITE_REG(RTCx->INT_STAT, (__FLAG__))
130 
131 #define __HAL_RTC_ENABLE_IT(RTCx, __INTERRUPT__) SET_BITS(RTCx->INT_EN, (__INTERRUPT__))
132 
133 #define __HAL_RTC_DISABLE_IT(RTCx, __INTERRUPT__) CLEAR_BITS(RTCx->INT_EN, (__INTERRUPT__))
134 
135 #define __HAL_RTC_GET_IT_SOURCE(RTCx, __FLAG__) (READ_BITS(RTCx->INT_STAT, (__FLAG__)) == (__FLAG__))
136 
137 #define __HAL_RTC_CFG_EFFECT(RTCx) SET_BITS(RTCx->CFG0, RTC_CFG0_CFG) /**<set config takes effect */
138 
139 /** @} */
140 
141 /** @} */
142 
143 /* Exported types ------------------------------------------------------------*/
144 /** @addtogroup HAL_RTC_ENUMERATIONS Enumerations
145  * @{
146  */
147 
148 /**
149  * @brief hal_rtc_state definition
150  */
151 typedef enum
152 {
153  HAL_RTC_READY = 0x00U,
158 
159 /**
160  * @brief rtc_tick_state definition
161  */
162 typedef enum
163 {
164  TICK_READY = 0x00U,
166  TICK_ERROR
168 
169 /**
170  * @brief rtc_alarm_state definition
171  */
172 typedef enum
173 {
174  ALARM_READY = 0x00U,
178 
179 /**
180  * @brief overflow config
181  */
182 typedef enum
183 {
184  CLOSED = 0x00U,
185  OPENED = !CLOSED
187 
188 /** @} */
189 
190 /** @addtogroup HAL_RTC_STRUCTURES Structures
191  * @{
192  */
193 
194 /**
195  * @brief rtc init params
196  * @attention count up from zero if not set start_value.
197  */
198 typedef struct _rtc_init_t
199 {
200 
201  uint32_t start_value;
202 
203  uint32_t prescaler_div;
204 
206 
208 
209 typedef struct _tick_handle_t
210 {
211  uint8_t mode;
212 
213  uint32_t value;
214 
216 
218 
219 typedef struct _alarm_handle_t
220 {
221  uint32_t value;
222 
224 
226 
227 
228 /**
229  * @brief rtc handle definition
230  */
231 typedef struct _rtc_handle_t
232 {
233  rtc_regs_t *p_instance; /*!< Register base address */
234 
235  rtc_init_t init; /*!< RTC required parameters */
236 
237  tick_handle_t tick; /*!< tick_handle */
238 
239  alarm_handle_t alarm; /*!< alarm_handle */
240 
241  hal_lock_t lock; /*!< RTC locking object */
242 
243  __IO hal_rtc_state_t state; /*!< Time communication state */
244 
245  __IO uint32_t error_code; /**< RTC Error code */
246 
248 
249 /** @} */
250 
251 /** @addtogroup HAL_RTC_CALLBACK_STRUCTURES Callback Structures
252  * @{
253  */
254 
255 /** @defgroup RTC_Callback RTC Callback
256  * @{
257  */
258 
259 /**
260  * @brief HAL_RTC Callback function definition
261  */
262 
263 typedef struct _hal_rtc_callback
264 {
265  void (*rtc_alarm_callback)(rtc_handle_t *p_rtc); /**< RTC alarm count complete callback */
266  void (*rtc_tick_callback)(rtc_handle_t *p_rtc); /**< RTC tick count complete callback */
267  void (*rtc_overflow_callback)(rtc_handle_t *p_rtc); /**< RTC overflow callback */
269 
270 /** @} */
271 
272 /** @} */
273 
274 /* Exported functions --------------------------------------------------------*/
275 /** @addtogroup HAL_RTC_DRIVER_FUNCTIONS Functions
276  * @{
277  */
278 
279 /** @addtogroup RTC_Exported_Functions_Group1 Initialization and de-initialization Functions
280  * @brief Initialization and Configuration functions
281  * @{
282  */
283 
284 /**
285  ****************************************************************************************
286  * @brief Initialize the RTC according to the specified parameters in the
287  * rtc_init_t of associated handle.counter start after hal_rtc_init.
288  *
289  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
290  * information for the specified RTC module.
291  *
292  * @retval ::HAL_OK: Operation is OK.
293  * @retval ::HAL_ERROR: Parameter error or operation not supported.
294  * @retval ::HAL_BUSY: Driver is busy.
295  * @retval ::HAL_TIMEOUT: Timeout occurred.
296  ****************************************************************************************
297  */
299 
300 /**
301  ****************************************************************************************
302  * @brief DeInitialize the RTC according to the specified parameters in the
303  * rtc_init_t of associated handle.counter stop after hal_rtc_deinit.
304  *
305  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
306  * information for the specified RTC module.
307  *
308  * @retval ::HAL_OK: Operation is OK.
309  * @retval ::HAL_ERROR: Parameter error or operation not supported.
310  * @retval ::HAL_BUSY: Driver is busy.
311  * @retval ::HAL_TIMEOUT: Timeout occurred.
312  ****************************************************************************************
313  */
315 
316 /**
317  ****************************************************************************************
318  * @brief Start counting down for tick module
319  *
320  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
321  * information for the specified RTC module.
322  * @param mode: ONE_TIME/AUTO_RELOAD
323  * @param value: The tick start which start counting down
324  *
325  * @retval ::HAL_OK: Operation is OK.
326  * @retval ::HAL_ERROR: Parameter error or operation not supported.
327  * @retval ::HAL_BUSY: Driver is busy.
328  * @retval ::HAL_TIMEOUT: Timeout occurred.
329  ****************************************************************************************
330  */
331 hal_status_t hal_rtc_set_tick_and_start(rtc_handle_t *p_rtc, uint8_t mode,uint32_t value);
332 
333 /**
334  ****************************************************************************************
335  * @brief Stop counting down for tick module
336  *
337  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
338  * information for the specified RTC module.
339  *
340  * @retval ::HAL_OK: Operation is OK.
341  * @retval ::HAL_ERROR: Parameter error or operation not supported.
342  * @retval ::HAL_BUSY: Driver is busy.
343  * @retval ::HAL_TIMEOUT: Timeout occurred.
344  ****************************************************************************************
345  */
347 
348 /**
349  ****************************************************************************************
350  * @brief Restart tick module and continue run with the previous settings.
351  * This function need be called after hal_rtc_stop_tick
352  *
353  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
354  * information for the specified RTC module.
355  *
356  * @retval ::HAL_OK: Operation is OK.
357  * @retval ::HAL_ERROR: Parameter error or operation not supported.
358  * @retval ::HAL_BUSY: Driver is busy.
359  * @retval ::HAL_TIMEOUT: Timeout occurred.
360  ****************************************************************************************
361  */
363 /**
364  ****************************************************************************************
365  * @brief Compare counter with alarm_value for alarm module
366  *
367  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
368  * information for the specified RTC module.
369  * @param value: The value of alarm
370  *
371  * @retval ::HAL_OK: Operation is OK.
372  * @retval ::HAL_ERROR: Parameter error or operation not supported.
373  * @retval ::HAL_BUSY: Driver is busy.
374  * @retval ::HAL_TIMEOUT: Timeout occurred.
375  ****************************************************************************************
376  */
378 
379 /**
380  ****************************************************************************************
381  * @brief Stop counting up and compare with alarm_value for alarm module
382  *
383  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
384  * information for the specified RTC module.
385  *
386  * @retval ::HAL_OK: Operation is OK.
387  * @retval ::HAL_ERROR: Parameter error or operation not supported.
388  * @retval ::HAL_BUSY: Driver is busy.
389  * @retval ::HAL_TIMEOUT: Timeout occurred.
390  ****************************************************************************************
391  */
393 
394 /**
395  ****************************************************************************************
396  * @brief Clear wrap count
397  *
398  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
399  * information for the specified RTC module.
400  *
401  * @retval ::HAL_OK: Operation is OK.
402  * @retval ::HAL_ERROR: Parameter error or operation not supported.
403  * @retval ::HAL_BUSY: Driver is busy.
404  * @retval ::HAL_TIMEOUT: Timeout occurred.
405  ****************************************************************************************
406  */
408 
409 /**
410  ****************************************************************************************
411  * @brief Get the times of overflow
412  *
413  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
414  * information for the specified RTC module.
415  *
416  * @retval ::uint32_t
417  ****************************************************************************************
418  */
420 
421 /**
422  ****************************************************************************************
423  * @brief Get_cur_count_value
424  *
425  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
426  * information for the specified RTC module.
427  *
428  * @retval ::uint32_t
429  ****************************************************************************************
430  */
432 
433 /**
434  ****************************************************************************************
435  * @brief Get_cur_tick_value
436  *
437  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
438  * information for the specified RTC module.
439  *
440  * @retval ::uint32_t
441  ****************************************************************************************
442  */
444 
445 /**
446  ****************************************************************************************
447  * @brief Get_alarm_value
448  *
449  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
450  * information for the specified RTC module.
451  *
452  * @retval ::uint32_t
453  ****************************************************************************************
454  */
456 
457 /**
458  ****************************************************************************************
459  * @brief Get_cur_rtc_state
460  *
461  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
462  * information for the specified RTC module.
463  *
464  * @retval ::HAL_OK: Operation is OK.
465  * @retval ::HAL_ERROR: Parameter error or operation not supported.
466  * @retval ::HAL_BUSY: Driver is busy.
467  * @retval ::HAL_TIMEOUT: Timeout occurred.
468  ****************************************************************************************
469  */
471 
472 /** @} */
473 
474 /** @addtogroup RTC_IRQ_Handler_and_Callbacks IRQ Handler and Callbacks
475  * @brief IRQ Handler and Callbacks functions
476  * @{
477  */
478 
479 /**
480  ****************************************************************************************
481  * @brief RTC_IRQHandler
482  *
483  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
484  * information for the specified RTC module.
485  ****************************************************************************************
486  */
488 
489 /**
490  ****************************************************************************************
491  * @brief alarm_callback
492  *
493  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
494  * information for the specified RTC module.
495  ****************************************************************************************
496  */
498 
499 /**
500  ****************************************************************************************
501  * @brief overflow_callback
502  *
503  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
504  * information for the specified RTC module.
505  ****************************************************************************************
506  */
508 
509 /**
510  ****************************************************************************************
511  * @brief tick_callback
512  *
513  * @param[in] p_rtc: Pointer to a RTC handle which contains the configuration
514  * information for the specified RTC module.
515  ****************************************************************************************
516  */
518 
519 /** @} */
520 
521 /** @} */
522 
523 #ifdef __cplusplus
524 }
525 #endif
526 
527 #endif
528 
529 /** @} */
530 
531 /** @} */
532 
533 /** @} */
hal_rtc_restart_tick
hal_status_t hal_rtc_restart_tick(rtc_handle_t *p_rtc)
Restart tick module and continue run with the previous settings. This function need be called after h...
_rtc_handle_t::init
rtc_init_t init
Definition: gr55xx_hal_rtc.h:235
hal_lock_t
hal_lock_t
HAL Lock structures definition.
Definition: gr55xx_hal_def.h:81
hal_rtc_deinit
hal_status_t hal_rtc_deinit(rtc_handle_t *p_rtc)
DeInitialize the RTC according to the specified parameters in the rtc_init_t of associated handle....
hal_rtc_get_cur_count
uint32_t hal_rtc_get_cur_count(rtc_handle_t *p_rtc)
Get_cur_count_value.
_alarm_handle_t::state
__IO rtc_alarm_state_t state
Definition: gr55xx_hal_rtc.h:223
hal_rtc_alarm_callback
void hal_rtc_alarm_callback(rtc_handle_t *p_rtc)
alarm_callback
_rtc_init_t::prescaler_div
uint32_t prescaler_div
Definition: gr55xx_hal_rtc.h:203
HAL_RTC_RUNNING
@ HAL_RTC_RUNNING
Definition: gr55xx_hal_rtc.h:155
_rtc_init_t
rtc init params
Definition: gr55xx_hal_rtc.h:199
hal_rtc_tick_callback
void hal_rtc_tick_callback(rtc_handle_t *p_rtc)
tick_callback
HAL_RTC_RESET
@ HAL_RTC_RESET
Definition: gr55xx_hal_rtc.h:154
_tick_handle_t::state
__IO rtc_tick_state_t state
Definition: gr55xx_hal_rtc.h:215
HAL_RTC_ERROR
@ HAL_RTC_ERROR
Definition: gr55xx_hal_rtc.h:156
_rtc_handle_t::lock
hal_lock_t lock
Definition: gr55xx_hal_rtc.h:241
hal_rtc_get_state
hal_rtc_state_t hal_rtc_get_state(rtc_handle_t *p_rtc)
Get_cur_rtc_state.
_alarm_handle_t::value
uint32_t value
Definition: gr55xx_hal_rtc.h:221
tick_handle_t
struct _tick_handle_t tick_handle_t
_rtc_init_t::overflow_det_state
overflow_det_t overflow_det_state
Definition: gr55xx_hal_rtc.h:205
hal_rtc_stop_alarm
hal_status_t hal_rtc_stop_alarm(rtc_handle_t *p_rtc)
Stop counting up and compare with alarm_value for alarm module.
ALARM_READY
@ ALARM_READY
Definition: gr55xx_hal_rtc.h:174
hal_rtc_state_t
hal_rtc_state_t
hal_rtc_state definition
Definition: gr55xx_hal_rtc.h:152
_hal_rtc_callback
HAL_RTC Callback function definition.
Definition: gr55xx_hal_rtc.h:264
_alarm_handle_t
Definition: gr55xx_hal_rtc.h:220
HAL_RTC_READY
@ HAL_RTC_READY
Definition: gr55xx_hal_rtc.h:153
hal_rtc_irq_handler
void hal_rtc_irq_handler(rtc_handle_t *p_rtc)
RTC_IRQHandler.
_rtc_handle_t
rtc handle definition
Definition: gr55xx_hal_rtc.h:232
_rtc_handle_t::alarm
alarm_handle_t alarm
Definition: gr55xx_hal_rtc.h:239
OPENED
@ OPENED
Definition: gr55xx_hal_rtc.h:185
hal_rtc_get_cur_tick
uint32_t hal_rtc_get_cur_tick(rtc_handle_t *p_rtc)
Get_cur_tick_value.
_tick_handle_t
Definition: gr55xx_hal_rtc.h:210
rtc_handle_t
struct _rtc_handle_t rtc_handle_t
rtc handle definition
hal_rtc_stop_tick
hal_status_t hal_rtc_stop_tick(rtc_handle_t *p_rtc)
Stop counting down for tick module.
_hal_rtc_callback::rtc_tick_callback
void(* rtc_tick_callback)(rtc_handle_t *p_rtc)
Definition: gr55xx_hal_rtc.h:266
_hal_rtc_callback::rtc_alarm_callback
void(* rtc_alarm_callback)(rtc_handle_t *p_rtc)
Definition: gr55xx_hal_rtc.h:265
rtc_alarm_state_t
rtc_alarm_state_t
rtc_alarm_state definition
Definition: gr55xx_hal_rtc.h:173
ALARM_RUNNING
@ ALARM_RUNNING
Definition: gr55xx_hal_rtc.h:175
_rtc_handle_t::state
__IO hal_rtc_state_t state
Definition: gr55xx_hal_rtc.h:243
_rtc_handle_t::tick
tick_handle_t tick
Definition: gr55xx_hal_rtc.h:237
hal_rtc_clear_wrap
hal_status_t hal_rtc_clear_wrap(rtc_handle_t *p_rtc)
Clear wrap count.
TICK_READY
@ TICK_READY
Definition: gr55xx_hal_rtc.h:164
hal_rtc_get_alarm_value
uint32_t hal_rtc_get_alarm_value(rtc_handle_t *p_rtc)
Get_alarm_value.
hal_rtc_get_wrap_count
uint32_t hal_rtc_get_wrap_count(rtc_handle_t *p_rtc)
Get the times of overflow.
CLOSED
@ CLOSED
Definition: gr55xx_hal_rtc.h:184
hal_rtc_set_alarm
hal_status_t hal_rtc_set_alarm(rtc_handle_t *p_rtc, uint32_t value)
Compare counter with alarm_value for alarm module.
TICK_ERROR
@ TICK_ERROR
Definition: gr55xx_hal_rtc.h:166
TICK_RUNNING
@ TICK_RUNNING
Definition: gr55xx_hal_rtc.h:165
alarm_handle_t
struct _alarm_handle_t alarm_handle_t
_rtc_handle_t::error_code
__IO uint32_t error_code
Definition: gr55xx_hal_rtc.h:245
_tick_handle_t::mode
uint8_t mode
Definition: gr55xx_hal_rtc.h:211
gr55xx_ll_rtc.h
Header file containing functions prototypes of CALENDAR LL library.
_hal_rtc_callback::rtc_overflow_callback
void(* rtc_overflow_callback)(rtc_handle_t *p_rtc)
Definition: gr55xx_hal_rtc.h:267
hal_status_t
hal_status_t
HAL Status structures definition.
Definition: gr55xx_hal_def.h:70
overflow_det_t
overflow_det_t
overflow config
Definition: gr55xx_hal_rtc.h:183
hal_rtc_callback_t
struct _hal_rtc_callback hal_rtc_callback_t
HAL_RTC Callback function definition.
hal_rtc_init
hal_status_t hal_rtc_init(rtc_handle_t *p_rtc)
Initialize the RTC according to the specified parameters in the rtc_init_t of associated handle....
_tick_handle_t::value
uint32_t value
Definition: gr55xx_hal_rtc.h:213
rtc_init_t
struct _rtc_init_t rtc_init_t
rtc init params
hal_rtc_set_tick_and_start
hal_status_t hal_rtc_set_tick_and_start(rtc_handle_t *p_rtc, uint8_t mode, uint32_t value)
Start counting down for tick module.
ALARM_ERROR
@ ALARM_ERROR
Definition: gr55xx_hal_rtc.h:176
rtc_tick_state_t
rtc_tick_state_t
rtc_tick_state definition
Definition: gr55xx_hal_rtc.h:163
hal_rtc_overflow_callback
void hal_rtc_overflow_callback(rtc_handle_t *p_rtc)
overflow_callback
_rtc_init_t::start_value
uint32_t start_value
Definition: gr55xx_hal_rtc.h:201
_rtc_handle_t::p_instance
rtc_regs_t * p_instance
Definition: gr55xx_hal_rtc.h:233
gr55xx_hal_def.h
This file contains HAL common definitions, enumeration, macros and structures definitions.