r3393 - trunk/src/target/gsm/src/util
tick at sita.openmoko.org
tick at sita.openmoko.org
Mon Nov 12 10:41:57 CET 2007
Author: tick
Date: 2007-11-12 10:41:54 +0100 (Mon, 12 Nov 2007)
New Revision: 3393
Modified:
trunk/src/target/gsm/src/util/shell.c
Log:
gsmd: adding sleep mode into libgsmd-tool shell mode(Tick)
Modified: trunk/src/target/gsm/src/util/shell.c
===================================================================
--- trunk/src/target/gsm/src/util/shell.c 2007-11-12 09:41:03 UTC (rev 3392)
+++ trunk/src/target/gsm/src/util/shell.c 2007-11-12 09:41:54 UTC (rev 3393)
@@ -346,6 +346,7 @@
"\tP\tPrint current operator\n"
"\tL\tDetect available operators\n"
"\tQ\tRead signal quality\n"
+ "\tS\tSleep (S[=second], default 5)\n"
"\tT\tSend DTMF Tone\n"
"\tn\tPrint subscriber numbers\n"
"\tpd\tPB Delete (pb=index)\n"
@@ -473,6 +474,14 @@
lgsm_signal_quality(lgsmh);
} else if (!strcmp(buf, "q")) {
exit(0);
+ } else if (buf[0] == 'S' ) {
+ if(!strchr(buf,'=') || atoi((strchr(buf,'=')+1)) < 0) {
+ printf("Sleep 5 secs\n");
+ sleep(5);
+ }else {
+ printf("Sleep %d secs\n",atoi(strchr(buf,'=')+1));
+ sleep(atoi(strchr(buf,'=')+1));
+ }
} else if (buf[0] == 'T') {
if (strlen(buf) < 2)
continue;
More information about the commitlog
mailing list