The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Revision:
127:25aea2a3f4e3
Parent:
122:f9eeca106725
--- a/TARGET_NUCLEO_F031K6/TARGET_STM/TARGET_STM32F0/rtc_api_hal.h	Fri Sep 16 13:57:13 2016 +0100
+++ b/TARGET_NUCLEO_F031K6/TARGET_STM/TARGET_STM32F0/rtc_api_hal.h	Fri Sep 30 16:49:46 2016 +0100
@@ -41,18 +41,36 @@
  * Extend rtc_api.h
  */
 
-// Prescaler values for LSE clock
-#define RTC_ASYNCH_PREDIV   0x7F
-#define RTC_SYNCH_PREDIV    0x00FF
-
+/** Set the given function as handler of wakeup timer event.
+ *
+ * @param handler    The function to set as handler
+ */
 void rtc_set_irq_handler(uint32_t handler);
 
-void rtc_ticker_disable_irq();
-uint32_t rtc_ticker_get_synch_presc();
+/** Read the subsecond register.
+ *
+ * @return The remaining time as microseconds (0-999999)
+ */
+uint32_t rtc_read_subseconds(void);
+
+/** Program a wake up timer event in delta microseconds.
+ *
+ * @param delta    The time to wait
+ */
+void rtc_set_wake_up_timer(uint32_t delta);
 
-void rtc_set_alarm(struct tm *ti, uint32_t subsecs);
-uint32_t rtc_read_subseconds();
-void rtc_reconfigure_prescalers();
+/** Disable the wake up timer event.
+ *
+ * The wake up timer use auto reload, you have to deactivate it manually.
+ */
+void rtc_deactivate_wake_up_timer(void);
+
+/** Synchronise the RTC shadow registers.
+ *
+ * Must be called after a deepsleep.
+ */
+void rtc_synchronize(void);
+
 
 #ifdef __cplusplus
 }