[riot-notifications] [RIOT-OS/RIOT] RFC: UART enhanced settings (#10743)

MrKevinWeiss notifications at github.com
Fri Jan 25 15:40:25 CET 2019


MrKevinWeiss commented on this pull request.



> +            data_bits = UART_DATA_BITS_7;
+        }
+    }
+    if ((data_bits & UART_INVALID_MODE) || (parity & UART_INVALID_MODE)) {
+        return UART_NOMODE;
+    }
+
+#ifdef USART_CR1_M1
+    if (!(dev(uart)->ISR & USART_ISR_TC)) {
+        return UART_INTERR;
+    }
+    dev(uart)->CR1 &= ~(USART_CR1_UE | USART_CR1_TE);
+#endif
+
+    dev(uart)->CR2 |= stop_bits;
+    dev(uart)->CR1 |= (USART_CR1_UE | USART_CR1_TE | data_bits | parity);

My bad, I suggested that.  I also tested that, I am not sure if before can also me at the same time assuming the bits were cleared initially.

-- 
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/10743#discussion_r251007106
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190125/9a84f9f4/attachment.html>


More information about the notifications mailing list