summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorerin_yueh <erin_yueh@99fdad57-331a-0410-800a-d7fa5415bdb3>2008-02-26 08:57:39 +0000
committererin_yueh <erin_yueh@99fdad57-331a-0410-800a-d7fa5415bdb3>2008-02-26 08:57:39 +0000
commit33b13190e1e8925100a7d577ce9ee72344eff987 (patch)
tree1a248b3ff2e901ad5165d849264aaad69d068cf8 /src/util
parent7d514fad9af90ea6c12e4bcab41176f5dd9de282 (diff)
gsmd: add vibrator at cmd (Sudharshan S)
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4115 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src/util')
-rw-r--r--src/util/shell.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/util/shell.c b/src/util/shell.c
index af6f795..85aa902 100644
--- a/src/util/shell.c
+++ b/src/util/shell.c
@@ -428,6 +428,18 @@ static int phone_msghandler(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh)
case GSMD_PHONE_GET_BATTERY:
printf("<BCS>: %d <BCL>: %d \n", bc->bcs, bc->bcl);
break;
+ case GSMD_PHONE_VIB_ENABLE:
+ if(*intresult)
+ printf("Vibrator enable failed: %i\n", *intresult);
+ else
+ printf("Vibrator enabled\n");
+ break;
+ case GSMD_PHONE_VIB_DISABLE:
+ if(*intresult)
+ printf("Vibrator disable failed: %i\n", *intresult);
+ else
+ printf("VIbrator disabled\n");
+ break;
default:
return -EINVAL;
}
@@ -534,7 +546,9 @@ static void shell_help(void)
"\tH\tHangup call\n"
"\tO\tAntenna Power On\n"
"\to\tAntenna Power Off\n"
- "\tM\tModem Power On\n"
+ "\tV\tVibrator Enable (CVIB=1)\n"
+ "\tv\tVibrator Disable (CVIB=0)\n"
+ "\tM\tModem Power On\n"
"\tm\tModem Power Off\n"
"\tr\tRegister to network\n"
"\tR\tRegister to given operator (R=number)\n"
@@ -666,6 +680,12 @@ int shell_main(struct lgsm_handle *lgsmh, int sync)
} else if (!strcmp(buf, "o")) {
printf("Power-Off\n");
lgsm_phone_power(lgsmh, 0);
+ } else if (!strcmp(buf, "V")) {
+ printf("Vibrator-Enable\n");
+ lgsm_phone_vibrator(lgsmh, 1);
+ } else if (!strcmp(buf, "v")) {
+ printf("Vibrator-Disable\n");
+ lgsm_phone_vibrator(lgsmh, 0);
} else if (!strcmp(buf, "r")) {
printf("Register\n");
lgsm_netreg_register(lgsmh, "\0 ");
personal git repositories of Harald Welte. Your mileage may vary