sim: Forward /dev/rtc0 operation to rpmsg rtc driver
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
2aede9168b
commit
93b0b9678f
@ -123,10 +123,11 @@ static bool sim_rtc_havesettime(FAR struct rtc_lowerhalf_s *lower)
|
||||
|
||||
int up_rtc_initialize(void)
|
||||
{
|
||||
FAR struct rtc_lowerhalf_s *rtc = &g_sim_rtc;
|
||||
|
||||
#ifdef CONFIG_RTC_RPMSG_SERVER
|
||||
up_rtc_set_lowerhalf(rpmsg_rtc_server_initialize(&g_sim_rtc));
|
||||
#else
|
||||
up_rtc_set_lowerhalf(&g_sim_rtc);
|
||||
rtc = rpmsg_rtc_server_initialize(rtc);
|
||||
#endif
|
||||
return rtc_initialize(0, &g_sim_rtc);
|
||||
up_rtc_set_lowerhalf(rtc);
|
||||
return rtc_initialize(0, rtc);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user