Subversion Repositories FlightCtrl

Rev

Rev 2427 | Rev 2492 | Go to most recent revision | 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
 
2427 holgerb 4
//#define REDUNDANT_FC_SLAVE
5
//#define REDUNDANT_FC_MASTER
2418 holgerb 6
 
1923 holgerb 7
//#define DEBUG                                                 // use to activate debug output to MK-Tool: use Debug(text);
1438 ingob 8
//#define ACT_S3D_SUMMENSIGNAL
2008 holgerb 9
//#define UserParameter8_FAILSAFE
1928 holgerb 10
//#define RECEIVER_SPEKTRUM_DX7EXP
11
//#define RECEIVER_SPEKTRUM_DX8EXP
1438 ingob 12
 
1 ingob 13
// neue Hardware
2426 holgerb 14
//#define ROT_OFF   {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB &=~0x01; else  PORTB |= 0x01;}
15
//#define ROT_ON    {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB |= 0x01; else  PORTB &=~0x01;}
16
 
17
#define ROT_OFF   {PORTB &=~0x01;}
18
#define ROT_ON    {PORTB |= 0x01;}
19
 
1 ingob 20
#define ROT_FLASH PORTB ^= 0x01
2426 holgerb 21
//#define GRN_OFF   {if((PlatinenVersion < 12) || PlatinenVersion == 25) PORTB &=~0x02; else PORTB |= 0x02;}
22
//#define GRN_ON    {if((PlatinenVersion < 12) || PlatinenVersion == 25) PORTB |= 0x02; else PORTB &=~0x02;}
23
#define GRN_OFF   {if(PlatinenVersion == 25) PORTB &=~0x02; else PORTB |= 0x02;}
24
#define GRN_ON    {if(PlatinenVersion == 25) 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;
2416 holgerb 40
extern unsigned char BattAutoLandingVoltage, BattComingHomeVoltage;
1 ingob 41
extern unsigned char CosinusNickWinkel, CosinusRollWinkel;
173 holgerb 42
extern unsigned char PlatinenVersion;
2029 holgerb 43
extern unsigned char FoundMotors,DisableRcOffBeeping;
1834 holgerb 44
extern unsigned char JetiBeep;
1268 hbuss 45
void LipoDetection(unsigned char print);
1512 holgerb 46
extern unsigned int FlugMinuten,FlugMinutenGesamt,FlugSekunden;
2030 holgerb 47
extern void PrintLine(void);  // "================================="
2333 holgerb 48
extern unsigned char ActiveParamSet;
2386 holgerb 49
extern unsigned int BL3_Current(unsigned char who); // in 0,1A
2402 holgerb 50
extern unsigned char LipoCells;
1 ingob 51
 
1930 holgerb 52
#include <avr/pgmspace.h>
53
 
54
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
55
 
56
#endif
57
 
1 ingob 58
#include <stdlib.h>
59
#include <string.h>
60
#include <avr/io.h>
61
#include <avr/pgmspace.h>
62
#include <avr/interrupt.h>
63
#include <avr/eeprom.h>
64
#include <avr/boot.h>
65
#include <avr/wdt.h>
66
 
67
#include "old_macros.h"
68
 
69
#include "printf_P.h"
70
#include "timer0.h"
71
#include "uart.h"
72
#include "analog.h"
73
#include "twimaster.h"
74
#include "menu.h"
75
#include "rc.h"
76
#include "fc.h"
77
#include "gps.h"
304 ingob 78
#include "spi.h"
921 hbuss 79
#include "led.h"
1424 ingob 80
#include "spektrum.h"
1486 killagreg 81
#include "capacity.h"
1622 killagreg 82
#include "eeprom.h"
1435 killagreg 83
#include "libfc.h"
1917 holgerb 84
#include "hottmenu.h"
1636 ingob 85
#include "debug.h"
2012 holgerb 86
#include "sbus.h"
2263 holgerb 87
#include "jeti_ex.h"
1 ingob 88
 
89
#endif //_MAIN_H
90
 
91
 
92
 
93
 
94
 
95