Subversion Repositories FlightCtrl

Rev

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

Rev 683 Rev 685
Line 13... Line 13...
13
#if defined (__AVR_ATmega644P__)
13
#if defined (__AVR_ATmega644P__)
14
#define SYSCLK  20000000L       //Quarz Frequenz in Hz
14
#define SYSCLK  20000000L       //Quarz Frequenz in Hz
15
#endif
15
#endif
Line 16... Line 16...
16
 
16
 
17
// neue Hardware
17
// neue Hardware
18
#define ROT_OFF   {if(PlatinenVersion == 10) PORTB &=~0x01; else  PORTB |= 0x01;}
18
#define ROT_OFF   {if(BoardRelease == 10) PORTB &=~0x01; else  PORTB |= 0x01;}
19
#define ROT_ON    {if(PlatinenVersion == 10) PORTB |= 0x01; else  PORTB &=~0x01;}
19
#define ROT_ON    {if(BoardRelease == 10) PORTB |= 0x01; else  PORTB &=~0x01;}
20
#define ROT_FLASH PORTB ^= 0x01
20
#define ROT_FLASH PORTB ^= 0x01
21
#define GRN_OFF   PORTB &=~0x02
21
#define GRN_OFF   PORTB &=~0x02
22
#define GRN_ON    PORTB |= 0x02
22
#define GRN_ON    PORTB |= 0x02
Line 52... Line 52...
52
#define CFG_LOOP_OBEN       0x01
52
#define CFG_LOOP_OBEN       0x01
53
#define CFG_LOOP_UNTEN      0x02
53
#define CFG_LOOP_UNTEN      0x02
54
#define CFG_LOOP_LINKS      0x04
54
#define CFG_LOOP_LINKS      0x04
55
#define CFG_LOOP_RECHTS     0x08
55
#define CFG_LOOP_RECHTS     0x08
Line 56... Line -...
56
 
-
 
57
//#define  SYSCLK
-
 
58
//extern unsigned long SYSCLK;
-
 
59
extern volatile int i_Nick[20],i_Roll[20],DiffNick,DiffRoll;
-
 
60
extern volatile unsigned char SenderOkay;
-
 
61
extern unsigned char CosinusNickWinkel, CosinusRollWinkel;
-
 
62
extern unsigned char PlatinenVersion;
-
 
63
 
-
 
64
void ReadParameterSet (unsigned char number, unsigned char *buffer, unsigned char length);
-
 
65
void WriteParameterSet(unsigned char number, unsigned char *buffer, unsigned char length);
-
 
66
extern unsigned char GetActiveParamSetNumber(void);
-
 
Line 67... Line 56...
67
extern unsigned char EEPromArray[];
56
 
68
 
57
 
69
#include <stdlib.h>
58
#include <stdlib.h>
70
#include <string.h>
59
#include <string.h>
71
#include <avr/io.h>
60
#include <avr/io.h>
72
#include <avr/pgmspace.h>
61
#include <avr/pgmspace.h>
73
#include <avr/interrupt.h>
62
#include <avr/interrupt.h>
74
#include <avr/eeprom.h>
63
#include <avr/eeprom.h>
Line 75... Line -...
75
#include <avr/boot.h>
-
 
Line 76... Line 64...
76
#include <avr/wdt.h>
64
#include <avr/boot.h>
77
 
65
#include <avr/wdt.h>
78
#include "old_macros.h"
66
 
79
 
67
 
80
#include "_Settings.h"
68
//#define  SYSCLK
81
#include "printf_P.h"
69
//extern unsigned long SYSCLK;
-
 
70
extern volatile int i_Nick[20],i_Roll[20],DiffNick,DiffRoll;
82
#include "timer0.h"
71
extern volatile unsigned char SenderOkay;
83
#include "timer2.h"
72
extern unsigned char CosinusNickWinkel, CosinusRollWinkel;
84
#include "uart.h"
73
extern uint8_t BoardRelease;
85
#include "uart1.h"
74
 
86
#include "analog.h"
-
 
87
#include "twimaster.h"
-
 
88
#include "menu.h"
-
 
Line 89... Line 75...
89
#include "rc.h"
75
void ReadParameterSet (unsigned char number, unsigned char *buffer, unsigned char length);
90
#include "fc.h"
76
void WriteParameterSet(unsigned char number, unsigned char *buffer, unsigned char length);
91
#include "gps.h"
77
extern uint8_t GetActiveParamSetNumber(void);