BV UART: add error command
This commit is contained in:
parent
760b8c2a46
commit
aa11257c63
|
@ -620,6 +620,19 @@ static void busvoodoo_uart_command_transceive(void* argument)
|
|||
printf("\n"); // get to next line
|
||||
}
|
||||
|
||||
/** command to verify incoming transmission for error
|
||||
* @param[in] argument argument not required
|
||||
*/
|
||||
static void busvoodoo_uart_command_error(void* argument)
|
||||
{
|
||||
(void)argument; // argument not used
|
||||
printf("press any key to exit\n");
|
||||
while (!user_input_available) { // wait until user interrupt
|
||||
busvoodoo_uart_read(); // read incoming data (this also checks for errors
|
||||
}
|
||||
user_input_get(); // discard user input
|
||||
}
|
||||
|
||||
/** UART menu commands */
|
||||
static const struct menu_command_t busvoodoo_uart_commands[] = {
|
||||
{
|
||||
|
@ -654,6 +667,14 @@ static const struct menu_command_t busvoodoo_uart_commands[] = {
|
|||
NULL,
|
||||
&busvoodoo_uart_command_transceive,
|
||||
},
|
||||
{
|
||||
'e',
|
||||
"error",
|
||||
"verify incoming transmission for errors",
|
||||
MENU_ARGUMENT_NONE,
|
||||
NULL,
|
||||
&busvoodoo_uart_command_error,
|
||||
},
|
||||
};
|
||||
|
||||
struct busvoodoo_mode_t busvoodoo_uart_mode = {
|
||||
|
|
Loading…
Reference in New Issue