console: Remove deprecated function console_register_line_input
console_register_line_input has been deprecated for at least 2 releases so we can now remove it. Remove native_stdin_register_input that is associated with console_register_line_input. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
127a245fb0
commit
140a8d0c8a
5 changed files with 0 additions and 72 deletions
|
@ -254,19 +254,6 @@ static void native_stdio_runner(void *p1, void *p2, void *p3)
|
||||||
k_sleep(wait_time);
|
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 */
|
#endif /* CONFIG_NATIVE_POSIX_STDIN_CONSOLE */
|
||||||
|
|
||||||
static int native_posix_console_init(struct device *arg)
|
static int native_posix_console_init(struct device *arg)
|
||||||
|
|
|
@ -105,26 +105,6 @@ void console_getline_init(void);
|
||||||
*/
|
*/
|
||||||
char *console_getline(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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -15,11 +15,6 @@ extern "C" {
|
||||||
|
|
||||||
void posix_flush_stdout(void);
|
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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# 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_GETCHAR tty.c getchar.c)
|
||||||
zephyr_sources_ifdef(CONFIG_CONSOLE_GETLINE getline.c)
|
zephyr_sources_ifdef(CONFIG_CONSOLE_GETLINE getline.c)
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
/*
|
|
||||||
* 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
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue