Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 1464 → Rev 1465

/NGVideo5_8/tags/V1.30/usart.h
0,0 → 1,46
 
/****************************************************************/
/* */
/* NG-Video 5,8GHz */
/* */
/* Copyright (C) 2011 - gebad */
/* */
/* This code is distributed under the GNU Public License */
/* which can be found at http://www.gnu.org/licenses/gpl.txt */
/* */
/****************************************************************/
 
#ifndef USART_H_
#define USART_H_
 
#define RXD_BUFFER_SIZE 150 // Puffergröße in Byte
#define TXD_BUFFER_SIZE 20
 
#define RX_TIMEOUT 420 // 210ms
#define RX_TIME_OLD 3 * RX_TIMEOUT // Grenze, Datensatz viel zu alt
#define RX_TIME_END 20* RX_TIMEOUT // Zählerbegrenzung und lipo speichern
 
//volatile unsigned char buffercounter;
 
char data_decode[RXD_BUFFER_SIZE];
volatile uint16_t rx_timeout;
 
void USART_Init(unsigned int baud);
void USART_send_Str(char *str);
uint8_t rx_line_decode(char rx_ID);
 
// tx_Mk addresses
#define ANY_ADDRESS 0
#define FC_ADDRESS 1
#define NC_ADDRESS 2
 
//void tx_Mk(unsigned char addr, char cmd, char *data, uint8_t len);
 
uint8_t wi232RX; // Statusflag für Empfangszeichen auf lcd
 
void USART_RX_Mode(uint8_t tracking);
uint8_t Get_Pololu_cmd(char *ptrOut, uint8_t ptrIn);
uint8_t decodeNMEA(void);
 
#endif /* USART_H_ */