diff options
author | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2006-10-23 20:28:37 +0000 |
---|---|---|
committer | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2006-10-23 20:28:37 +0000 |
commit | cbffc8d64707828b045b679e8db0269ae362ffcf (patch) | |
tree | 9ba71c11b92600548581af9d582a2c1feb18473f /src/util/libgsmd-tool.c | |
parent | 7fe163099476937a14dd7a0714de542f7f94f665 (diff) |
more gsmd/libgsm implementation
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@114 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src/util/libgsmd-tool.c')
-rw-r--r-- | src/util/libgsmd-tool.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/util/libgsmd-tool.c b/src/util/libgsmd-tool.c index e8590c1..8d4674c 100644 --- a/src/util/libgsmd-tool.c +++ b/src/util/libgsmd-tool.c @@ -8,6 +8,9 @@ #include <libgsmd/libgsmd.h> +#include "pin.h" +#include "event.h" + #ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #endif @@ -44,6 +47,7 @@ static struct option opts[] = { { "version", 0, 0, 'V' }, { "verbose", 0, 0, 'v' }, { "mode", 1, 0, 'm' }, + { "pin", 1, 0, 'p' }, { 0, 0, 0, 0 } }; @@ -57,6 +61,7 @@ static void help(void) int main(int argc, char **argv) { + char *pin = NULL; int rc, i, mode; printf("libgsm-tool - (C) 2006 by Harald Welte\n" @@ -64,7 +69,7 @@ int main(int argc, char **argv) while (1) { int c, option_index = 0; - c = getopt_long(argc, argv, "vVhm:", opts, &option_index); + c = getopt_long(argc, argv, "vVhm:p:", opts, &option_index); if (c == -1) break; @@ -86,6 +91,9 @@ int main(int argc, char **argv) exit(2); } break; + case 'p': + pin = optarg; + break; } } @@ -95,6 +103,9 @@ int main(int argc, char **argv) exit(1); } + pin_init(lgsmh, pin); + event_init(lgsmh); + switch (mode) { case MODE_SHELL: shell_main(lgsmh); |