From 1584a74a4acdfb17aab0d6a2b13b18a7799aa37d Mon Sep 17 00:00:00 2001 From: laforge Date: Sat, 2 Sep 2006 10:32:06 +0000 Subject: first compiling (unfinished, not-working) version of userspace gsm infrastructure git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@40 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/gsmd/vendor_ti.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/gsmd/vendor_ti.c (limited to 'src/gsmd/vendor_ti.c') diff --git a/src/gsmd/vendor_ti.c b/src/gsmd/vendor_ti.c new file mode 100644 index 0000000..ac67b92 --- /dev/null +++ b/src/gsmd/vendor_ti.c @@ -0,0 +1,53 @@ +/* TI [Calypso] compatible backend */ + +#include +#include +#include +#include + +#include "vendorplugin.h" + +static int +ti_getopt(struct gsmd *gh, int optname, void *optval, int *optlen) +{ + switch (optname) { + case GSMD_OPT_CIPHER_IND: + /* FIXME: send AT%CPRI=? */ + break; + default: + return -EINVAL; + } +} + +static int +ti_setopt(struct gsmd *gh, int optname, const void *optval, int optlen) +{ + switch (optname) { + case GSMD_OPT_CIPHER_IND: + /* FIXME: send AT%CPRI= */ + break; + default: + return -EINVAL; + } +} + +static int ti_parseunsolicit(struct gsmd *gh) +{ + /* FIXME: parse all the below and generate the respective events */ + + /* %CPROAM: CPHS Home Country Roaming Indicator */ + /* %CPVWI: CPHS Voice Message Waiting */ + /* %CGREG: reports extended information about GPRS registration state */ + /* %CTZV: reports network time and date information */ + /* %CNIV: reports network name information */ + /* %CPKY: Press Key */ + /* %CMGRS: Message Retransmission Service */ + /* %CGEV: reports GPRS network events */ + return -EINVAL; +} + +struct gsmd_vendorspecific ti_vendorspec = { + .getopt = &ti_getopt, + .setopt = &ti_setopt, + .parse_unsolicit = &ti_parseunsolicit, +}; -- cgit v1.2.3