summaryrefslogtreecommitdiff
path: root/include/gsmd/gsmd.h
diff options
context:
space:
mode:
authortick <tick@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-11-16 08:55:01 +0000
committertick <tick@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-11-16 08:55:01 +0000
commit5e9fde8743d4d3d733303bef99e20000c0769148 (patch)
tree2f094302f9bbdc74a5e599c509215fa4c82aa7c0 /include/gsmd/gsmd.h
parentcd687c0c2f3e9a77d344d8806d0072cc8fb8084a (diff)
[gsmd] Adding timeout scheme, and merge gta01 wakeup scheme as machine plug-in with timeout. (L. Sean)
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3430 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'include/gsmd/gsmd.h')
-rw-r--r--include/gsmd/gsmd.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h
index c511fc3..5b2a9e6 100644
--- a/include/gsmd/gsmd.h
+++ b/include/gsmd/gsmd.h
@@ -19,6 +19,7 @@ void *gsmd_tallocs;
#define LGSM_ATCMD_F_PARAM 0x02 /* as opposed to action */
#define LGSM_ATCMD_F_LFCR 0x04 /* accept LFCR as a line terminator */
+typedef struct gsmd_timer * (create_timer_t)(struct gsmd *data);
struct gsmd_atcmd {
struct llist_head list;
void *ctx;
@@ -28,6 +29,8 @@ struct gsmd_atcmd {
u_int32_t buflen;
u_int16_t id;
u_int8_t flags;
+ struct gsmd_timer *timeout;
+ create_timer_t * create_timer_func;
char *cur;
char buf[];
};
@@ -67,7 +70,7 @@ struct gsmd;
#define GSMD_FLAG_V0 0x0001 /* V0 responses to be expected from TA */
#define GSMD_FLAG_SMS_FMT_TEXT 0x0002 /* TODO Use TEXT rather than PDU mode */
-#define GSMD_MODEM_WAKEUP_TIMEOUT 3
+#define GSMD_ATCMD_TIMEOUT 60 /* If doesn get respond within 60 secs, discard */
struct gsmd {
unsigned int flags;
@@ -86,7 +89,7 @@ struct gsmd {
unsigned char *mlbuf; /* ml_parse buffer */
unsigned int mlbuf_len;
int mlunsolicited;
- struct gsmd_timer *wakeup_timer;
+ int alive_responded;
};
struct gsmd_user {
personal git repositories of Harald Welte. Your mileage may vary