7 A Linux/Unix toolset and driver for Nokia mobile phones.
9 Copyright (C) 1999, 2000 Hugh Blemings & Pavel JanÃk ml.
11 Released under the terms of the GNU GPL, see file COPYING for more details.
13 Header file for AT emulator code.
16 Revision 1.1.1.1 2001/11/25 21:59:21 short
17 :pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Sun Nov 25 22:56 CET 2001
19 Revision 1.2 2001/07/03 15:27:24 pkot
20 AT commands for SMS handling support (Tamas Bondar)
21 Small at-emulator code cleanup (me)
23 Revision 1.1 2001/02/21 19:57:11 chris
24 More fiddling with the directory layout
29 #ifndef __data_at_emulator_h
30 #define __data_at_emulator_h
33 bool ATEM_Initialise(int read_fd, int write_fd, char *model, char *port);
34 void ATEM_HandleIncomingData(char *buffer, int length);
35 void ATEM_InitRegisters(void);
36 void ATEM_StringOut(char *buffer);
37 void ATEM_ParseAT(char *cmd_buffer);
38 void ATEM_ParseSMS(char *cmd_buffer);
39 void ATEM_ParseDIR(char *cmd_buffer);
40 bool ATEM_CommandPlusC(char **buf);
41 bool ATEM_CommandPlusG(char **buf);
42 int ATEM_GetNum(char **p);
43 void ATEM_ModemResult(int code);
44 void ATEM_CallPassup(char c);
46 /* Global variables */
47 bool ATEM_Initialised;
49 /* Definition of modem result codes - these are returned to "terminal"
50 numerically or as a string depending on the setting of S12 */
52 /* FIX ME - Numeric values for everything except OK and ERROR
53 are guesses as I've not got an AT reference handy. HAB */
57 #define MR_NOCARRIER (5)
58 #define MR_CARRIER (2)
59 #define MR_CONNECT (3)
62 /* All defines and prototypes from here down are specific to
63 the at-emulator code and so are #ifdef out if __at_emulator_c isn't
65 #ifdef __data_at_emulator_c
68 #define MAX_CMD_BUFFERS (2)
69 #define CMD_BUFFER_LENGTH (100)
71 /* Definition of some special Registers of AT-Emulator, pinched in
72 part from ISDN driver in Linux kernel */
83 #define REG_RESPNUM 12
99 #define MAX_MODEM_REGISTERS 20
101 /* Message format definitions */
104 #define INTERACT_MODE 2
106 #endif /* __data_at_emulator_c */
108 #endif /* __data_at_emulator_h */