gr55xx_hal_pwr.h
Go to the documentation of this file.
1 /**
2 ****************************************************************************************
3 *
4 * @file gr55xx_hal_pwr.h
5 * @author BLE Driver Team
6 * @brief Header file containing functions prototypes of PWR 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_PWR PWR
47 * @brief PWR HAL module driver.
48 * @{
49 */
50
51 /* Define to prevent recursive inclusion -------------------------------------*/
52 #ifndef __GR55xx_HAL_PWR_H__
53 #define __GR55xx_HAL_PWR_H__
54
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58
59 /* Includes ------------------------------------------------------------------*/
60 #include "gr55xx_ll_pwr.h"
61 #include "gr55xx_hal_def.h"
62
63 /* Exported types ------------------------------------------------------------*/
64
65 /** @addtogroup HAL_PWR_CALLBACK_STRUCTURES Callback Structures
66 * @{
67 */
68
69 /** @defgroup HAL_PWR_SLEEP_ELAPSED_HANDLER HAL PWR sleep elapsed handler define
70 * @{
71 */
72
73 /**
74 * @brief PWR Sleep Timer Elapsed callback
75 */
76
77 typedef void (*pwr_slp_elapsed_handler_t)(void);
78
79 /** @} */
80
81
82 /** @defgroup HAL_PWR_CALLBACK_HANDLER PWR callback handle
83 * @{
84 */
85
86 /**
87 * @brief PWR callback handle Structure definition
88 */
89 typedef struct _hal_pwr_handler
90 {
91 pwr_slp_elapsed_handler_t pwr_slp_elapsed_hander; /**< PWR sleep timer elapsed callback */
92 } hal_pwr_handler_t;
93
94 /** @} */
95
96 /** @} */
97
98 /**
99 * @defgroup HAL_PWR_MACRO Defines
100 * @{
101 */
102
103 /* Exported constants --------------------------------------------------------*/
104 /** @defgroup PWR_Exported_Constants PWR Exported Constants
105 * @{
106 */
107
108 /** @defgroup PWR_WakeUp_Pins PWR WakeUp Pins
109 * @{
110 */
111 #define PWR_EXTWKUP_PIN0 LL_PWR_EXTWKUP_PIN0 /**< External wakeup pin 0 */
112 #define PWR_EXTWKUP_PIN1 LL_PWR_EXTWKUP_PIN1 /**< External wakeup pin 1 */
113 #define PWR_EXTWKUP_PIN2 LL_PWR_EXTWKUP_PIN2 /**< External wakeup pin 2 */
114 #define PWR_EXTWKUP_PIN3 LL_PWR_EXTWKUP_PIN3 /**< External wakeup pin 3 */
115 #define PWR_EXTWKUP_PIN4 LL_PWR_EXTWKUP_PIN4 /**< External wakeup pin 4 */
116 #define PWR_EXTWKUP_PIN5 LL_PWR_EXTWKUP_PIN5 /**< External wakeup pin 5 */
117 #define PWR_EXTWKUP_PIN6 LL_PWR_EXTWKUP_PIN6 /**< External wakeup pin 6 */
118 #define PWR_EXTWKUP_PIN7 LL_PWR_EXTWKUP_PIN7 /**< External wakeup pin 7 */
119 #define PWR_EXTWKUP_PIN_ALL LL_PWR_EXTWKUP_PIN_ALL /**< External wakeup pin 0 ~ 7 */
120 /** @} */
121
122 /** @defgroup PWR_WakeUp_Conditions PWR Wakeup Condition
123 * @{
124 */
125 #define PWR_WKUP_COND_EXT LL_PWR_WKUP_COND_EXT /**< External wakeup: AON_GPIO */
126 #define PWR_WKUP_COND_TIMER LL_PWR_WKUP_COND_TIMER /**< AON Timer wakeup */
127 #define PWR_WKUP_COND_BLE LL_PWR_WKUP_COND_BLE /**< BLE wakeup */
128 #define PWR_WKUP_COND_CALENDAR LL_PWR_WKUP_COND_CALENDAR /**< Calendar wakeup */
129 #define PWR_WKUP_COND_BOD_FEDGE LL_PWR_WKUP_COND_BOD_FEDGE /**< PMU Bod falling edge wakeup */
130 #define PWR_WKUP_COND_MSIO_COMP LL_PWR_WKUP_COND_MSIO_COMP /**< Msio comparator wakeup */
131 #define PWR_WKUP_COND_ALL LL_PWR_WKUP_COND_ALL /**< All wakeup sources mask */
132
133 /** @} */
134
135 /** @defgroup PWR_External_WakeUp_Type PWR External Wakeup Type
136 * @{
137 */
138 #define PWR_EXTWKUP_TYPE_LOW LL_PWR_EXTWKUP_TYPE_LOW /**< Low level wakeup */
139 #define PWR_EXTWKUP_TYPE_HIGH LL_PWR_EXTWKUP_TYPE_HIGH /**< High level wakeup */
140 #define PWR_EXTWKUP_TYPE_RISING LL_PWR_EXTWKUP_TYPE_RISING /**< Rising edge wakeup */
141 #define PWR_EXTWKUP_TYPE_FALLING LL_PWR_EXTWKUP_TYPE_FALLING /**< Falling edge wakeup */
142 /** @} */
143
144 /** @defgroup PWR_Sleep_Timer_Mode PWR Sleep Timer Mode
145 * @{
146 */
147 #define PWR_SLP_TIMER_MODE_NORMAL 0x0U /**< Start counting after sleeping and disabled when waked up */
148 #define PWR_SLP_TIMER_MODE_SINGLE 0x1U /**< Single mode(keep counting until finished) */
149 #define PWR_SLP_TIMER_MODE_RELOAD 0x2U /**< Auto reload */
150 #define PWR_SLP_TIMER_MODE_DISABLE 0x3U /**< Disabled (used for reset mode) */
151 /** @} */
152
153 /** @defgroup PWR_Timer_Type PWR Timer Type
154 * @{
155 */
156 #define PWR_TIMER_TYPE_CAL_TIMER LL_PWR_TIMER_READ_SEL_CAL_TIMER /**< Calendar timer */
157 #define PWR_TIMER_TYPE_AON_WDT LL_PWR_TIMER_READ_SEL_AON_WDT /**< AON watchdog timer */
158 #define PWR_TIMER_TYPE_SLP_TIMER LL_PWR_TIMER_READ_SEL_SLP_TIMER /**< Sleep timer */
159 #define PWR_TIMER_TYPE_CAL_ALARM LL_PWR_TIMER_READ_SEL_CAL_ALARM /**< Calendar timer */
160 /** @} */
161
162
163 /** @defgroup PWR_Memory_Power_State Memory Power State
164 * @{
165 */
166 #define PWR_MEM_POWER_OFF LL_PWR_MEM_POWER_OFF /**< Power off */
167 #define PWR_MEM_POWER_FULL LL_PWR_MEM_POWER_FULL /**< Full power */
168 #define PWR_MEM_POWER_RETENTION LL_PWR_MEM_POWER_RETENTION /**< Power retention, low valtage mode */
169 /** @} */
170
171 /** @defgroup PWR_Communication_Power_State Communication Power State
172 * @{
173 */
174 #define PWR_COMM_TIMER_POWER_DOWN 0x0U /**< Power down communication timer */
175 #define PWR_COMM_TIMER_POWER_UP 0x1U /**< Power on communication timer */
176 #define PWR_COMM_CORE_POWER_DOWN 0x0U /**< Power down communication core */
177 #define PWR_COMM_CORE_POWER_UP 0x1U /**< Power on communication core */
178 /** @} */
179
180 /** @defgroup PWR_Communication_Mode Communication Mode
181 * @{
182 */
183 #define PWR_COMM_TIMER_MODE_RESET 0x0U /**< Communication timer in reset mode */
184 #define PWR_COMM_TIMER_MODE_RUNNING 0x1U /**< Communication timer in running mode */
185 #define PWR_COMM_CORE_MODE_RESET 0x0U /**< Communication core in reset mode */
186 #define PWR_COMM_CORE_MODE_RUNNING 0x1U /**< Communication core in running mode */
187 /** @} */
188
189 /** @defgroup PWR_Timeout_definition PWR Timeout definition
190 * @{
191 */
192 #define HAL_PWR_TIMEOUT_DEFAULT_VALUE ((uint32_t)0x000FFFFF) /**< 0xFFFFF counts */
193 /** @} */
194
195 /** @} */
196
197 /* Exported macro ------------------------------------------------------------*/
198 /* Private macros ------------------------------------------------------------*/
199 /** @addtogroup PWR_Private_Macros PWR Private Macros
200 * @{
201 */
202
203 /**
204 * @brief Check if PWR wakeup condition is valid.
205 * @param __COND__ PWR wakeup condition.
206 * @retval SET (__COND__ is valid) or RESET (__COND__ is invalid)
207 */
208 #define IS_PWR_WAKEUP_CONDITION(__COND__) ((((__COND__) & PWR_WKUP_COND_ALL) != 0x00U) &&\
209 (((__COND__) & ~PWR_WKUP_COND_ALL) == 0x00U))
210
211 /**
212 * @brief Check if PWR external wakeup pin is valid.
213 * @param __PIN__ PWR external wakeup pin.
214 * @retval SET (__PIN__ is valid) or RESET (__PIN__ is invalid)
215 */
216 #define IS_PWR_EXT_WAKEUP_PIN(__PIN__) ((((__PIN__) & PWR_EXTWKUP_PIN_ALL) != 0x00U) &&\
217 (((__PIN__) & ~PWR_EXTWKUP_PIN_ALL) == 0x00U))
218
219 /**
220 * @brief Check if PWR sleep timer mode is valid.
221 * @param __MODE__ PWR sleep timer mode.
222 * @retval SET (__MODE__ is valid) or RESET (__MODE__ is invalid)
223 */
224 #define IS_PWR_SLP_TIMER_MODE(__MODE__) (((__MODE__) == PWR_SLP_TIMER_MODE_NORMAL) || \
225 ((__MODE__) == PWR_SLP_TIMER_MODE_SINGLE) || \
226 ((__MODE__) == PWR_SLP_TIMER_MODE_RELOAD) || \
227 ((__MODE__) == PWR_SLP_TIMER_MODE_DISABLE))
228
229 /**
230 * @brief Check if PWR external wakeup type is valid.
231 * @param __TYPE__ PWR external wakeup type.
232 * @retval SET (__TYPE__ is valid) or RESET (__TYPE__ is invalid)
233 */
234 #define IS_PWR_EXTWKUP_TYPE(__TYPE__) (((__TYPE__) == PWR_EXTWKUP_TYPE_LOW) || \
235 ((__TYPE__) == PWR_EXTWKUP_TYPE_HIGH) || \
236 ((__TYPE__) == PWR_EXTWKUP_TYPE_RISING) || \
237 ((__TYPE__) == PWR_EXTWKUP_TYPE_FALLING))
238
239 /**
240 * @brief Check if PWR memory block is valid.
241 * @param __BLOCK__ PWR memory block.
242 * @retval SET (__BLOCK__ is valid) or RESET (__BLOCK__ is invalid)
243 */
244 #define IS_PWR_MEM_BLOCK(__BLOCK__) ((((__BLOCK__) & PWR_MEM_ALL) != 0x00U) &&\
245 (((__BLOCK__) & ~PWR_MEM_ALL) == 0x00U))
246
247 /**
248 * @brief Check if PWR memory power state is valid.
249 * @param __STATE__ PWR memory power state.
250 * @retval SET (__STATE__ is valid) or RESET (__STATE__ is invalid)
251 */
252 #define IS_PWR_MEM_POWER_STAT(__STATE__) (((__STATE__) == PWR_MEM_POWER_OFF) || \
253 ((__STATE__) == PWR_MEM_POWER_FULL) || \
254 ((__STATE__) == PWR_MEM_POWER_RETENTION))
255
256 /**
257 * @brief Check if PWR BLE communication timer power state is valid.
258 * @param __STATE__ PWR BLE communication timer power state.
259 * @retval SET (__STATE__ is valid) or RESET (__STATE__ is invalid)
260 */
261 #define IS_PWR_COMM_TIMER_POWER_STAT(__STATE__) (((__STATE__) == PWR_COMM_TIMER_POWER_DOWN) || \
262 ((__STATE__) == PWR_COMM_TIMER_POWER_UP))
263
264 /**
265 * @brief Check if PWR BLE communication core power state is valid.
266 * @param __STATE__ PWR BLE communication core power state.
267 * @retval SET (__STATE__ is valid) or RESET (__STATE__ is invalid)
268 */
269 #define IS_PWR_COMM_CORE_POWER_STAT(__STATE__) (((__STATE__) == PWR_COMM_CORE_POWER_DOWN) || \
270 ((__STATE__) == PWR_COMM_CORE_POWER_UP))
271
272 /**
273 * @brief Check if PWR BLE communication timer mode is valid.
274 * @param __MODE__ PWR BLE communication timer mode.
275 * @retval SET (__MODE__ is valid) or RESET (__MODE__ is invalid)
276 */
277 #define IS_PWR_COMM_TIMER_MODE(__MODE__) (((__MODE__) == PWR_COMM_TIMER_MODE_RESET) || \
278 ((__MODE__) == PWR_COMM_TIMER_MODE_RUNNING))
279
280 /**
281 * @brief Check if PWR BLE communication core mode is valid.
282 * @param __MODE__ PWR BLE communication core mode.
283 * @retval SET (__MODE__ is valid) or RESET (__MODE__ is invalid)
284 */
285 #define IS_PWR_COMM_CORE_MODE(__MODE__) (((__MODE__) == PWR_COMM_CORE_MODE_RESET) || \
286 ((__MODE__) == PWR_COMM_CORE_MODE_RUNNING))
287
288 /**
289 * @brief Check if PWR sleep timer type is valid.
290 * @param __TYPE__ PWR sleep timer type.
291 * @retval SET (__TYPE__ is valid) or RESET (__TYPE__ is invalid)
292 */
293 #define IS_PWR_PWR_TIMER_TYPE(__TYPE__) (((__TYPE__) == PWR_TIMER_TYPE_CAL_TIMER) || \
294 ((__TYPE__) == PWR_TIMER_TYPE_AON_WDT) || \
295 ((__TYPE__) == PWR_TIMER_TYPE_SLP_TIMER) || \
296 ((__TYPE__) == PWR_TIMER_TYPE_CAL_ALARM))
297
298 /** @} */
299
300 /** @} */
301
302 /* Exported functions --------------------------------------------------------*/
303 /** @addtogroup HAL_PWR_DRIVER_FUNCTIONS Functions
304 * @{
305 */
306
307 /** @addtogroup PWR_Exported_Functions_Group1 Low Power mode configuration functions
308 * @{
309 */
310
311 /**
312 ****************************************************************************************
313 * @brief Set the DeepSleep WakeUp Condition
314 * @param[in] condition: This parameter can be a combination of the following values:
315 * @arg @ref PWR_WKUP_COND_EXT
316 * @arg @ref PWR_WKUP_COND_TIMER
317 * @arg @ref PWR_WKUP_COND_BLE
318 * @arg @ref PWR_WKUP_COND_CALENDAR
319 * @arg @ref PWR_WKUP_COND_BOD_FEDGE
320 * @arg @ref PWR_WKUP_COND_MSIO_COMP
321 * @arg @ref PWR_WKUP_COND_ALL
322 * @note When @ref PWR_WKUP_COND_EXT is set, use @ref hal_pwr_config_ext_wakeup() to configure wakeup pins and pin trigger type.
323 * When @ref PWR_WKUP_COND_TIMER is set, use @ref hal_pwr_config_timer_wakeup() to configure the time count to wakeup.
324 * When @ref PWR_WKUP_COND_ALL is set, use @ref hal_pwr_config_ext_wakeup() and @ref hal_pwr_config_timer_wakeup() to configure
325 * AON timer and External AON GPIO.
326 ****************************************************************************************
327 */
328 void hal_pwr_set_wakeup_condition(uint32_t condition);
329
330 /**
331 ****************************************************************************************
332 * @brief Configure the AON Sleep Timer mode and count used to wakeup MCU.
333 * @param[in] timer_mode: Specifies the sleep timer mode.
334 * This parameter can be a combination of the following values:
335 * @arg @ref PWR_SLP_TIMER_MODE_NORMAL
336 * @arg @ref PWR_SLP_TIMER_MODE_SINGLE
337 * @arg @ref PWR_SLP_TIMER_MODE_RELOAD
338 * @arg @ref PWR_SLP_TIMER_MODE_DISABLE
339 * @param[in] load_count: Count value of the AON Sleep Timer.
340 * @note The sleep clock of AON Timer is 32 KHz.
341 ****************************************************************************************
342 */
343 void hal_pwr_config_timer_wakeup(uint8_t timer_mode, uint32_t load_count);
344
345 /**
346 ****************************************************************************************
347 * @brief Configure the External AON GPIO pins and pin trigger type that is used to wakeup MCU.
348 * @param[in] ext_wakeup_pinx: This parameter can be a combination of the following values:
349 * @arg @ref PWR_EXTWKUP_PIN0
350 * @arg @ref PWR_EXTWKUP_PIN1
351 * @arg @ref PWR_EXTWKUP_PIN2
352 * @arg @ref PWR_EXTWKUP_PIN3
353 * @arg @ref PWR_EXTWKUP_PIN4
354 * @arg @ref PWR_EXTWKUP_PIN5
355 * @arg @ref PWR_EXTWKUP_PIN_ALL
356 * @param[in] ext_wakeup_type: This parameter can be a combination of the following values:
357 * @arg @ref PWR_EXTWKUP_TYPE_LOW
358 * @arg @ref PWR_EXTWKUP_TYPE_HIGH
359 * @arg @ref PWR_EXTWKUP_TYPE_RISING
360 * @arg @ref PWR_EXTWKUP_TYPE_FALLING
361 * @note When the level of any selected GPIO pin changes in accordance with the set
362 * trigger type, MCU will be waked up from DeepSleep mode.
363 ****************************************************************************************
364 */
365 void hal_pwr_config_ext_wakeup(uint32_t ext_wakeup_pinx, uint32_t ext_wakeup_type);
366
367 /**
368 ****************************************************************************************
369 * @brief Disable the interrupt wake-up function of the specified AON GPIO pin.
370 * @param[in] disable_wakeup_pinx: This parameter can be a combination of the following values:
371 * @arg @ref PWR_EXTWKUP_PIN0
372 * @arg @ref PWR_EXTWKUP_PIN1
373 * @arg @ref PWR_EXTWKUP_PIN2
374 * @arg @ref PWR_EXTWKUP_PIN3
375 * @arg @ref PWR_EXTWKUP_PIN4
376 * @arg @ref PWR_EXTWKUP_PIN5
377 * @arg @ref PWR_EXTWKUP_PIN_ALL
378 ****************************************************************************************
379 */
380 void hal_pwr_disable_ext_wakeup(uint32_t disable_wakeup_pinx);
381
382 /**
383 ****************************************************************************************
384 * @brief Enters DeepSleep mode.
385 * @note In DeepSleep mode, all I/O pins keep the same state as in Run mode.
386 ****************************************************************************************
387 */
388 void hal_pwr_enter_chip_deepsleep(void);
389
390 /** @} */
391
392 /** @addtogroup PWR_Exported_Functions_Group2 BLE Communication timer and core configuration function
393 * @{
394 */
395
396 /**
397 ****************************************************************************************
398 * @brief Set the power state of communication timer and communication core in running mode.
399 * @param[in] timer_power_state: This parameter can be one of the following values:
400 * @arg @ref PWR_COMM_TIMER_POWER_UP
401 * @arg @ref PWR_COMM_TIMER_POWER_DOWN
402 * @param[in] core_power_state: This parameter can be one of the following values:
403 * @arg @ref PWR_COMM_CORE_POWER_UP
404 * @arg @ref PWR_COMM_CORE_POWER_DOWN
405 ****************************************************************************************
406 */
407 void hal_pwr_set_comm_power(uint32_t timer_power_state, uint32_t core_power_state);
408
409 /**
410 ****************************************************************************************
411 * @brief Set the work mode of communication timer and communication core.
412 * @param[in] timer_mode: This parameter can be one of the following values:
413 * @arg @ref PWR_COMM_TIMER_MODE_RESET
414 * @arg @ref PWR_COMM_TIMER_MODE_RUNNING
415 * @param[in] core_mode: This parameter can be one of the following values:
416 * @arg @ref PWR_COMM_CORE_MODE_RESET
417 * @arg @ref PWR_COMM_CORE_MODE_RUNNING
418 ****************************************************************************************
419 */
420 void hal_pwr_set_comm_mode(uint32_t timer_mode, uint32_t core_mode);
421
422 /**
423 ****************************************************************************************
424 * @brief Get the current value of specified timer.
425 * @param[in] timer_type: This parameter can be one of the following values:
426 * @arg @ref PWR_TIMER_TYPE_CAL_TIMER
427 * @arg @ref PWR_TIMER_TYPE_AON_WDT
428 * @arg @ref PWR_TIMER_TYPE_SLP_TIMER
429 * @arg @ref PWR_TIMER_TYPE_CAL_ALARM
430 * @param[out] p_value: Pointer to an integer storing current value
431 * @retval ::HAL_OK: Operation is OK.
432 * @retval ::HAL_ERROR: Parameter error or operation not supported.
433 * @retval ::HAL_BUSY: Driver is busy.
434 * @retval ::HAL_TIMEOUT: Timeout occurred.
435 ****************************************************************************************
436 */
437 hal_status_t hal_pwr_get_timer_current_value(uint32_t timer_type, uint32_t *p_value);
438
439 /** @} */
440
441 /** @addtogroup PWR_IRQ_Handler_and_Callbacks IRQ Handler and Callbacks
442 * @brief IRQ Handler and Callbacks functions
443 * @{
444 */
445
446 /**
447 ****************************************************************************************
448 * @brief Handle PWR Sleep Timer interrupt request.
449 ****************************************************************************************
450 */
451 void hal_pwr_sleep_timer_irq_handler(void);
452
453
454 /**
455 ****************************************************************************************
456 * @brief PWR Sleep Timer Elapsed callback.
457 * @note This function should not be modified. When the callback is needed,
458 * the hal_pwr_sleep_timer_elapsed_callback can be implemented in the user file.
459 ****************************************************************************************
460 */
461 void hal_pwr_sleep_timer_elapsed_callback(void);
462
463
464
465 /** @} */
466
467 /** @} */
468
469 #ifdef __cplusplus
470 }
471 #endif
472
473
474 #endif /* __GR55xx_HAL_PWR_H__ */
475
476 /** @} */
477
478 /** @} */
479
480 /** @} */
hal_pwr_config_ext_wakeup
void hal_pwr_config_ext_wakeup(uint32_t ext_wakeup_pinx, uint32_t ext_wakeup_type)
Configure the External AON GPIO pins and pin trigger type that is used to wakeup MCU.
_hal_pwr_handler
PWR callback handle Structure definition.
Definition: gr55xx_hal_pwr.h:90
hal_pwr_get_timer_current_value
hal_status_t hal_pwr_get_timer_current_value(uint32_t timer_type, uint32_t *p_value)
Get the current value of specified timer.
hal_pwr_disable_ext_wakeup
void hal_pwr_disable_ext_wakeup(uint32_t disable_wakeup_pinx)
Disable the interrupt wake-up function of the specified AON GPIO pin.
hal_pwr_set_wakeup_condition
void hal_pwr_set_wakeup_condition(uint32_t condition)
Set the DeepSleep WakeUp Condition.
hal_pwr_config_timer_wakeup
void hal_pwr_config_timer_wakeup(uint8_t timer_mode, uint32_t load_count)
Configure the AON Sleep Timer mode and count used to wakeup MCU.
hal_pwr_sleep_timer_elapsed_callback
void hal_pwr_sleep_timer_elapsed_callback(void)
PWR Sleep Timer Elapsed callback.
hal_pwr_handler_t
struct _hal_pwr_handler hal_pwr_handler_t
PWR callback handle Structure definition.
hal_pwr_sleep_timer_irq_handler
void hal_pwr_sleep_timer_irq_handler(void)
Handle PWR Sleep Timer interrupt request.
hal_pwr_enter_chip_deepsleep
void hal_pwr_enter_chip_deepsleep(void)
Enters DeepSleep mode.
pwr_slp_elapsed_handler_t
void(* pwr_slp_elapsed_handler_t)(void)
PWR Sleep Timer Elapsed callback.
Definition: gr55xx_hal_pwr.h:77
hal_pwr_set_comm_power
void hal_pwr_set_comm_power(uint32_t timer_power_state, uint32_t core_power_state)
Set the power state of communication timer and communication core in running mode.
_hal_pwr_handler::pwr_slp_elapsed_hander
pwr_slp_elapsed_handler_t pwr_slp_elapsed_hander
PWR sleep timer elapsed callback.
Definition: gr55xx_hal_pwr.h:91
hal_status_t
hal_status_t
HAL Status structures definition.
Definition: gr55xx_hal_def.h:70
hal_pwr_set_comm_mode
void hal_pwr_set_comm_mode(uint32_t timer_mode, uint32_t core_mode)
Set the work mode of communication timer and communication core.
gr55xx_ll_pwr.h
Header file containing functions prototypes of PWR LL library.
gr55xx_hal_def.h
This file contains HAL common definitions, enumeration, macros and structures definitions.