2018-02-18 15:20:01 +01:00
|
|
|
/** terminal prompt interface (API)
|
|
|
|
* @note allows line editing and supports some ANSI escape codes
|
2020-06-06 14:35:55 +02:00
|
|
|
* @file
|
2018-02-18 15:20:01 +01:00
|
|
|
* @author King Kévin <kingkevin@cuvoodoo.info>
|
2020-06-06 14:35:55 +02:00
|
|
|
* @copyright SPDX-License-Identifier: GPL-3.0-or-later
|
2018-02-18 15:20:01 +01:00
|
|
|
* @date 2018
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** terminal prompt prefix */
|
|
|
|
extern char* terminal_prefix;
|
|
|
|
|
|
|
|
/** initialize terminal prompt */
|
|
|
|
void terminal_setup(void);
|
|
|
|
|
2018-04-03 16:59:02 +02:00
|
|
|
/** send character to terminal
|
|
|
|
* @param[in] c character to send
|
|
|
|
*/
|
2018-02-18 15:20:01 +01:00
|
|
|
void terminal_send(char c);
|
|
|
|
|
|
|
|
/** called when a line is entered
|
|
|
|
* @param[in] line line entered by user (NULL on CTRL+D)
|
|
|
|
*/
|
|
|
|
extern void (*terminal_process)(char* line);
|