]> granicus.if.org Git - esp-idf/commitdiff
time: only define {get,set}_boot_time if FRC1 or RTC is used as time source
authorIvan Grokhotkov <ivan@espressif.com>
Mon, 16 Jan 2017 11:53:10 +0000 (19:53 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Tue, 17 Jan 2017 04:29:09 +0000 (12:29 +0800)
Fixes https://github.com/espressif/esp-idf/issues/238

components/newlib/time.c

index 004b7398c2a541a790c4af89f500adc64caf92ea..30c7ca7f40e628faf759ee99914dda9c06e7e264 100644 (file)
@@ -94,6 +94,7 @@ static void IRAM_ATTR frc_timer_isr()
 
 #endif // WITH_FRC1
 
+#if defined(WITH_RTC) || defined(WITH_FRC1)
 static void set_boot_time(uint64_t time_us)
 {
     _lock_acquire(&s_boot_time_lock);
@@ -118,6 +119,7 @@ static uint64_t get_boot_time()
     _lock_release(&s_boot_time_lock);
     return result;
 }
+#endif //defined(WITH_RTC) || defined(WITH_FRC1)
 
 void esp_setup_time_syscalls()
 {