[riot-notifications] [RIOT-OS/RIOT] cpu: RTC implementation for STM32F1 (#11258)

Marian Buschsieweke notifications at github.com
Tue Apr 9 10:25:14 CEST 2019


maribu commented on this pull request.



> +static time_t _rtc_get_time(void)
+{
+    return (RTC->CNTH << 16) | RTC->CNTL;
+}
+
+static void _rtc_set_time(time_t counter_val)
+{
+    _rtc_enter_config_mode();
+    RTC->CNTH = (counter_val & 0xffff0000) >> 16;
+    RTC->CNTL = counter_val & 0x0000ffff;
+    _rtc_exit_config_mode();
+}
+
+void rtc_init(void)
+{
+    /* save current time if RTC already works */

Indeed

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11258#discussion_r273377523
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190409/652fa2e0/attachment.html>


More information about the notifications mailing list