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

Yegor Yefremov notifications at github.com
Tue Jan 29 15:33:14 CET 2019


yegorich commented on this pull request.



> +{
+    int data_bits = atoi(arg) - 5;
+
+    if (data_bits >= 0 && data_bits < data_bits_lut_len)
+        return data_bits_lut[data_bits];
+
+    printf("Error: Invalid number of data_bits (%i).\n", data_bits + 5);
+    return -1;
+}
+
+static uart_stop_bits_t parse_stop_bits(char *arg)
+{
+    int stop_bits = atoi(arg) - 1;
+
+    if (stop_bits >= 0 && stop_bits < stop_bits_lut_len)
+        return stop_bits_lut[stop_bits];

Fixed.

-- 
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_r251856869
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190129/51160aa9/attachment.html>


More information about the notifications mailing list