8000 zephyr: Get UART console device from devicetree instead of Kconfig. · DEVBOX10/micropython@1e5df09 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e5df09

Browse files
MaureenHelmdpgeorge
authored andcommitted
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>
1 parent 080a9e9 commit 1e5df09

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ports/zephyr/uart_core.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,8 @@ void mp_hal_stdout_tx_strn(const char *str, mp_uint_t len) {
5353
}
5454
}
5555
#else
56-
static const struct device *uart_console_dev;
57-
if (uart_console_dev == NULL) {
58-
uart_console_dev = device_get_binding(CONFIG_UART_CONSOLE_ON_DEV_NAME);
59-
}
56+
static const struct device *uart_console_dev =
57+
DEVICE_DT_GET(DT_CHOSEN(zephyr_console));
6058

6159
while (len--) {
6260
uart_poll_out(uart_console_dev, *str++);

0 commit comments

Comments
 (0)
0