浏览代码

[libcpu][arm][s3c24x0] Fix RTC driver compile error

iysheng 3 年之前
父节点
当前提交
e62943abd2
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      libcpu/arm/s3c24x0/rtc.c

+ 3 - 1
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