Subversion Repositories FlightCtrl

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
683 killagreg 1
#ifndef _UART_H
2
#define _UART_H
1 ingob 3
 
683 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
706 killagreg 9
#define DUB_KEY_LEFT   16
492 hbuss 10
#define DUB_KEY_RIGHT  32
11
#define DUB_KEY_FIRE   64
1 ingob 12
 
685 killagreg 13
#include <inttypes.h>
14
 
304 ingob 15
void BearbeiteRxDaten(void);
16
 
1 ingob 17
extern unsigned char DebugGetAnforderung;
683 killagreg 18
 
19
//Baud rate of the USART
20
#define USART0_BAUD 57600
21
 
22
 
23
extern void USART0_Init (void);
24
 
25
extern unsigned volatile char txd_buffer[TXD_BUFFER_LEN];
26
extern unsigned volatile char rxd_buffer[RXD_BUFFER_LEN];
27
 
1 ingob 28
extern unsigned volatile char UebertragungAbgeschlossen;
29
extern unsigned volatile char PC_DebugTimeout;
30
extern unsigned volatile char NeueKoordinateEmpfangen;
31
extern unsigned char MeineSlaveAdresse;
706 killagreg 32
extern unsigned char PcAccess;
499 hbuss 33
extern unsigned char RemotePollDisplayLine;
1 ingob 34
extern int Debug_Timer;
683 killagreg 35
 
36
extern int16_t uart_putchar (int8_t c);
1 ingob 37
extern void boot_program_page (uint32_t page, uint8_t *buf);
38
extern void DatenUebertragung(void);
683 killagreg 39
 
395 hbuss 40
extern void BearbeiteRxDaten(void);
1 ingob 41
extern unsigned char MotorTest[4];
683 killagreg 42
extern unsigned char DubWiseKeys[4];
1 ingob 43
struct str_DebugOut
44
{
722 killagreg 45
 uint8_t Digital[2];
46
 uint16_t Analog[32];    // Debugwerte
1 ingob 47
};
48
 
49
extern struct str_DebugOut    DebugOut;
50
 
595 hbuss 51
struct str_ExternControl
1 ingob 52
{
701 killagreg 53
 uint8_t        Digital[2];
54
 uint8_t        RemoteButtons;
55
 int8_t         Pitch;
56
 int8_t         Roll;
57
 int8_t         Yaw;
707 killagreg 58
 uint8_t        Thrust;
701 killagreg 59
 int8_t         Hight;
60
 uint8_t        free;
61
 uint8_t        Frame;
62
 uint8_t        Config;
683 killagreg 63
};
595 hbuss 64
extern struct str_ExternControl   ExternControl;
1 ingob 65
 
66
struct str_VersionInfo
67
{
68
  unsigned char Hauptversion;
69
  unsigned char Nebenversion;
70
  unsigned char PCKompatibel;
683 killagreg 71
  unsigned char Rserved[7];
72
};
1 ingob 73
extern struct str_VersionInfo VersionInfo;
74
 
75
 
76
#endif //_UART_H