port-probe: MMPortProbeAtCommand always has constant command strings
This commit is contained in:
@@ -41,9 +41,9 @@ MM_PLUGIN_DEFINE_MINOR_VERSION
|
||||
take longer to respond after a reset.
|
||||
*/
|
||||
static const MMPortProbeAtCommand custom_at_probe[] = {
|
||||
{ (gchar *) "AT", 7, mm_port_probe_response_processor_is_at },
|
||||
{ (gchar *) "AT", 7, mm_port_probe_response_processor_is_at },
|
||||
{ (gchar *) "AT", 7, mm_port_probe_response_processor_is_at },
|
||||
{ "AT", 7, mm_port_probe_response_processor_is_at },
|
||||
{ "AT", 7, mm_port_probe_response_processor_is_at },
|
||||
{ "AT", 7, mm_port_probe_response_processor_is_at },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
@@ -33,9 +33,9 @@ MM_PLUGIN_DEFINE_MINOR_VERSION
|
||||
/* Custom commands for AT probing */
|
||||
|
||||
static const MMPortProbeAtCommand custom_at_probe[] = {
|
||||
{ (gchar *) "ATE1 E0", 3, mm_port_probe_response_processor_is_at },
|
||||
{ (gchar *) "ATE1 E0", 3, mm_port_probe_response_processor_is_at },
|
||||
{ (gchar *) "ATE1 E0", 3, mm_port_probe_response_processor_is_at },
|
||||
{ "ATE1 E0", 3, mm_port_probe_response_processor_is_at },
|
||||
{ "ATE1 E0", 3, mm_port_probe_response_processor_is_at },
|
||||
{ "ATE1 E0", 3, mm_port_probe_response_processor_is_at },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
@@ -34,9 +34,9 @@ MM_PLUGIN_DEFINE_MINOR_VERSION
|
||||
/* Custom commands for AT probing */
|
||||
|
||||
static const MMPortProbeAtCommand custom_at_probe[] = {
|
||||
{ (gchar *) "ATE1 E0", 3, mm_port_probe_response_processor_is_at },
|
||||
{ (gchar *) "ATE1 E0", 3, mm_port_probe_response_processor_is_at },
|
||||
{ (gchar *) "ATE1 E0", 3, mm_port_probe_response_processor_is_at },
|
||||
{ "ATE1 E0", 3, mm_port_probe_response_processor_is_at },
|
||||
{ "ATE1 E0", 3, mm_port_probe_response_processor_is_at },
|
||||
{ "ATE1 E0", 3, mm_port_probe_response_processor_is_at },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
@@ -66,9 +66,9 @@ port_probe_response_processor_is_pantech_at (const gchar *command,
|
||||
}
|
||||
|
||||
static const MMPortProbeAtCommand custom_at_probe[] = {
|
||||
{ (gchar *) "ATE0", 3, port_probe_response_processor_is_pantech_at },
|
||||
{ (gchar *) "ATE0", 3, port_probe_response_processor_is_pantech_at },
|
||||
{ (gchar *) "ATE0", 3, port_probe_response_processor_is_pantech_at },
|
||||
{ "ATE0", 3, port_probe_response_processor_is_pantech_at },
|
||||
{ "ATE0", 3, port_probe_response_processor_is_pantech_at },
|
||||
{ "ATE0", 3, port_probe_response_processor_is_pantech_at },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
@@ -51,9 +51,9 @@ MM_PLUGIN_DEFINE_MINOR_VERSION
|
||||
* We use this command also for checking AT support in the port.
|
||||
*/
|
||||
static const MMPortProbeAtCommand custom_at_probe[] = {
|
||||
{ (gchar *) "ATE0+CPMS?", 3, mm_port_probe_response_processor_is_at },
|
||||
{ (gchar *) "ATE0+CPMS?", 3, mm_port_probe_response_processor_is_at },
|
||||
{ (gchar *) "ATE0+CPMS?", 3, mm_port_probe_response_processor_is_at },
|
||||
{ "ATE0+CPMS?", 3, mm_port_probe_response_processor_is_at },
|
||||
{ "ATE0+CPMS?", 3, mm_port_probe_response_processor_is_at },
|
||||
{ "ATE0+CPMS?", 3, mm_port_probe_response_processor_is_at },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
@@ -52,7 +52,7 @@ typedef gboolean (* MMPortProbeAtResponseProcessor) (const gchar *command,
|
||||
/* Struct to configure port probing commands */
|
||||
typedef struct {
|
||||
/* The AT command */
|
||||
gchar *command;
|
||||
const gchar *command;
|
||||
/* Timeout of the command, in seconds */
|
||||
guint timeout;
|
||||
/* The response processor */
|
||||
@@ -76,5 +76,4 @@ gboolean mm_port_probe_response_processor_is_at (const gchar *command,
|
||||
GVariant **result,
|
||||
GError **result_error);
|
||||
|
||||
|
||||
#endif /* MM_PORT_PROBE_AT_H */
|
||||
|
@@ -1104,35 +1104,35 @@ serial_probe_at (MMPortProbe *self)
|
||||
}
|
||||
|
||||
static const MMPortProbeAtCommand at_probing[] = {
|
||||
{ (gchar *)"AT", 3, mm_port_probe_response_processor_is_at },
|
||||
{ (gchar *)"AT", 3, mm_port_probe_response_processor_is_at },
|
||||
{ (gchar *)"AT", 3, mm_port_probe_response_processor_is_at },
|
||||
{ "AT", 3, mm_port_probe_response_processor_is_at },
|
||||
{ "AT", 3, mm_port_probe_response_processor_is_at },
|
||||
{ "AT", 3, mm_port_probe_response_processor_is_at },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const MMPortProbeAtCommand vendor_probing[] = {
|
||||
{ (gchar *)"+CGMI", 3, mm_port_probe_response_processor_string },
|
||||
{ (gchar *)"+GMI", 3, mm_port_probe_response_processor_string },
|
||||
{ (gchar *)"I", 3, mm_port_probe_response_processor_string },
|
||||
{ "+CGMI", 3, mm_port_probe_response_processor_string },
|
||||
{ "+GMI", 3, mm_port_probe_response_processor_string },
|
||||
{ "I", 3, mm_port_probe_response_processor_string },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const MMPortProbeAtCommand product_probing[] = {
|
||||
{ (gchar *)"+CGMM", 3, mm_port_probe_response_processor_string },
|
||||
{ (gchar *)"+GMM", 3, mm_port_probe_response_processor_string },
|
||||
{ (gchar *)"I", 3, mm_port_probe_response_processor_string },
|
||||
{ "+CGMM", 3, mm_port_probe_response_processor_string },
|
||||
{ "+GMM", 3, mm_port_probe_response_processor_string },
|
||||
{ "I", 3, mm_port_probe_response_processor_string },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const MMPortProbeAtCommand icera_probing[] = {
|
||||
{ (gchar *)"%IPSYS?", 3, mm_port_probe_response_processor_string },
|
||||
{ (gchar *)"%IPSYS?", 3, mm_port_probe_response_processor_string },
|
||||
{ (gchar *)"%IPSYS?", 3, mm_port_probe_response_processor_string },
|
||||
{ "%IPSYS?", 3, mm_port_probe_response_processor_string },
|
||||
{ "%IPSYS?", 3, mm_port_probe_response_processor_string },
|
||||
{ "%IPSYS?", 3, mm_port_probe_response_processor_string },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const MMPortProbeAtCommand xmm_probing[] = {
|
||||
{ (gchar *)"+XACT=?", 3, mm_port_probe_response_processor_string },
|
||||
{ "+XACT=?", 3, mm_port_probe_response_processor_string },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user