Subversion Repositories FlightCtrl

Rev

Rev 2402 | 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
 
1923 holgerb 4
//#define DEBUG                                                 // use to activate debug output to MK-Tool: use Debug(text);
1438 ingob 5
//#define ACT_S3D_SUMMENSIGNAL
2008 holgerb 6
//#define UserParameter8_FAILSAFE
1928 holgerb 7
//#define RECEIVER_SPEKTRUM_DX7EXP
8
//#define RECEIVER_SPEKTRUM_DX8EXP
1438 ingob 9
 
1 ingob 10
// neue Hardware
1662 killagreg 11
#define ROT_OFF   {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB &=~0x01; else  PORTB |= 0x01;}
12
#define ROT_ON    {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB |= 0x01; else  PORTB &=~0x01;}
1 ingob 13
#define ROT_FLASH PORTB ^= 0x01
2367 holgerb 14
#define GRN_OFF   {if((PlatinenVersion < 12) || PlatinenVersion == 25) PORTB &=~0x02; else PORTB |= 0x02;}
15
#define GRN_ON    {if((PlatinenVersion < 12) || PlatinenVersion == 25) PORTB |= 0x02; else PORTB &=~0x02;}
173 holgerb 16
#define GRN_FLASH PORTB ^= 0x02
1 ingob 17
 
1435 killagreg 18
#define SYSCLK F_CPU
19
 
1 ingob 20
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21
 
1155 hbuss 22
#define J3High    PORTD |= 0x20
23
#define J3Low     PORTD &= ~0x20
24
#define J4High    PORTD |= 0x10
25
#define J4Low     PORTD &= ~0x10
26
#define J5High    PORTD |= 0x08
27
#define J5Low     PORTD &= ~0x08
28
 
1 ingob 29
extern volatile unsigned char SenderOkay;
1236 killagreg 30
extern unsigned char BattLowVoltageWarning;
1 ingob 31
extern unsigned char CosinusNickWinkel, CosinusRollWinkel;
173 holgerb 32
extern unsigned char PlatinenVersion;
2029 holgerb 33
extern unsigned char FoundMotors,DisableRcOffBeeping;
1834 holgerb 34
extern unsigned char JetiBeep;
1268 hbuss 35
void LipoDetection(unsigned char print);
1512 holgerb 36
extern unsigned int FlugMinuten,FlugMinutenGesamt,FlugSekunden;
2030 holgerb 37
extern void PrintLine(void);  // "================================="
2333 holgerb 38
extern unsigned char ActiveParamSet;
2386 holgerb 39
extern unsigned int BL3_Current(unsigned char who); // in 0,1A
2402 holgerb 40
extern unsigned char LipoCells;
1 ingob 41
 
1930 holgerb 42
#include <avr/pgmspace.h>
43
 
44
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
45
 
46
#endif
47
 
1 ingob 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
 
57
#include "old_macros.h"
58
 
59
#include "printf_P.h"
60
#include "timer0.h"
61
#include "uart.h"
62
#include "analog.h"
63
#include "twimaster.h"
64
#include "menu.h"
65
#include "rc.h"
66
#include "fc.h"
67
#include "gps.h"
304 ingob 68
#include "spi.h"
921 hbuss 69
#include "led.h"
1424 ingob 70
#include "spektrum.h"
1486 killagreg 71
#include "capacity.h"
1622 killagreg 72
#include "eeprom.h"
1435 killagreg 73
#include "libfc.h"
1917 holgerb 74
#include "hottmenu.h"
1636 ingob 75
#include "debug.h"
2012 holgerb 76
#include "sbus.h"
2263 holgerb 77
#include "jeti_ex.h"
1 ingob 78
 
79
#endif //_MAIN_H
80
 
81
 
82
 
83
 
84
 
85