87#define RT_DEVICE_CTRL_RTC_GET_TIME (RT_DEVICE_CTRL_BASE(RTC) + 0x01)
88#define RT_DEVICE_CTRL_RTC_SET_TIME (RT_DEVICE_CTRL_BASE(RTC) + 0x02)
89#define RT_DEVICE_CTRL_RTC_GET_TIMEVAL (RT_DEVICE_CTRL_BASE(RTC) + 0x03)
90#define RT_DEVICE_CTRL_RTC_SET_TIMEVAL (RT_DEVICE_CTRL_BASE(RTC) + 0x04)
91#define RT_DEVICE_CTRL_RTC_GET_ALARM (RT_DEVICE_CTRL_BASE(RTC) + 0x05)
92#define RT_DEVICE_CTRL_RTC_SET_ALARM (RT_DEVICE_CTRL_BASE(RTC) + 0x06)
93#define RT_DEVICE_CTRL_RTC_GET_TIMESPEC (RT_DEVICE_CTRL_BASE(RTC) + 0x07)
94#define RT_DEVICE_CTRL_RTC_SET_TIMESPEC (RT_DEVICE_CTRL_BASE(RTC) + 0x08)
95#define RT_DEVICE_CTRL_RTC_GET_TIMERES (RT_DEVICE_CTRL_BASE(RTC) + 0x09)
183#ifdef RT_USING_SYSTEM_WORKQUEUE
185rt_err_t rt_soft_rtc_set_source(
const char *name);
rt_err_t set_date(rt_uint32_t year, rt_uint32_t month, rt_uint32_t day)
set date
rt_err_t rt_hw_rtc_register(rt_rtc_dev_t *rtc, const char *name, rt_uint32_t flag, void *data)
Register a RTC device
struct rt_rtc_device rt_rtc_dev_t
RTC device structure
rt_err_t set_timestamp(time_t timestamp)
set timestamp
rt_err_t get_timestamp(time_t *timestamp)
get timestamp
rt_err_t set_time(rt_uint32_t hour, rt_uint32_t minute, rt_uint32_t second)
set time
const struct rt_rtc_ops * ops
rt_err_t(* set_alarm)(struct rt_rtc_wkalarm *alarm)
rt_err_t(* get_secs)(time_t *sec)
rt_err_t(* set_secs)(time_t *sec)
rt_err_t(* get_timeval)(struct timeval *tv)
rt_err_t(* set_timeval)(struct timeval *tv)
rt_err_t(* get_alarm)(struct rt_rtc_wkalarm *alarm)