changeset 85:6f8d3771aa6c

loadtools for GTA0x AP: GTA02 modem power-off implemented
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Tue, 20 Aug 2013 05:14:45 +0000
parents ccc5161848c7
children 2f12c31fcc9c
files loadtools/ltexit.c loadtools/scripts/gta02.config
diffstat 2 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/loadtools/ltexit.c	Tue Aug 20 04:51:15 2013 +0000
+++ b/loadtools/ltexit.c	Tue Aug 20 05:14:45 2013 +0000
@@ -15,6 +15,15 @@
 }
 
 static void
+exit_gta02_cutpwr()
+{
+#ifdef GTA0x_AP_BUILD
+	set_gta_modem_power_ctrl(0);
+#endif
+	exit(0);
+}
+
+static void
 exit_jump0()
 {
 	static char *jump0_argv[3] = {"jump", "0", 0};
@@ -31,6 +40,7 @@
 	void (*func)();
 } exit_modes[] = {
 	{"bare", exit_bare},
+	{"gta02-cutpwr", exit_gta02_cutpwr},
 	{"jump0", exit_jump0},
 	{0, 0}
 };
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loadtools/scripts/gta02.config	Tue Aug 20 05:14:45 2013 +0000
@@ -0,0 +1,6 @@
+# If one is running fc-loadtool from inside the GTA02 (i.e., from the AP,
+# as opposed to an external host connected via the headset jack), the
+# following setting will cause the fc-loadtool utility to power the modem off
+# fully upon exit.
+
+exit-mode gta02-cutpwr