Subversion Repositories FlightCtrl

Rev

Rev 1424 | Rev 1438 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1424 Rev 1435
Line 1... Line 1...
1
#ifndef _MAIN_H
1
#ifndef _MAIN_H
2
 #define _MAIN_H
2
 #define _MAIN_H
Line 3... Line 3...
3
 
3
 
Line 4... Line -...
4
#define QUADRO
-
 
5
 
-
 
6
//Hier die Quarz Frequenz einstellen
-
 
7
#if defined (__AVR_ATmega32__)
-
 
8
#define SYSCLK  20000000L       //Quarz Frequenz in Hz
-
 
9
#endif
-
 
10
 
-
 
11
#if defined (__AVR_ATmega644__)
-
 
12
#define SYSCLK  20000000L       //Quarz Frequenz in Hz
-
 
13
#endif
-
 
14
 
-
 
15
#if defined (__AVR_ATmega644P__)
-
 
16
#define SYSCLK  20000000L       //Quarz Frequenz in Hz
-
 
17
#endif
4
#define QUADRO
18
 
5
 
19
// neue Hardware
6
// neue Hardware
20
#define ROT_OFF   {if((PlatinenVersion == 10)||(PlatinenVersion == 20)) PORTB &=~0x01; else  PORTB |= 0x01;}
7
#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;}
8
#define ROT_ON    {if((PlatinenVersion == 10)||(PlatinenVersion == 20)) PORTB |= 0x01; else  PORTB &=~0x01;}
22
#define ROT_FLASH PORTB ^= 0x01
9
#define ROT_FLASH PORTB ^= 0x01
23
#define GRN_OFF   {if((PlatinenVersion < 12)) PORTB &=~0x02; else PORTB |= 0x02;}
10
#define GRN_OFF   {if((PlatinenVersion < 12)) PORTB &=~0x02; else PORTB |= 0x02;}
Line 24... Line 11...
24
#define GRN_ON    {if((PlatinenVersion < 12)) PORTB |= 0x02; else PORTB &=~0x02;}
11
#define GRN_ON    {if((PlatinenVersion < 12)) PORTB |= 0x02; else PORTB &=~0x02;}
25
#define GRN_FLASH PORTB ^= 0x02
-
 
26
 
-
 
27
#define F_CPU SYSCLK
12
#define GRN_FLASH PORTB ^= 0x02
28
//#ifndef F_CPU
13
 
29
//#error ################## F_CPU nicht definiert oder ungültig #############
14
#define SYSCLK F_CPU
30
//#endif
15
 
Line 31... Line 16...
31
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Line 76... Line 61...
76
#define J4High    PORTD |= 0x10
61
#define J4High    PORTD |= 0x10
77
#define J4Low     PORTD &= ~0x10
62
#define J4Low     PORTD &= ~0x10
78
#define J5High    PORTD |= 0x08
63
#define J5High    PORTD |= 0x08
79
#define J5Low     PORTD &= ~0x08
64
#define J5Low     PORTD &= ~0x08
Line 80... Line -...
80
 
-
 
81
 
-
 
82
//#define  SYSCLK
-
 
83
//extern unsigned long SYSCLK;
65
 
84
extern volatile unsigned char SenderOkay;
66
extern volatile unsigned char SenderOkay;
85
extern unsigned char BattLowVoltageWarning;
67
extern unsigned char BattLowVoltageWarning;
86
extern unsigned char CosinusNickWinkel, CosinusRollWinkel;
68
extern unsigned char CosinusNickWinkel, CosinusRollWinkel;
87
extern unsigned char PlatinenVersion;
69
extern unsigned char PlatinenVersion;
Line 116... Line 98...
116
#include "fc.h"
98
#include "fc.h"
117
#include "gps.h"
99
#include "gps.h"
118
#include "spi.h"
100
#include "spi.h"
119
#include "led.h"
101
#include "led.h"
120
#include "spektrum.h"
102
#include "spektrum.h"
121
#include "libfcinit.h"
103
#include "libfc.h"
Line 122... Line 104...
122
 
104
 
123
 
105
 
124
#ifndef EEMEM
106
#ifndef EEMEM