comparison src/g23m-aci/aci/line_edit_intern.h @ 1:fa8dc04885d8

src/g23m-*: import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 16 Oct 2020 06:25:50 +0000
parents
children
comparison
equal deleted inserted replaced
0:4e78acac3d88 1:fa8dc04885d8
1 /*
2 +-----------------------------------------------------------------------------
3 | Project :
4 | Modul : line edit
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose : This modul ...
18 +-----------------------------------------------------------------------------
19 */
20
21 #ifndef LINE_EDIT_INTERN_H
22 #define LINE_EDIT_INTERN_H
23
24 #define WS 0x20
25 #define SLASH '/'
26
27 typedef struct S_LEDIT_ATCMD_M
28 {
29 T_LEDIT_ATCMD *cmd;
30 struct S_LEDIT_ATCMD_M *next;
31 } T_LEDIT_ATCMD_M;
32
33
34
35 typedef struct S_LEDIT_INTERN
36 {
37 UBYTE src_id;
38 USHORT len;
39 BOOL isStr; /* flag for start and end of "....." */
40 USHORT copyIter; /* copy iterator from src to cmd buffer */
41 USHORT srcBufIter; /* iterator over the srcBuffer */
42 USHORT srcBufIterE; /* from here all chars to echo */
43 const
44 UBYTE *srcBuffer;
45
46 char *lineBuffer; /* cmds without "AT" and removed WS,BS,... */
47 USHORT lineBufIter;
48
49 char *origBuffer; /* cmds without "AT", removed WS,BS,...
50 - NOT converted to upper case */
51 USHORT origBufIter;
52
53 char *execBuffer; /* the current command(s) as well as */
54 USHORT execBufIter; /* for AT/ the copy of the last cmd line */
55
56 char *smsBuffer; /* text of a SMS */
57 BOOL txtChunk; /* received a chunk of text only */
58 T_LEDIT_ATCMD_M *cmdm; /* */
59 UBYTE cmdIndex; /* */
60 UBYTE cmdGetIter; /* needed in ledit_get_next() */
61 T_LEDIT_RSLT (*state) (struct S_LEDIT_INTERN *atiInt); /* state machine function pointer */
62 T_LEDIT lineHabit; /* the behaviour of the line */
63 T_LEDIT_ERR err;
64 } T_LEDIT_INTERN;
65
66
67 typedef struct S_LEDIT_SRC_MAINTAIN
68 {
69 T_LEDIT_INTERN *leditInt;
70 struct S_LEDIT_SRC_MAINTAIN *next;
71 } T_LEDIT_SRC_MAINTAIN;
72
73
74 /* moved from line_edit.h to avoid multiple memory allocation in different modules */
75 static const T_LEDIT_ERR ledit_err[] =
76 {
77 {"out of memory", LEDIT_ERR_NoMemory},
78 {"no maintenance for src_id", LEDIT_ERR_NoMaintenance},
79 {"no valid command", LEDIT_ERR_NoValidCommand},
80 {"last cmd line is pending", LEDIT_ERR_LastCmdPending},
81 {"unkown error", LEDIT_ERR_Unknown}
82 };
83
84
85 #endif