فهرست منبع

fix: rtc的实现需要对齐主库的修改

Wendal Chen 3 سال پیش
والد
کامیت
fcdae84f97
1فایلهای تغییر یافته به همراه0 افزوده شده و 6 حذف شده
  1. 0 6
      app/port/luat_rtc_air101.c

+ 0 - 6
app/port/luat_rtc_air101.c

@@ -26,8 +26,6 @@ static void luat_rtc_cb(void *arg) {
 int luat_rtc_set(struct tm *tblock) {
     if (tblock == NULL)
         return -1;
-    tblock->tm_year -= Base_year;
-    tblock->tm_mon--;
     tls_set_rtc(tblock);
     return 0;
 }
@@ -36,16 +34,12 @@ int luat_rtc_get(struct tm *tblock) {
     if (tblock == NULL)
         return -1;
     tls_get_rtc(tblock);
-    tblock->tm_year += Base_year;
-    tblock->tm_mon++;
     return 0;
 }
 
 int luat_rtc_timer_start(int id, struct tm *tblock) {
     if (id || tblock == NULL)
         return -1;
-    tblock->tm_year -= Base_year;
-    tblock->tm_mon--;
     tls_rtc_isr_register(luat_rtc_cb, NULL);
     tls_rtc_timer_start(tblock);
     return 0;