Subversion Repositories FlightCtrl

Rev

Rev 1799 | Details | Compare with Previous | Last modification | View Log | RSS feed

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