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 ) 70 typedef struct IotRtcDatetime
86 typedef enum IotRtcIoctlRequest
101 struct IotRtcDescriptor_t;
152 void * pvUserContext );
177 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, alarms etc. Supported IOCTL requests are defined in iot_RtcIoctlRequest_t
RTC date and time format info.
Definition: iot_rtc.h:70
IotRtcIoctlRequest_t
Ioctl request types.
Definition: iot_rtc.h:86
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...
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...
uint16_t usYear
Definition: iot_rtc.h:77
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
uint8_t ucMonth
Definition: iot_rtc.h:76
uint8_t ucDay
Definition: iot_rtc.h:75
struct IotRtcDescriptor_t * 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
IotRtcStatus_t
RTC driver status values.
Definition: iot_rtc.h:59
IotRtcHandle_t iot_rtc_open(int32_t lRtcInstance)
iot_rtc_open is used to initialize the RTC timer. It usually resets the RTC timer, sets up the clock for RTC etc...
uint8_t ucSecond
Definition: iot_rtc.h:72
uint8_t ucMinute
Definition: iot_rtc.h:73
uint8_t ucHour
Definition: iot_rtc.h:74
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. The caller must set the Alarm time using IOCTL to get the callback.
uint8_t ucWday
Definition: iot_rtc.h:78
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...