Subversion Repositories FlightCtrl

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2751 - 1
#ifndef _MAIN_H
2
#define _MAIN_H
3
 
4
//#define DEBUG                                                 // use to activate debug output to MK-Tool: use Debug(text);
5
//#define ACT_S3D_SUMMENSIGNAL
6
//#define SWITCH_LEARNS_CAREFREE
7
//#define RECEIVER_SPEKTRUM_EXP 
8
 
9
// neue Hardware
10
#define ROT_OFF   {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB &=~0x01; else  PORTB |= 0x01;}
11
#define ROT_ON    {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB |= 0x01; else  PORTB &=~0x01;}
12
#define ROT_FLASH PORTB ^= 0x01
13
#define GRN_OFF   {if((PlatinenVersion < 12)) PORTB &=~0x02; else PORTB |= 0x02;}
14
#define GRN_ON    {if((PlatinenVersion < 12)) PORTB |= 0x02; else PORTB &=~0x02;}
15
#define GRN_FLASH PORTB ^= 0x02
16
 
17
#define SYSCLK F_CPU
18
 
19
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
20
 
21
#define J3High    PORTD |= 0x20
22
#define J3Low     PORTD &= ~0x20
23
#define J4High    PORTD |= 0x10
24
#define J4Low     PORTD &= ~0x10
25
#define J5High    PORTD |= 0x08
26
#define J5Low     PORTD &= ~0x08
27
 
28
extern volatile unsigned char SenderOkay;
29
extern unsigned char BattLowVoltageWarning;
30
extern unsigned char CosinusNickWinkel, CosinusRollWinkel;
31
extern unsigned char PlatinenVersion;
32
extern unsigned char SendVersionToNavi;
33
extern unsigned char FoundMotors;
34
extern unsigned char JetiBeep;
35
void LipoDetection(unsigned char print);
36
extern unsigned int FlugMinuten,FlugMinutenGesamt,FlugSekunden;
37
 
38
#include <stdlib.h>
39
#include <string.h>
40
#include <avr/io.h>
41
#include <avr/pgmspace.h>
42
#include <avr/interrupt.h>
43
#include <avr/eeprom.h>
44
#include <avr/boot.h>
45
#include <avr/wdt.h>
46
 
47
 
48
#include "old_macros.h"
49
 
50
#include "printf_P.h"
51
#include "timer0.h"
52
#include "uart.h"
53
#include "analog.h"
54
#include "twimaster.h"
55
#include "menu.h"
56
#include "rc.h"
57
#include "fc.h"
58
#include "gps.h"
59
#include "spi.h"
60
#include "led.h"
61
#include "spektrum.h"
62
#include "capacity.h"
63
#include "eeprom.h"
64
#include "libfc.h"
65
#include "debug.h"
66
 
67
 
68
 
69
#endif //_MAIN_H
70
 
71
 
72
 
73
 
74
 
75