37 #include "hal_platform.h" 39 #ifdef HAL_RTC_MODULE_ENABLED 59 #ifdef HAL_RTC_FEATURE_TIME_CALLBACK 109 #ifdef HAL_RTC_FEATURE_TIME_CALLBACK 210 #ifdef HAL_RTC_FEATURE_TIME_CALLBACK 354 #ifdef HAL_RTC_FEATURE_SLEEP 383 #ifdef HAL_RTC_FEATURE_SLEEP 387 #define HAL_RTC_SLEEP_MAGIC (0xBABEBABE) 413 #ifdef HAL_RTC_FEATURE_TIME_CALLBACK 460 #ifdef HAL_RTC_FEATURE_TIME_CALLBACK 510 #ifdef HAL_RTC_FEATURE_TIME_CALLBACK 523 #ifdef HAL_RTC_FEATURE_SLEEP 547 #ifdef HAL_RTC_FEATURE_CALIBRATION 647 #ifdef HAL_RTC_FEATURE_RETENTION_SRAM 668 hal_rtc_status_t hal_rtc_retention_sram_config(uint32_t mask, hal_rtc_sram_mode_t mode);
682 void hal_rtc_exit_retention_mode(
void);
685 #ifdef HAL_RTC_FEATURE_ELAPSED_TICK 719 hal_rtc_status_t hal_rtc_get_elapsed_tick(
bool is_after_sleep, uint32_t *elapsed_tick);
hal_rtc_status_t hal_rtc_set_time_callback(hal_rtc_time_callback_t callback_function, void *user_data)
This function sets the RTC time notification callback, and the callback execution period is set by ha...
hal_rtc_status_t hal_rtc_set_alarm(const hal_rtc_time_t *time)
This function sets the RTC alarm time.
hal_rtc_status_t hal_rtc_get_data(uint16_t offset, char *buf, uint16_t len)
This function reads data from the RTC registers that won't be cleared even if the system power is off...
hal_rtc_status_t hal_rtc_set_alarm_callback(const hal_rtc_alarm_callback_t callback_function, void *user_data)
This function sets the alarm callback.
hal_rtc_status_t
RTC status.
Definition: hal_rtc.h:399
hal_rtc_status_t hal_rtc_deinit(void)
This function deinitializes the RTC module.
hal_rtc_status_t hal_rtc_set_time(const hal_rtc_time_t *time)
This function sets the RTC current time.
The operation completed successfully.
Definition: hal_rtc.h:402
hal_rtc_status_t hal_rtc_disable_alarm(void)
This function disables an alarm.
hal_rtc_status_t hal_rtc_get_time(hal_rtc_time_t *time)
This function gets the RTC current time.
hal_rtc_status_t hal_rtc_set_repeat_calibration(int16_t ticks_per_8_seconds)
This function sets the ticks that are periodically adjusted to the RTC current time per 8 seconds...
hal_rtc_status_t hal_rtc_get_repeat_calibration(int16_t *ticks_per_8_seconds)
This function gets the ticks that are periodically adjusted to the RTC current time per 8 seconds...
void(* hal_rtc_time_callback_t)(void *user_data)
Callback function definition to handle the RTC current time change.
Definition: hal_rtc.h:417
hal_rtc_status_t hal_rtc_get_alarm(hal_rtc_time_t *time)
This function gets the RTC alarm time.
hal_rtc_status_t hal_rtc_set_data(uint16_t offset, const char *buf, uint16_t len)
This function stores data to the RTC registers that won't be cleared even if the system power is off...
void(* hal_rtc_alarm_callback_t)(void *user_data)
Callback function definition to handle the RTC alarm.
Definition: hal_rtc.h:423
RTC time structure definition.
Definition: hal_platform.h:730
hal_rtc_status_t hal_rtc_set_one_shot_calibration(int16_t ticks)
This function sets the tick value that will be adjusted to the RTC current time.
hal_rtc_time_notification_period_t
RTC current time change notification period selections.
Definition: hal_platform.h:749
hal_rtc_status_t hal_rtc_get_f32k_frequency(uint32_t *frequency)
This function gets the frequency value of 32.768kHz clock source, unit is in Hz.
hal_rtc_status_t hal_rtc_init(void)
This function initializes the RTC module.
hal_rtc_status_t hal_rtc_set_time_notification_period(hal_rtc_time_notification_period_t period)
This function sets the RTC current time change notification period.
hal_rtc_status_t hal_rtc_enable_alarm(void)
This function enables an alarm.
hal_rtc_status_t hal_rtc_get_one_shot_calibration(int16_t *ticks)
This function gets the tick value that will be adjusted to the RTC current time.
An error occurred.
Definition: hal_rtc.h:400
Invalid parameter is given.
Definition: hal_rtc.h:401
hal_rtc_status_t hal_rtc_clear_data(uint16_t offset, uint16_t len)
This function stores zero to the RTC registers that won't be cleared even if the system power is off...