49#define IOT_RTC_SUCCESS ( 0 )
50#define IOT_RTC_INVALID_VALUE ( 1 )
51#define IOT_RTC_NOT_STARTED ( 2 )
52#define IOT_RTC_GET_FAILED ( 3 )
53#define IOT_RTC_SET_FAILED ( 4 )
54#define IOT_RTC_FUNCTION_NOT_SUPPORTED ( 5 )
70typedef struct IotRtcDatetime
86typedef enum IotRtcIoctlRequest
101struct IotRtcDescriptor;
121 void * pvUserContext );
153 void * pvUserContext );
179 void *
const pvBuffer );
int32_t iot_rtc_ioctl(IotRtcHandle_t const pxRtcHandle, IotRtcIoctlRequest_t xRequest, void *const pvBuffer)
iot_rtc_ioctl is used to set RTC configuration and RTC properties like Wakeup time,...
int32_t iot_rtc_get_datetime(IotRtcHandle_t const pxRtcHandle, IotRtcDatetime_t *pxDatetime)
iot_rtc_get_datetime is used to get the current time from the RTC counter. The time must be set first...
IotRtcIoctlRequest_t
Ioctl request types.
Definition: iot_rtc.h:87
void iot_rtc_set_callback(IotRtcHandle_t const pxRtcHandle, IotRtcCallback_t xCallback, void *pvUserContext)
iot_rtc_set_callback is used to set the callback to be called when alarmTime triggers....
IotRtcStatus_t
RTC driver status values.
Definition: iot_rtc.h:60
int32_t iot_rtc_close(IotRtcHandle_t const pxRtcHandle)
iot_rtc_close is used to de-Initialize RTC Timer. it resets the RTC timer and may stop the timer.
struct IotRtcDescriptor * IotRtcHandle_t
IotRtcHandle_t type is the RTC handle returned by calling iot_rtc_open() this is initialized in open ...
Definition: iot_rtc.h:108
int32_t iot_rtc_set_datetime(IotRtcHandle_t const pxRtcHandle, const IotRtcDatetime_t *pxDatetime)
iot_rtc_set_date_time is used to set the current time as a reference in RTC timer counter.
IotRtcHandle_t iot_rtc_open(int32_t lRtcInstance)
iot_rtc_open is used to initialize the RTC timer. It usually resets the RTC timer,...
void(* IotRtcCallback_t)(IotRtcStatus_t xStatus, void *pvUserContext)
RTC notification callback type. This callback is passed to the driver by using iot_rtc_set_callback A...
Definition: iot_rtc.h:120
@ eSetRtcAlarm
Definition: iot_rtc.h:88
@ eCancelRtcAlarm
Definition: iot_rtc.h:91
@ eCancelRtcWakeup
Definition: iot_rtc.h:94
@ eSetRtcWakeupTime
Definition: iot_rtc.h:92
@ eGetRtcWakeupTime
Definition: iot_rtc.h:93
@ eGetRtcAlarm
Definition: iot_rtc.h:90
@ eGetRtcStatus
Definition: iot_rtc.h:95
@ eRtcTimerStopped
Definition: iot_rtc.h:61
@ eRtcTimerAlarmTriggered
Definition: iot_rtc.h:63
@ eRtcTimerRunning
Definition: iot_rtc.h:62
@ eRtcTimerWakeupTriggered
Definition: iot_rtc.h:64
RTC date and time format info.
Definition: iot_rtc.h:71
uint8_t ucMinute
Definition: iot_rtc.h:73
uint8_t ucDay
Definition: iot_rtc.h:75
uint8_t ucSecond
Definition: iot_rtc.h:72
uint8_t ucMonth
Definition: iot_rtc.h:76
uint16_t usYear
Definition: iot_rtc.h:77
uint8_t ucWday
Definition: iot_rtc.h:78
uint8_t ucHour
Definition: iot_rtc.h:74