Skip to content

Commit

Permalink
zephyr: Get UART console device from devicetree instead of Kconfig.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
MaureenHelm authored and dpgeorge committed Jan 6, 2022
1 parent 080a9e9 commit 1e5df09
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ports/zephyr/uart_core.c
Expand Up @@ -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++);
Expand Down

0 comments on commit 1e5df09

Please sign in to comment.