[riot-notifications] [RIOT-OS/RIOT] cpu/esp32: add the new API function uart_mode to periph/uart (#11231)
notifications at github.com
Fri Mar 22 08:11:00 CET 2019
> Could you wrap uart_mode into `#ifdef MODULE_PERIPH_UART_MODECFG` and add the feature to `cpu/esp32/Makefile.features`?
I didn't embed the function in `#ifdef MODULE_PERIPH_UART_MODECFG` by intention since the driver itself uses the function for its initial configuration. So it can be considered as an internal function as long as it isn't declared as an official feature. Alternatively, I see following options:
1. Alternatively, I could define two functions, a static function _uart_mode used by the driver and a API wrapper function `uart_mode`. It would cost one additional function call.
2. Another possibility would be to add `USEMODULE += periph_uart_modecfg` by default for ESP MCUs.
Furthermore, since `uart_mode` is added to `periph/uart.h` without `#ifdef MODULE_PERIPH_UART_MODECFG`, it is already documented and someone could expect to be able to use it.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications