CuVoodoo STM32F1 firmware template
|
terminal prompt interface (code) More...
Go to the source code of this file.
Functions | |
static bool | terminal_remove_line (void) |
remove one line from buffer start and shift rest to start More... | |
static void | terminal_shift_line (uint16_t to_copy, uint16_t nb_copy, uint16_t to_shift) |
shift with rotate current characters to other position More... | |
static void | terminal_copy_line (void) |
copy current line to last line | |
static void | terminal_process_escape (void) |
process current escape code | |
static void | terminal_print_line (void) |
print current line and set position | |
void | terminal_setup (void) |
initialize terminal prompt | |
void | terminal_send (volatile char c) |
send character to terminal More... | |
Variables | |
char * | terminal_prefix = NULL |
terminal prompt prefix | |
void(* | terminal_process )(char *line) = NULL |
called when a line is entered More... | |
static char | terminal_buffer [1024] = {0} |
buffer to store user input and keep history | |
static uint16_t | terminal_end = 0 |
how much of the buffer is user | |
static uint16_t | terminal_pos = 0 |
current position in the buffer | |
static uint16_t | terminal_line = 0 |
start position or current line in the buffer | |
static bool | terminal_last = true |
is the current line the last one | |
static bool | terminal_insert = true |
currently inserting or replacing characters | |
static char | escape_code [8] = {0} |
current escape code | |
static uint8_t | escape_pos = 0 |
current position in the escape code | |
terminal prompt interface (code)
Definition in file terminal.c.
|
static |
remove one line from buffer start and shift rest to start
Definition at line 55 of file terminal.c.
void terminal_send | ( | char | c | ) |
send character to terminal
[in] | c | character to send |
Definition at line 316 of file terminal.c.
|
static |
shift with rotate current characters to other position
[in] | to_copy | position of character(s) to shift |
[in] | nb_copy | number of characters to shift |
[in] | to_shift | where to shift the characters to |
Definition at line 94 of file terminal.c.
void(* terminal_process) (char *line) = NULL |
called when a line is entered
[in] | line | line entered by user (NULL on CTRL+D) |
Definition at line 33 of file terminal.c.