7 A Linux/Unix toolset and driver for Nokia mobile phones.
9 Copyright (C) 2000 Hugh Blemings & Pavel JanÃk ml.
11 Released under the terms of the GNU GPL, see file COPYING for more details.
13 This file provides an API for accessing functions via fbus.
14 See README for more details on supported mobile phones.
16 The various routines are called FB3110_(whatever).
19 Revision 1.1.1.1 2001/11/25 21:59:22 short
20 :pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Sun Nov 25 22:56 CET 2001
22 Revision 1.1 2001/11/09 12:55:07 pkot
23 Forgot about fbus support for 3110. FIXME: is it really needed?
28 #ifndef __links_fbus_3110_h
29 #define __links_fbus_3110_h
32 #include "gsm-statemachine.h"
35 #include <sys/types.h>
36 #include <sys/timeb.h>
39 #define FB3110_MAX_FRAME_LENGTH 256
40 #define FB3110_MAX_MESSAGE_TYPES 128
41 #define FB3110_MAX_TRANSMIT_LENGTH 256
42 #define FB3110_MAX_CONTENT_LENGTH 120
44 /* This byte is at the beginning of all GSM Frames sent over FBUS to Nokia
45 phones. This may have to become a phone dependant parameter... */
46 #define FB3110_FRAME_ID 0x01
49 /* States for receive code. */
51 enum FB3110_RX_States {
62 enum FB3110_RX_States State;
65 char Buffer[FB3110_MAX_FRAME_LENGTH];
66 } FB3110_IncomingFrame;
72 } FB3110_OutgoingMessage;
76 FB3110_IncomingFrame i;
77 u8 RequestSequenceNumber;
80 GSM_Error FB3110_Initialise(GSM_Link *newlink, GSM_Statemachine *state);
84 #ifdef __links_fbus_3110_c /* Prototype functions for fbus-generic.c only */
86 bool FB3110_OpenSerial(void);
87 void FB3110_RX_StateMachine(unsigned char rx_byte);
88 GSM_Error FB3110_TX_SendFrame(u8 message_length, u8 message_type, u8 sequence_byte, u8 *buffer);
89 GSM_Error FB3110_SendMessage(u16 messagesize, u8 messagetype, void *message);
90 void FB3110_TX_SendAck(u8 *message, int length);
91 void FB3110_UpdateSequenceNumber(void);
93 #endif /* #ifdef __links_fbus_3110_c */
95 #endif /* #ifndef __links_fbus_3110_h */