[riot-notifications] [RIOT-OS/RIOT] cpu/efm32: provide periph_uart_mode (#12323)

benpicco notifications at github.com
Mon Sep 30 18:24:44 CEST 2019


benpicco commented on this pull request.



> +        return UART_NOMODE;
+    }
+
+#ifdef USE_LEUART
+    if (_is_usart(dev)) {
+#endif
+        USART_TypeDef *uart = (USART_TypeDef *) uart_config[dev].dev;
+
+        USART_FrameSet(uart,
+                       USART_DataBits2Def(data_bits),
+                       USART_StopBits2Def(stop_bits),
+                       USART_Parity2Def(parity));
+#ifdef USE_LEUART
+    } else {
+        if (data_bits != UART_DATA_BITS_8) {
+            return UART_NOMODE;

Why though?
`USART_DataBits2Def()` has `EFM_ASSERT(bits >= 4 && bits <= 16);`.


-- 
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/12323#pullrequestreview-295097581
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190930/e781f3b5/attachment.htm>


More information about the notifications mailing list