Subversion Repositories FlightCtrl

Rev

Go to most recent revision | Details | 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
 
1682 holgerb 4
 
1636 ingob 5
//#define DEBUG                                                 // use to activate debug output to MK-Tool: use Debug(text);
6
 
1438 ingob 7
//#define ACT_S3D_SUMMENSIGNAL
1682 holgerb 8
//#define SWITCH_LEARNS_CAREFREE
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
1058 killagreg 14
#define GRN_OFF   {if((PlatinenVersion < 12)) PORTB &=~0x02; else PORTB |= 0x02;}
15
#define GRN_ON    {if((PlatinenVersion < 12)) 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;
723 hbuss 33
extern unsigned char SendVersionToNavi;
1622 killagreg 34
 
35
 
1268 hbuss 36
void LipoDetection(unsigned char print);
1512 holgerb 37
extern unsigned int FlugMinuten,FlugMinutenGesamt,FlugSekunden;
1 ingob 38
 
39
#include <stdlib.h>
40
#include <string.h>
41
#include <avr/io.h>
42
#include <avr/pgmspace.h>
43
#include <avr/interrupt.h>
44
#include <avr/eeprom.h>
45
#include <avr/boot.h>
46
#include <avr/wdt.h>
47
 
1438 ingob 48
 
1 ingob 49
#include "old_macros.h"
50
 
395 hbuss 51
#include "_Settings.h"
1 ingob 52
#include "printf_P.h"
53
#include "timer0.h"
54
#include "uart.h"
55
#include "analog.h"
56
#include "twimaster.h"
57
#include "menu.h"
58
#include "rc.h"
59
#include "fc.h"
60
#include "gps.h"
304 ingob 61
#include "spi.h"
921 hbuss 62
#include "led.h"
1424 ingob 63
#include "spektrum.h"
1486 killagreg 64
#include "capacity.h"
1622 killagreg 65
#include "eeprom.h"
1435 killagreg 66
#include "libfc.h"
1636 ingob 67
#include "debug.h"
1 ingob 68
 
1419 ingob 69
 
1438 ingob 70
 
1 ingob 71
#endif //_MAIN_H
72
 
73
 
74
 
75
 
76
 
77