Commit 1e5df098 authored by Maureen Helm's avatar Maureen Helm Committed by Damien George

zephyr: Get UART console device from devicetree instead of Kconfig.

Updates the Zephyr port to get the UART console device from devicetree
instead of Kconfig. The Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME
was removed in Zephyr v2.7.0.
Signed-off-by: default avatarMaureen Helm <maureen.helm@intel.com>
parent 080a9e90
...@@ -53,10 +53,8 @@ void mp_hal_stdout_tx_strn(const char *str, mp_uint_t len) { ...@@ -53,10 +53,8 @@ void mp_hal_stdout_tx_strn(const char *str, mp_uint_t len) {
} }
} }
#else #else
static const struct device *uart_console_dev; static const struct device *uart_console_dev =
if (uart_console_dev == NULL) { DEVICE_DT_GET(DT_CHOSEN(zephyr_console));
uart_console_dev = device_get_binding(CONFIG_UART_CONSOLE_ON_DEV_NAME);
}
while (len--) { while (len--) {
uart_poll_out(uart_console_dev, *str++); uart_poll_out(uart_console_dev, *str++);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment