[riot-notifications] [RIOT-OS/RIOT] cpu: stm32: convert preprocessor if to compiler if statement (#7502)

Kaspar Schleiser notifications at github.com
Tue Sep 19 22:47:15 CEST 2017


kaspar030 commented on this pull request.



>  }
 
 void stmclk_enable_lfclk(void)
 {
-#if CLOCK_LSE
-    stmclk_dbp_unlock();
-    RCC->REG_LSE |= BIT_LSEON;
-    while (!(RCC->REG_LSE & BIT_LSERDY)) {}
-    stmclk_dbp_lock();
-#else
-    RCC->CSR |= RCC_CSR_LSION;
-    while (!(RCC->CSR & RCC_CSR_LSIRDY)) {}
-#endif
+    if (CLOCK_LSE) {
+        stmclk_dbp_unlock();
+        RCC->REG_LSE |= BIT_LSEON;
+        while (!(RCC->REG_LSE & BIT_LSERDY)) {}
+        stmclk_dbp_lock();
+    } else {

fixed


-- 
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/7502#discussion_r139813256
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20170919/7db083c2/attachment.html>


More information about the notifications mailing list