/* * Copyright (c) 2015 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ #include #include "board.h" #include #include #include #include #if CONFIG_SERIAL static int uart_switch(struct device *port) { ARG_UNUSED(port); struct device *gpio; gpio = device_get_binding(CONFIG_GPIO_QMSI_1_NAME); gpio_pin_configure(gpio, UART_CONSOLE_SWITCH, GPIO_DIR_OUT); gpio_pin_write(gpio, UART_CONSOLE_SWITCH, 0); return 0; } SYS_INIT(uart_switch, POST_KERNEL, CONFIG_UART_CONSOLE_INIT_PRIORITY); #endif