mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-24 01:09:47 +08:00
Use time_t for RT_DEVICE_CTRL_RTC_GET_TIME RT_DEVICE_CTRL_RTC_SET_TIME
This commit is contained in:
@@ -110,14 +110,14 @@ static rt_err_t rt_rtc_control(rt_device_t dev, int cmd, void *args)
|
||||
{
|
||||
case RT_DEVICE_CTRL_RTC_GET_TIME:
|
||||
|
||||
*(rt_uint32_t *)args = get_timestamp();
|
||||
rtc_debug("RTC: get rtc_time %x\n", *(rt_uint32_t *)args);
|
||||
*(time_t *)args = get_timestamp();
|
||||
rtc_debug("RTC: get rtc_time %x\n", *(time_t *)args);
|
||||
break;
|
||||
|
||||
case RT_DEVICE_CTRL_RTC_SET_TIME:
|
||||
{
|
||||
result = set_timestamp(*(rt_uint32_t *)args);
|
||||
rtc_debug("RTC: set rtc_time %x\n", *(rt_uint32_t *)args);
|
||||
result = set_timestamp(*(time_t *)args);
|
||||
rtc_debug("RTC: set rtc_time %x\n", *(time_t *)args);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user