Diffstat (limited to 'gammu/emb/common/protocol/nokia/fbus2.c') (more/less context) (show whitespace changes)
-rw-r--r-- | gammu/emb/common/protocol/nokia/fbus2.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gammu/emb/common/protocol/nokia/fbus2.c b/gammu/emb/common/protocol/nokia/fbus2.c index 8b3e024..2b41f8b 100644 --- a/gammu/emb/common/protocol/nokia/fbus2.c +++ b/gammu/emb/common/protocol/nokia/fbus2.c | |||
@@ -1,26 +1,30 @@ | |||
1 | /* (c) 2002-2003 by Marcin Wiacek */ | 1 | /* (c) 2002-2003 by Marcin Wiacek */ |
2 | /* based on some work from Gnokii and MyGnokii */ | 2 | /* based on some work from MyGnokii (www.mwiacek.com) */ |
3 | /* Based on some work from Gnokii (www.gnokii.org) | ||
4 | * (C) 1999-2000 Hugh Blemings & Pavel Janik ml. (C) 2001-2004 Pawel Kot | ||
5 | * GNU GPL version 2 or later | ||
6 | */ | ||
3 | 7 | ||
4 | #include "../../gsmstate.h" | 8 | #include "../../gsmstate.h" |
5 | 9 | ||
6 | #if defined(GSM_ENABLE_FBUS2) || defined(GSM_ENABLE_FBUS2IRDA) || defined(GSM_ENABLE_FBUS2DLR3) || defined(GSM_ENABLE_FBUS2BLUE) || defined(GSM_ENABLE_BLUEFBUS2) || defined(GSM_ENABLE_FBUS2DKU5) || defined(GSM_ENABLE_FBUS2PL2303) | 10 | #if defined(GSM_ENABLE_FBUS2) || defined(GSM_ENABLE_FBUS2IRDA) || defined(GSM_ENABLE_FBUS2DLR3) || defined(GSM_ENABLE_FBUS2BLUE) || defined(GSM_ENABLE_BLUEFBUS2) || defined(GSM_ENABLE_FBUS2DKU5) || defined(GSM_ENABLE_FBUS2PL2303) |
7 | 11 | ||
8 | #include <stdio.h> | 12 | #include <stdio.h> |
9 | #include <string.h> | 13 | #include <string.h> |
10 | 14 | ||
11 | #include "../../gsmcomon.h" | 15 | #include "../../gsmcomon.h" |
12 | #include "fbus2.h" | 16 | #include "fbus2.h" |
13 | 17 | ||
14 | static GSM_Error FBUS2_WriteFrame(GSM_StateMachine *s, | 18 | static GSM_Error FBUS2_WriteFrame(GSM_StateMachine *s, |
15 | unsigned char *MsgBuffer, | 19 | unsigned char *MsgBuffer, |
16 | int MsgLength, | 20 | int MsgLength, |
17 | unsigned char MsgType) | 21 | unsigned char MsgType) |
18 | { | 22 | { |
19 | unsigned char buffer2[FBUS2_MAX_TRANSMIT_LENGTH + 10]; | 23 | unsigned char buffer2[FBUS2_MAX_TRANSMIT_LENGTH + 10]; |
20 | unsigned char checksum=0; | 24 | unsigned char checksum=0; |
21 | int i, len, sent; | 25 | int i, len, sent; |
22 | 26 | ||
23 | buffer2[0] = FBUS2_FRAME_ID; | 27 | buffer2[0] = FBUS2_FRAME_ID; |
24 | if (s->ConnectionType==GCT_FBUS2IRDA) buffer2[0] = FBUS2_IRDA_FRAME_ID; | 28 | if (s->ConnectionType==GCT_FBUS2IRDA) buffer2[0] = FBUS2_IRDA_FRAME_ID; |
25 | 29 | ||
26 | buffer2[1] = FBUS2_DEVICE_PHONE; //destination | 30 | buffer2[1] = FBUS2_DEVICE_PHONE; //destination |