serial: allow plugins to specify probe-time send_delay
Let modems we know don't suck use a zero send-delay at probe time, which greatly reduces time required to probe AT-compatible ports.
This commit is contained in:
@@ -845,6 +845,7 @@ try_open (gpointer user_data)
|
||||
gboolean
|
||||
mm_plugin_base_probe_port (MMPluginBase *self,
|
||||
MMPluginBaseSupportsTask *task,
|
||||
guint64 send_delay_us,
|
||||
GError **error)
|
||||
{
|
||||
MMPluginBaseSupportsTaskPrivate *task_priv = MM_PLUGIN_BASE_SUPPORTS_TASK_GET_PRIVATE (task);
|
||||
@@ -869,7 +870,7 @@ mm_plugin_base_probe_port (MMPluginBase *self,
|
||||
}
|
||||
|
||||
g_object_set (serial,
|
||||
MM_SERIAL_PORT_SEND_DELAY, (guint64) 100000,
|
||||
MM_SERIAL_PORT_SEND_DELAY, send_delay_us,
|
||||
MM_PORT_CARRIER_DETECT, FALSE,
|
||||
NULL);
|
||||
|
||||
|
||||
@@ -138,6 +138,7 @@ gboolean mm_plugin_base_get_device_ids (MMPluginBase *self,
|
||||
|
||||
gboolean mm_plugin_base_probe_port (MMPluginBase *self,
|
||||
MMPluginBaseSupportsTask *task,
|
||||
guint64 send_delay_us,
|
||||
GError **error);
|
||||
|
||||
/* Returns TRUE if the port was previously probed, FALSE if not */
|
||||
|
||||
Reference in New Issue
Block a user