summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-06-09 00:13:07 +0200
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-06-09 00:13:07 +0200
commit17cd4bb3837eed09e6cc90e25fd29bcf50396eca (patch)
tree38d91e450d0add975d1e250c0917bf5779587ea9
parent85cbab37def2c48f1ebe0b74ce7f7728afae6a77 (diff)
parent818bc81584b0e2ca3fc335e10a7fc27d0cb36f85 (diff)
downloadmicrocom-17cd4bb3837eed09e6cc90e25fd29bcf50396eca.tar.gz
microcom-17cd4bb3837eed09e6cc90e25fd29bcf50396eca.tar.xz
Merge branch 'command-sendescape' of https://github.com/ukleinek/microcom
-rw-r--r--commands.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/commands.c b/commands.c
index ed1b8f0..9345eba 100644
--- a/commands.c
+++ b/commands.c
@@ -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",