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: Maureen Helm <maureen.helm@intel.com>
pull/8141/head
Maureen Helm 2022-01-03 17:19:37 -06:00 zatwierdzone przez Damien George
rodzic 080a9e906d
commit 1e5df0982a
1 zmienionych plików z 2 dodań i 4 usunięć

Wyświetl plik

@ -53,10 +53,8 @@ void mp_hal_stdout_tx_strn(const char *str, mp_uint_t len) {
}
}
#else
static const struct device *uart_console_dev;
if (uart_console_dev == NULL) {
uart_console_dev = device_get_binding(CONFIG_UART_CONSOLE_ON_DEV_NAME);
}
static const struct device *uart_console_dev =
DEVICE_DT_GET(DT_CHOSEN(zephyr_console));
while (len--) {
uart_poll_out(uart_console_dev, *str++);