[riot-notifications] [RIOT-OS/RIOT] nrf5x: Add UART modecfg feature implementation (#11713)

Koen Zandberg notifications at github.com
Tue Jun 18 08:52:34 CEST 2019


bergzand commented on this pull request.



> +{
+
+    if (stop_bits != UART_STOP_BITS_1 && stop_bits != UART_STOP_BITS_2) {
+        return UART_NOMODE;
+    }
+
+    if (data_bits != UART_DATA_BITS_8) {
+        return UART_NOMODE;
+    }
+
+    if (parity != UART_PARITY_NONE && parity != UART_PARITY_EVEN) {
+        return UART_NOMODE;
+    }
+
+    uart_poweroff(uart);
+    dev(uart)->ENABLE = 0;

Not sure if it is required to disable the controller before changing this. I put it in originally when things didn't work:tm: as expected. It is probably not required anymore (same with the enable below)

-- 
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/11713#pullrequestreview-250888723
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190617/54aba6c4/attachment-0001.html>


More information about the notifications mailing list