| 255 | #ifdef RT_USING_SYSTEM_WORKQUEUE |
| 256 | |
| 257 | rt_err_t rt_soft_rtc_sync(void) |
| 258 | { |
| 259 | time_t time = 0; |
| 260 | |
| 261 | rt_device_control(&soft_rtc_dev, RT_DEVICE_CTRL_RTC_GET_TIME, &time); |
| 262 | set_rtc_time(time); |
| 263 | return RT_EOK; |
| 264 | } |
| 265 | |
| 266 | static void rtc_sync_work_func(struct rt_work *work, void *work_data) |
| 267 | { |
no test coverage detected