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

Joakim NohlgÄrd notifications at github.com
Tue Sep 19 20:10:08 CEST 2017


gebart commented on this pull request.



>  }
 
 void stmclk_disable_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);
-#endif
+    if (CLOCK_LSE) {
+        stmclk_dbp_unlock();
+        RCC->REG_LSE &= ~(BIT_LSEON);
+        while (!(RCC->REG_LSE & BIT_LSERDY)) {}
+        stmclk_dbp_lock();
+    } else {

Two lines

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


More information about the notifications mailing list