@@ -365,3 +365,8 @@ MSH_CMD_EXPORT(date, get date and time or set (local timezone) [year month day h
|
||||
#endif /* RT_USING_FINSH */
|
||||
|
||||
#endif /* RT_USING_RTC */
|
||||
|
||||
int rt_hw_rtc_sys_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -104,7 +104,7 @@ const static struct rt_device_ops soft_rtc_ops =
|
||||
};
|
||||
#endif
|
||||
|
||||
static int rt_soft_rtc_init(void)
|
||||
int rt_soft_rtc_init(void)
|
||||
{
|
||||
static rt_bool_t init_ok = RT_FALSE;
|
||||
struct tm time_new = SOFT_RTC_TIME_DEFAULT;
|
||||
@@ -115,6 +115,9 @@ static int rt_soft_rtc_init(void)
|
||||
}
|
||||
/* make sure only one 'rtc' device */
|
||||
RT_ASSERT(!rt_device_find("rtc"));
|
||||
|
||||
extern int rt_hw_rtc_sys_init(void);
|
||||
rt_hw_rtc_sys_init();
|
||||
|
||||
#ifdef RT_USING_ALARM
|
||||
rt_timer_init(&alarm_time,
|
||||
@@ -151,6 +154,6 @@ static int rt_soft_rtc_init(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
INIT_DEVICE_EXPORT(rt_soft_rtc_init);
|
||||
// INIT_DEVICE_EXPORT(rt_soft_rtc_init);
|
||||
|
||||
#endif /* RT_USING_SOFT_RTC */
|
||||
|
Reference in New Issue
Block a user