Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
231 killagreg 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
 
14
 
15
extern void USART0_Init (void);
16
extern void USART0_TransmitTxData(void);
17
extern void USART0_ProcessRxData(void);
18
extern int16_t uart_putchar(int8_t c);
19
 
20
extern uint8_t PcAccess;
21
extern uint8_t RemotePollDisplayLine;
22
 
23
typedef struct
24
{
25
        uint8_t Digital[2];
26
        uint8_t RemoteButtons;
27
        int8_t  Nick;
28
        int8_t  Roll;
29
        int8_t  Yaw;
30
        uint8_t Gas;
31
        int8_t  Height;
32
        uint8_t free;
33
        uint8_t Frame;
34
        uint8_t Config;
35
} __attribute__((packed)) ExternControl_t;
36
 
37
extern ExternControl_t ExternControl;
38
 
39
 
40
typedef struct
41
{
42
        uint8_t Digital[2];
43
        uint16_t Analog[32];    // Debugvalues
44
} __attribute__((packed)) DebugOut_t;
45
 
46
extern DebugOut_t DebugOut;
47
 
48
typedef struct
49
{
50
        uint8_t SWMajor;
51
        uint8_t SWMinor;
52
        uint8_t ProtoMajor;
53
        uint8_t ProtoMinor;
54
        uint8_t SWPatch;
55
        uint8_t Reserved[5];
56
}  __attribute__((packed)) UART_VersionInfo_t;
57
 
58
 
59
#endif //_UART0_H