MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / set_rtc_time

Function set_rtc_time

components/drivers/rtc/dev_soft_rtc.c:76–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74#endif
75
76static void set_rtc_time(time_t t)
77{
78 init_time = t - (rt_tick_get() - init_tick) / RT_TICK_PER_SECOND;
79#ifdef RT_USING_ALARM
80 soft_rtc_alarm_update(&wkalarm);
81#endif
82}
83
84static rt_err_t soft_rtc_control(rt_device_t dev, int cmd, void *args)
85{

Callers 2

soft_rtc_controlFunction · 0.85
rt_soft_rtc_syncFunction · 0.85

Calls 2

rt_tick_getFunction · 0.85
soft_rtc_alarm_updateFunction · 0.70

Tested by

no test coverage detected