diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-06-04 19:22:50 +0200 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-06-04 19:55:12 +0200 |
commit | 818bc81584b0e2ca3fc335e10a7fc27d0cb36f85 (patch) | |
tree | 754634b74258ab51b7edde90df7244846049e7df | |
parent | 63e6314777f161fc71117424b8dd65df98fc6a6d (diff) | |
download | microcom-818bc81584b0e2ca3fc335e10a7fc27d0cb36f85.tar.gz microcom-818bc81584b0e2ca3fc335e10a7fc27d0cb36f85.tar.xz |
commands: Implement a command to send the escape char
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Closes: https://github.com/pengutronix/microcom/issues/35
-rw-r--r-- | commands.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -153,6 +153,12 @@ static int cmd_quit(int argc, char *argv[]) return 0; } +static int cmd_sendescape(int argc, char *argv[]) +{ + ios->write(ios, "\x1c", 1); + return 0; +} + static int cmd_help(int argc, char *argv[]) { struct cmd *cmd; @@ -226,6 +232,10 @@ static struct cmd cmds[] = { .fn = cmd_break, .info = "send break", }, { + .name = "sendescape", + .fn = cmd_sendescape, + .info = "send a Ctrl-\\", + }, { .name = "quit", .fn = cmd_quit, .info = "quit microcom", |