mmtty: new --spew-control option
So that we simulate enabling the spew control, as we do during probing.
This commit is contained in:
11
test/mmtty.c
11
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");
|
||||
|
Reference in New Issue
Block a user