Subversion Repositories FlightCtrl

Rev

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

Rev Author Line No. Line
886 killagreg 1
#ifndef _UART_H
2
#define _UART_H
1 ingob 3
 
886 killagreg 4
#define TXD_BUFFER_LEN  150
5
#define RXD_BUFFER_LEN  150
6
 
492 hbuss 7
#define DUB_KEY_UP     4
8
#define DUB_KEY_DOWN   8
886 killagreg 9
#define DUB_KEY_LEFT   16
492 hbuss 10
#define DUB_KEY_RIGHT  32
11
#define DUB_KEY_FIRE   64
1 ingob 12
 
886 killagreg 13
#include <inttypes.h>
304 ingob 14
 
886 killagreg 15
//Baud rate of the USART
16
#define USART0_BAUD 57600
1 ingob 17
 
18
 
886 killagreg 19
extern void USART0_Init (void);
20
extern void USART0_TransmitTxData(void);
21
extern void USART0_ProcessRxData(void);
22
extern int16_t uart_putchar(int8_t c);
693 hbuss 23
 
886 killagreg 24
extern uint8_t PcAccess;
25
extern uint8_t RemotePollDisplayLine;
26
extern uint8_t MotorTest[4];
27
extern uint8_t DubWiseKeys[4];
1 ingob 28
 
886 killagreg 29
typedef struct
1 ingob 30
{
886 killagreg 31
 uint8_t Digital[2];
32
 uint16_t Analog[32];    // Debugvalues
33
} DebugOut_t;
1 ingob 34
 
886 killagreg 35
extern DebugOut_t DebugOut;
1 ingob 36
 
886 killagreg 37
typedef struct
38
{
39
 uint8_t        Digital[2];
40
 uint8_t        RemoteButtons;
911 killagreg 41
 int8_t         Nick;
886 killagreg 42
 int8_t         Roll;
43
 int8_t         Yaw;
911 killagreg 44
 uint8_t        Gas;
886 killagreg 45
 int8_t         Height;
46
 uint8_t        free;
47
 uint8_t        Frame;
48
 uint8_t        Config;
49
} ExternControl_t;
1 ingob 50
 
886 killagreg 51
extern ExternControl_t ExternControl;
1 ingob 52
 
886 killagreg 53
typedef struct
54
{
55
  uint8_t Major;
56
  uint8_t Minor;
57
  uint8_t PCCompatible;
936 killagreg 58
  uint8_t Hardware;
59
  uint8_t Reserved[6];
886 killagreg 60
}  VersionInfo_t;
1 ingob 61
 
886 killagreg 62
extern  VersionInfo_t VersionInfo;
1 ingob 63
 
64
#endif //_UART_H