Hi Martin,
On 7/16/19 2:10 PM, Martin Hundebøll wrote:
The Quectel modems issues unsolicited strings in case of power related
events. The UC15 uses +QIND: for the events, while M95 and MC60 uses
descriptive strings. (UC15 also uses a string for normal power down).
Register listeners for these strings/codes. The handler emits an
appropriate dbus signal, and closes down the modem if needed.
---
doc/quectel-hardware-api.txt | 19 +++++
plugins/quectel.c | 148 ++++++++++++++++++++++++++++++++++-
2 files changed, 166 insertions(+), 1 deletion(-)
2 separate commits please per HACKING, 'Submitting Patches'
<snip>
diff --git a/plugins/quectel.c b/plugins/quectel.c
index 3c1d49cd..3c74fc41 100644
--- a/plugins/quectel.c
+++ b/plugins/quectel.c
@@ -108,8 +108,122 @@ struct dbus_hw {
gint voltage;
};
+enum quectel_power_event {
+ LOW_POWER_DOWN = -2,
+ LOW_WARNING = -1,
+ NORMAL_POWER_DOWN = 0,
+ HIGH_WARNING = 1,
+ HIGH_POWER_DOWN = 2,
+};
+
static const char dbus_hw_interface[] = OFONO_SERVICE ".quectel.Hardware";
+static void close_serial(struct ofono_modem *modem);
+
We generally frown upon forward declaration of statics...
Regards,
-Denis
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono