Subversion Repositories FlightCtrl

Rev

Rev 685 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 685 Rev 687
Line 12... Line 12...
12
 
12
 
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
Line -... Line 15...
-
 
15
#endif
-
 
16
 
-
 
17
#define F_CPU SYSCLK
15
#endif
18
 
16
 
19
 
17
// neue Hardware
20
// neue Hardware
18
#define ROT_OFF   {if(BoardRelease == 10) PORTB &=~0x01; else  PORTB |= 0x01;}
21
#define ROT_OFF   {if(BoardRelease == 10) PORTB &=~0x01; else  PORTB |= 0x01;}
19
#define ROT_ON    {if(BoardRelease == 10) PORTB |= 0x01; else  PORTB &=~0x01;}
22
#define ROT_ON    {if(BoardRelease == 10) PORTB |= 0x01; else  PORTB &=~0x01;}
20
#define ROT_FLASH PORTB ^= 0x01
23
#define ROT_FLASH PORTB ^= 0x01
21
#define GRN_OFF   PORTB &=~0x02
24
#define GRN_OFF   PORTB &=~0x02
Line 22... Line -...
22
#define GRN_ON    PORTB |= 0x02
-
 
23
#define GRN_FLASH PORTB ^= 0x02
-
 
24
 
-
 
25
 
-
 
26
 
-
 
27
#define F_CPU SYSCLK
-
 
28
//#ifndef F_CPU
-
 
29
//#error ################## F_CPU nicht definiert oder ungültig #############
-
 
30
//#endif
-
 
31
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 
32
 
-
 
33
#define EEPROM_ADR_VALID            1
-
 
34
#define EEPROM_ADR_ACTIVE_SET       2
-
 
35
#define EEPROM_ADR_LAST_OFFSET      3
-
 
36
 
-
 
37
#define EEPROM_ADR_ACC_NICK         4
-
 
38
#define EEPROM_ADR_ACC_ROLL         6
-
 
39
#define EEPROM_ADR_ACC_Z            8
-
 
40
 
-
 
41
#define EEPROM_ADR_PARAM_BEGIN      100
-
 
42
 
-
 
43
#define CFG_HOEHENREGELUNG       0x01
-
 
44
#define CFG_HOEHEN_SCHALTER      0x02
-
 
45
#define CFG_HEADING_HOLD         0x04
-
 
46
#define CFG_KOMPASS_AKTIV        0x08
-
 
47
#define CFG_KOMPASS_FIX          0x10
-
 
48
#define CFG_GPS_AKTIV            0x20
-
 
49
#define CFG_ACHSENKOPPLUNG_AKTIV 0x40
-
 
50
#define CFG_DREHRATEN_BEGRENZER  0x80
-
 
51
 
-
 
52
#define CFG_LOOP_OBEN       0x01
-
 
53
#define CFG_LOOP_UNTEN      0x02
-
 
54
#define CFG_LOOP_LINKS      0x04
-
 
55
#define CFG_LOOP_RECHTS     0x08
-
 
56
 
-
 
57
 
-
 
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
 
-
 
68
//#define  SYSCLK
-
 
Line -... Line 25...
-
 
25
#define GRN_ON    PORTB |= 0x02
-
 
26
#define GRN_FLASH PORTB ^= 0x02
-
 
27
 
69
//extern unsigned long SYSCLK;
28
 
70
extern volatile int i_Nick[20],i_Roll[20],DiffNick,DiffRoll;
29
 
71
extern volatile unsigned char SenderOkay;
30
 
72
extern unsigned char CosinusNickWinkel, CosinusRollWinkel;
31
 
Line 73... Line -...
73
extern uint8_t BoardRelease;
-
 
74
 
-
 
75
void ReadParameterSet (unsigned char number, unsigned char *buffer, unsigned char length);
-
 
Line 76... Line 32...
76
void WriteParameterSet(unsigned char number, unsigned char *buffer, unsigned char length);
32
#include <inttypes.h>
Line 77... Line 33...
77
extern uint8_t GetActiveParamSetNumber(void);
33
 
Line 78... Line 34...
78
extern uint8_t EEPromArray[];
34
extern volatile int16_t i_Nick[20],i_Roll[20],DiffNick,DiffRoll;