aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-03-31 11:11:39 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-03-31 13:55:52 +0200
commit9b72ff0adf079828d9d6e8658ff0cad548a68535 (patch)
treef76247de70d118c182e4dd00030d3f8ffcb2085f
parent65e860439a1a97c227e49731826d8705cf75496d (diff)
mmtty: new --spew-control option
So that we simulate enabling the spew control, as we do during probing.
-rw-r--r--test/mmtty.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/mmtty.c b/test/mmtty.c
index 818707a4..5e8e16b0 100644
--- a/test/mmtty.c
+++ b/test/mmtty.c
@@ -41,6 +41,7 @@ static guint input_watch_id;
static gchar *device_str;
static gboolean no_flash_flag;
static gboolean no_echo_removal_flag;
+static gboolean spew_control_flag;
static gint64 send_delay = -1;
static gboolean send_lf_flag;
static gboolean verbose_flag;
@@ -59,6 +60,10 @@ static GOptionEntry main_entries[] = {
"Avoid logic to remove echo",
NULL
},
+ { "spew-control", 0, 0, G_OPTION_ARG_NONE, &spew_control_flag,
+ "Enable spew control logic",
+ NULL
+ },
{ "send-delay", 0, 0, G_OPTION_ARG_INT64, &send_delay,
"Send delay for each byte in microseconds (default=1000)",
"[DELAY]"
@@ -217,6 +222,12 @@ start_cb (void)
g_object_set (port, MM_PORT_SERIAL_AT_REMOVE_ECHO, FALSE, NULL);
}
+ /* Setup spew control */
+ if (spew_control_flag) {
+ g_print ("enabling spew control...\n");
+ g_object_set (port, MM_PORT_SERIAL_SPEW_CONTROL, TRUE, NULL);
+ }
+
/* Setup LF */
if (send_lf_flag) {
g_print ("enabling LF...\n");