#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
Data Structures | |
struct | rtc_datetime_attr_t |
struct | rtc_alarm_attr_t |
struct | rtc_channel_attr_t |
struct | rtc_handle_t |
Typedefs | |
typedef void(* | hal_rtc_callback) (const uint8_t channel) |
RTC alarm callback function prototype. | |
Enumerations | |
enum | rtc_result_t { RTC_RESULT_OK , RTC_RESULT_INVALID , RTC_RESULT_UNSUPPORTED , RTC_RESULT_ERR , TOTAL_RTC_RESULT } |
enum | rtc_status_t { RTC_STATUS_UNKNOWN , RTC_STATUS_OK , RTC_STATUS_BUSY , RTC_STATUS_STOP , RTC_STATUS_ERR , TOTAL_RTC_STATUS } |
enum | rtc_time_format_t { RTC_TIME_FORMAT_12H , RTC_TIME_FORMAT_24H , TOTAL_RTC_TIME_FORMAT } |
Functions | |
rtc_result_t | hal_rtc_init (rtc_handle_t *handle, const rtc_channel_attr_t attr) |
Initialize RTC channel. | |
rtc_result_t | hal_rtc_start (rtc_handle_t *handle) |
Start RTC channel. | |
rtc_result_t | hal_rtc_get_datetime (rtc_handle_t *handle, rtc_datetime_attr_t *datetime) |
Retrieve current date and time. | |
rtc_result_t | hal_rtc_set_alarm (rtc_handle_t *handle, const rtc_alarm_attr_t attr, const hal_rtc_callback callback) |
Set alarm date and time. | |
rtc_result_t | hal_rtc_stop (rtc_handle_t *handle) |
Stop RTC channel. | |