diff --git a/drivers/console/native_posix_console.c b/drivers/console/native_posix_console.c index 6ed8344b0aa..02d80060bb7 100644 --- a/drivers/console/native_posix_console.c +++ b/drivers/console/native_posix_console.c @@ -254,19 +254,6 @@ static void native_stdio_runner(void *p1, void *p2, void *p3) k_sleep(wait_time); } } - -void native_stdin_register_input(struct k_fifo *avail, struct k_fifo *lines, - u8_t (*completion)(char *str, u8_t len)) -{ - avail_queue = avail; - lines_queue = lines; - completion_cb = completion; - - k_thread_create(&native_stdio_thread, stack, - CONFIG_ARCH_POSIX_RECOMMENDED_STACK_SIZE, - native_stdio_runner, NULL, NULL, NULL, - CONFIG_NATIVE_STDIN_PRIO, 0, K_NO_WAIT); -} #endif /* CONFIG_NATIVE_POSIX_STDIN_CONSOLE */ static int native_posix_console_init(struct device *arg) diff --git a/include/console/console.h b/include/console/console.h index 56fe74ef7ed..4c689d6ed0d 100644 --- a/include/console/console.h +++ b/include/console/console.h @@ -105,26 +105,6 @@ void console_getline_init(void); */ char *console_getline(void); -/** @brief Initialize legacy fifo-based line input - * - * Input processing is started when string is typed in the console. - * Carriage return is translated to NULL making string always NULL - * terminated. Application before calling register function need to - * initialize two fifo queues mentioned below. - * - * This is a special-purpose function, it's recommended to use - * console_getchar() or console_getline() functions instead. - * - * @param avail_queue k_fifo queue keeping available line buffers - * @param out_queue k_fifo queue of entered lines which to be processed - * in the application code. - * @param completion callback for tab completion of entered commands - */ -__deprecated void console_register_line_input(struct k_fifo *avail_queue, - struct k_fifo *out_queue, - u8_t (*completion)(char *str, u8_t len)); - - #ifdef __cplusplus } #endif diff --git a/include/drivers/console/native_posix_console.h b/include/drivers/console/native_posix_console.h index 37d21058c61..cf2aaad1372 100644 --- a/include/drivers/console/native_posix_console.h +++ b/include/drivers/console/native_posix_console.h @@ -15,11 +15,6 @@ extern "C" { void posix_flush_stdout(void); -#if defined(CONFIG_NATIVE_POSIX_STDIN_CONSOLE) -void native_stdin_register_input(struct k_fifo *avail, struct k_fifo *lines, - u8_t (*completion)(char *str, u8_t len)); -#endif - #ifdef __cplusplus } #endif diff --git a/subsys/console/CMakeLists.txt b/subsys/console/CMakeLists.txt index 03a1c704a94..37ff969710b 100644 --- a/subsys/console/CMakeLists.txt +++ b/subsys/console/CMakeLists.txt @@ -1,5 +1,4 @@ # SPDX-License-Identifier: Apache-2.0 -zephyr_sources(line_fifo.c) zephyr_sources_ifdef(CONFIG_CONSOLE_GETCHAR tty.c getchar.c) zephyr_sources_ifdef(CONFIG_CONSOLE_GETLINE getline.c) diff --git a/subsys/console/line_fifo.c b/subsys/console/line_fifo.c deleted file mode 100644 index 5146aa2d58c..00000000000 --- a/subsys/console/line_fifo.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2018 Linaro Limited. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -/** - * @file - * @brief Legacy fifo-based line input - */ - -#include -#include - -#ifdef CONFIG_UART_CONSOLE -#include -#endif -#ifdef CONFIG_NATIVE_POSIX_CONSOLE -#include -#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 -}