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

Gunar Schorcht notifications at github.com
Mon Apr 1 13:56:11 CEST 2019


gschorcht commented on this pull request.



> -                 _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);

@MrKevinWeiss This is not only the case for `periph/uart` but for other ESP32/ESP8266 peripherals and other modules. I have it on my ToDo list to change it. Maybe we could leave it for the moment to keep consistency with other modules. But, if you think it would be reasonable to change it with this PR, it would not be a big thing to change it. As you want.

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


More information about the notifications mailing list