mbed library sources(for async_print)

Dependents:   AsyncPrint

Fork of mbed-src by mbed official

Revision:
489:119543c9f674
Parent:
13:0645d8841f51
--- a/api/rtc_time.h	Thu Mar 05 13:15:07 2015 +0000
+++ b/api/rtc_time.h	Thu Mar 12 14:30:49 2015 +0000
@@ -69,6 +69,17 @@
  */
 void set_time(time_t t);
 
+/** Attach an external RTC to be used for the C time functions
+ *
+ * Do not call this function from an interrupt while an RTC read/write operation may be occurring 
+ *
+ * @param read_rtc pointer to function which returns current UNIX timestamp
+ * @param write_rtc pointer to function which sets current UNIX timestamp, can be NULL
+ * @param init_rtc pointer to funtion which initializes RTC, can be NULL
+ * @param isenabled_rtc pointer to function wich returns if the rtc is enabled, can be NULL
+ */
+void attach_rtc(time_t (*read_rtc)(void), void (*write_rtc)(time_t), void (*init_rtc)(void), int (*isenabled_rtc)(void));
+
 #ifdef __cplusplus
 }
 #endif