Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1687 | - | 1 | |
2 | /****************************************************************/ |
||
3 | /* */ |
||
4 | /* NG-Video 5,8GHz */ |
||
5 | /* */ |
||
6 | /* Copyright (C) 2011 - gebad */ |
||
7 | /* */ |
||
8 | /* This code is distributed under the GNU Public License */ |
||
9 | /* which can be found at http://www.gnu.org/licenses/gpl.txt */ |
||
10 | /* */ |
||
11 | /****************************************************************/ |
||
12 | |||
13 | #ifndef USART_H_ |
||
14 | #define USART_H_ |
||
15 | |||
16 | #define RXD_BUFFER_SIZE 150 // Puffergröße in Byte |
||
17 | #define TXD_BUFFER_SIZE 20 |
||
18 | |||
19 | #define RX_TIMEOUT 420 // 210ms |
||
20 | #define RX_TIME_OLD 3 * RX_TIMEOUT // Grenze, Datensatz viel zu alt |
||
21 | #define RX_TIME_END 20* RX_TIMEOUT // Zählerbegrenzung und lipo speichern |
||
22 | |||
23 | //volatile unsigned char buffercounter; |
||
24 | |||
25 | char data_decode[RXD_BUFFER_SIZE]; |
||
26 | volatile uint16_t rx_timeout; |
||
27 | |||
28 | void USART_Init(unsigned int baud); |
||
29 | void USART_send_Str(char *str); |
||
30 | char rx_line_decode(void); |
||
31 | |||
32 | // tx_Mk addresses |
||
33 | #define ANY_ADDRESS 0 |
||
34 | #define FC_ADDRESS 1 |
||
35 | #define NC_ADDRESS 2 |
||
36 | |||
37 | #define ID_LIST {'O'} |
||
38 | |||
39 | //void tx_Mk(unsigned char addr, char cmd, char *data, uint8_t len); |
||
40 | |||
41 | uint8_t wi232RX; // Statusflag für Empfangszeichen auf lcd |
||
42 | |||
43 | void USART_RX_Mode(uint8_t tracking); |
||
44 | uint8_t Get_Pololu_cmd(char *ptrOut, uint8_t ptrIn); |
||
45 | uint8_t decodeNMEA(void); |
||
46 | |||
47 | #endif /* USART_H_ */ |
||
48 |