| * Copyright (c) 2017 Intel Corporation |
| * SPDX-License-Identifier: Apache-2.0 |
| /* Include esp-idf headers first to avoid redefining BIT() macro */ |
| static unsigned char esp32_uart_tx(struct device *dev, |
| static int esp32_uart_rx(struct device *dev, unsigned char *p_char) |
| switch (uart_rx_one_char(p_char)) { |
| static int esp32_uart_init(struct device *dev) |
| static const struct uart_driver_api esp32_uart_api = { |
| .poll_in = &esp32_uart_rx, |
| .poll_out = &esp32_uart_tx, |
| DEVICE_AND_API_INIT(esp32_uart, "ROMUART", |
| esp32_uart_init, NULL, NULL, |
| PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, |