Line No. | Rev | Author | Line |
---|---|---|---|
1 | 6 | kaklik | /*! \file mitelgps.c \brief Mitel GPS STX/ETX driver function library. */ |
2 | //***************************************************************************** |
||
3 | // |
||
4 | // File Name : 'mitelgps.h' |
||
5 | // Title : Mitel GPS STX/ETX driver function library |
||
6 | // Author : Pascal Stang - Copyright (C) 2002 |
||
7 | // Created : 2003.04.11 |
||
8 | // Revised : 2003.06.08 |
||
9 | // Version : 0.1 |
||
10 | // Target MCU : Atmel AVR Series |
||
11 | // Editor Tabs : 4 |
||
12 | // |
||
13 | // NOTE: This code is currently below version 1.0, and therefore is considered |
||
14 | // to be lacking in some functionality or documentation, or may not be fully |
||
15 | // tested. Nonetheless, you can expect most functions to work. |
||
16 | // |
||
17 | // This code is distributed under the GNU Public License |
||
18 | // which can be found at http://www.gnu.org/licenses/gpl.txt |
||
19 | // |
||
20 | //***************************************************************************** |
||
21 | |||
22 | #ifndef MITELGPS_H |
||
23 | #define MITELGPS_H |
||
24 | |||
25 | #include "global.h" |
||
26 | |||
27 | // constants/macros/typdefs |
||
28 | // packet buffer size (must be able to contain biggest packet) |
||
29 | #define MITELGPS_BUFFERSIZE 0x0400 |
||
30 | |||
31 | // packet delimiters |
||
32 | #define STX 0x02 |
||
33 | #define ETX 0x03 |
||
34 | |||
35 | // report packet types |
||
36 | #define MITELTYPE_NAVDATAGND 0x00 |
||
37 | #define MITELTYPE_CHNLSTATGND 0x03 |
||
38 | #define MITELTYPE_NAVDATA 0x40 |
||
39 | #define MITELTYPE_RAWDATA 0x42 |
||
40 | #define MITELTYPE_CHNLSTAT 0x43 |
||
41 | #define MITELTYPE_RELNAVECEF 0x45 |
||
42 | #define MITELTYPE_RELNAVRTN 0x46 |
||
43 | |||
44 | // functions |
||
45 | void mitelgpsInit(void (*txbytefunc)(unsigned char c)); |
||
46 | void mitelgpsSendPacket(u08* data, u08 dataLength); |
||
47 | u08 mitelgpsProcess(cBuffer* rxBuffer); |
||
48 | |||
49 | // packet processing functions |
||
50 | void mitelgpsProcessNAVDATAGND(u08* packet); |
||
51 | void mitelgpsProcessCHNLSTATGND(u08* packet); |
||
52 | void mitelgpsProcessNAVDATA(u08* packet); |
||
53 | void mitelgpsProcessRAWDATA(u08* packet); |
||
54 | void mitelgpsProcessCHNLSTAT(u08* packet); |
||
55 | |||
56 | // data conversions (these functions should move somewhere else) |
||
57 | u32 convertAsciiHexToInt(u08* string, u08 numdigits); |
||
58 | void convertIntToAsciiHex(u32 num, u08* string, u08 numdigits); |
||
59 | |||
60 | |||
61 | |||
62 | #endif |
Powered by WebSVN v2.8.3