From cbffc8d64707828b045b679e8db0269ae362ffcf Mon Sep 17 00:00:00 2001 From: laforge Date: Mon, 23 Oct 2006 20:28:37 +0000 Subject: more gsmd/libgsm implementation git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@114 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/util/libgsmd-tool.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/util/libgsmd-tool.c') 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 +#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); -- cgit v1.2.3