diff options
| author | Meco Man <[email protected]> | 2021-02-07 21:17:27 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-02-07 21:17:27 +0800 |
| commit | 64bd41d6540bc074d3a020b445da664f1067d4bb (patch) | |
| tree | 0b1460240bdfb9005680738f326444cfceb45de8 /libcpu/arm | |
| parent | f073911cd32bf8bfd02d6945db230e5e7b9b75ea (diff) | |
update
Diffstat (limited to 'libcpu/arm')
| -rw-r--r-- | libcpu/arm/s3c24x0/rtc.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libcpu/arm/s3c24x0/rtc.c b/libcpu/arm/s3c24x0/rtc.c index d0c80bce6b..3b4c479001 100644 --- a/libcpu/arm/s3c24x0/rtc.c +++ b/libcpu/arm/s3c24x0/rtc.c @@ -12,7 +12,7 @@ */ #include <rtthread.h> -#include <time.h> +#include <sys/time.h> #include <s3c24x0.h> // #define RTC_DEBUG @@ -132,17 +132,17 @@ static rt_err_t rtc_control(rt_device_t dev, int cmd, void *args) time = (time_t *)args; switch (cmd) { - case RT_DEVICE_CTRL_RTC_GET_TIME: - /* read device */ - rt_hw_rtc_get(&tm); - *((rt_time_t *)args) = mktime(&tm); - break; + case RT_DEVICE_CTRL_RTC_GET_TIME: + /* read device */ + rt_hw_rtc_get(&tm); + *((rt_time_t *)args) = mktime(&tm); + break; - case RT_DEVICE_CTRL_RTC_SET_TIME: - tm_ptr = localtime(time); - /* write device */ - rt_hw_rtc_set(tm_ptr); - break; + case RT_DEVICE_CTRL_RTC_SET_TIME: + tm_ptr = localtime(time); + /* write device */ + rt_hw_rtc_set(tm_ptr); + break; } return RT_EOK; |
