diff options
| author | bernard <[email protected]> | 2021-07-12 00:46:38 +0000 |
|---|---|---|
| committer | Gitee <[email protected]> | 2021-07-12 00:46:38 +0000 |
| commit | ddc5c793a482fe44310bafe181802ad406fa1b29 (patch) | |
| tree | b64de33831a39079cd27acb358cfe90b90a525cb /libcpu | |
| parent | 2fda55d898826a1ee79babc4e0852ce539a3bff4 (diff) | |
| parent | ecc0981d1027b2712f27b1c28d7657cb97b93ca2 (diff) | |
!253 更新 RTC 设备驱动框架,统一并简化 RTC 设备的注册和访问过程
Merge pull request !253 from iysheng/tmp1
Diffstat (limited to 'libcpu')
| -rw-r--r-- | libcpu/arm/s3c24x0/rtc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libcpu/arm/s3c24x0/rtc.c b/libcpu/arm/s3c24x0/rtc.c index 0f9484405c..5d374dfadf 100644 --- a/libcpu/arm/s3c24x0/rtc.c +++ b/libcpu/arm/s3c24x0/rtc.c @@ -12,11 +12,12 @@ */ #include <rtthread.h> +#include <rtdevice.h> #include <sys/time.h> #include <s3c24x0.h> // #define RTC_DEBUG - +#ifdef RT_USING_RTC #define RTC_ENABLE RTCCON |= 0x01; /*RTC read and write enable */ #define RTC_DISABLE RTCCON &= ~0x01; /* RTC read and write disable */ #define BCD2BIN(n) (((((n) >> 4) & 0x0F) * 10) + ((n) & 0x0F)) @@ -183,3 +184,4 @@ void list_date() } FINSH_FUNCTION_EXPORT(list_date, list date); #endif +#endif |
