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

Yegor Yefremov notifications at github.com
Mon Jan 28 16:23:52 CET 2019


yegorich commented on this pull request.



> @@ -154,6 +235,32 @@ static int cmd_init(int argc, char **argv)
     return 0;
 }
 
+#ifdef MODULE_PERIPH_UART_MODECFG
+static int cmd_mode(int argc, char **argv)
+{
+    int dev, res;
+
+    if (argc < 5) {
+        printf("usage: %s <dev> <data bits> <parity> <stop bits>\n", argv[0]);
+        return 1;
+    }
+
+    dev = parse_dev(argv[1]);
+    if (dev < 0) {
+        return 1;
+    }
+    res = uart_mode(dev, parse_data_bits(argv[2]), parse_parity(argv[3]),

Reworked to check return values of parse_data_bits&Co before calling uart_mode

-- 
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_r251460068
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190128/56853cae/attachment.html>


More information about the notifications mailing list