Subversion Repositories Projects

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1465 - 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
uint8_t rx_line_decode(char rx_ID);
31
 
32
// tx_Mk addresses
33
#define ANY_ADDRESS                             0
34
#define FC_ADDRESS                              1
35
#define NC_ADDRESS                              2
36
 
37
//void tx_Mk(unsigned char addr, char cmd, char *data, uint8_t len);
38
 
39
uint8_t wi232RX; // Statusflag für Empfangszeichen auf lcd
40
 
41
void USART_RX_Mode(uint8_t tracking);
42
uint8_t Get_Pololu_cmd(char *ptrOut, uint8_t ptrIn);
43
uint8_t decodeNMEA(void);
44
 
45
#endif /* USART_H_ */
46