mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-06 04:11:56 +00:00
move console.h to console/console.h and create a shim for backward-compatibility. No functional changes to the headers. A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES. Related to #16539 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
34 lines
751 B
C
34 lines
751 B
C
/*
|
|
* Copyright (c) 2018 Linaro Limited.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
* @brief Legacy fifo-based line input
|
|
*/
|
|
|
|
#include <zephyr.h>
|
|
#include <console/console.h>
|
|
|
|
#ifdef CONFIG_UART_CONSOLE
|
|
#include <drivers/console/uart_console.h>
|
|
#endif
|
|
#ifdef CONFIG_NATIVE_POSIX_CONSOLE
|
|
#include <drivers/console/native_posix_console.h>
|
|
#endif
|
|
|
|
void console_register_line_input(struct k_fifo *avail_queue,
|
|
struct k_fifo *out_queue,
|
|
u8_t (*completion)(char *str, u8_t len))
|
|
{
|
|
/* Register serial console handler */
|
|
#ifdef CONFIG_UART_CONSOLE
|
|
uart_register_input(avail_queue, out_queue, completion);
|
|
#endif
|
|
#ifdef CONFIG_NATIVE_POSIX_STDIN_CONSOLE
|
|
native_stdin_register_input(avail_queue, out_queue, completion);
|
|
#endif
|
|
}
|