[riot-notifications] [RIOT-OS/RIOT] boards/esp32: changes the approach for configurations of UART interfaces in board definitions (#11294)

MrKevinWeiss notifications at github.com
Mon Apr 1 13:47:34 CEST 2019


MrKevinWeiss commented on this pull request.

Small thing, otherwise looks OK.  I also tested with trying alternate uarts and with uart_mode_cfg and  it works fine.

> -                 _uart_config(uart);
-                 break;
-        #endif
-        #if UART_NUMOF > 1
-        case 1:  periph_module_enable(PERIPH_UART1_MODULE);
-                 _uart_config(uart);
-                 break;
-        #endif
-        #if UART_NUMOF > 2
-        case 2:  periph_module_enable(PERIPH_UART2_MODULE);
-                 _uart_config(uart);
-                 break;
-        #endif
-        default: break;
-    }
+    CHECK_PARAM (uart < UART_NUMOF);

Maybe just replace with an assert, this goes for all `CHECK_PARAM`

-- 
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/11294#pullrequestreview-221062025
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190401/cb86fc42/attachment.html>


More information about the notifications mailing list