Subversion Repositories FlightCtrl

Rev

Rev 1645 | Rev 1955 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1612 dongfang 1
#ifndef _UART0_H
2
#define _UART0_H
3
 
4
#define RXD_BUFFER_LEN  150
5
// must be at least 4('#'+Addr+'CmdID'+'\r')+ (80 * 4)/3 = 111 bytes
6
#define TXD_BUFFER_LEN  150
7
#define RXD_BUFFER_LEN  150
8
 
9
#include <inttypes.h>
10
 
11
//Baud rate of the USART
12
#define USART0_BAUD 57600
13
 
1821 - 14
extern void usart0_Init(void);
1645 - 15
extern void usart0_TransmitTxData(void);
16
extern void usart0_ProcessRxData(void);
1612 dongfang 17
extern int16_t uart_putchar(int8_t c);
18
 
19
extern uint8_t RemotePollDisplayLine;
20
 
21
extern uint8_t motorTestActive;
22
extern uint8_t motorTest[16];
23
 
24
typedef struct {
1821 - 25
	uint8_t Digital[2];
26
	uint16_t Analog[32]; // Debugvalues
27
}__attribute__((packed)) DebugOut_t;
1612 dongfang 28
 
29
extern DebugOut_t DebugOut;
30
 
31
typedef struct {
1821 - 32
	int16_t AngleNick; // in 0.1 deg
33
	int16_t AngleRoll; // in 0.1 deg
34
	int16_t Heading; // in 0.1 deg
35
	uint8_t reserve[8];
36
}__attribute__((packed)) Data3D_t;
1612 dongfang 37
 
38
typedef struct {
1821 - 39
	uint8_t SWMajor;
40
	uint8_t SWMinor;
41
	uint8_t ProtoMajor;
42
	uint8_t ProtoMinor;
43
	uint8_t SWPatch;
44
	uint8_t Reserved[5];
45
}__attribute__((packed)) UART_VersionInfo_t;
1612 dongfang 46
 
47
#endif //_UART0_H