Rev 1994 | Rev 2000 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1994 | Rev 1995 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #ifndef _MAIN_H |
1 | #ifndef _MAIN_H |
2 | #define _MAIN_H |
2 | #define _MAIN_H |
3 | 3 | ||
4 | //#define DEBUG // use to activate debug output to MK-Tool: use Debug(text); |
4 | //#define DEBUG // use to activate debug output to MK-Tool: use Debug(text); |
5 | //#define ACT_S3D_SUMMENSIGNAL |
5 | //#define ACT_S3D_SUMMENSIGNAL |
6 | //#define RECEIVER_SPEKTRUM_DX7EXP |
6 | //#define RECEIVER_SPEKTRUM_DX7EXP |
7 | //#define RECEIVER_SPEKTRUM_DX8EXP |
7 | //#define RECEIVER_SPEKTRUM_DX8EXP |
- | 8 | ||
- | 9 | ||
- | 10 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) ///MartinW |
|
- | 11 | #define WITH_MKTOOL_Display |
|
- | 12 | #define WITH_JETI_SIMULATION |
|
- | 13 | #define WITH_ExternControl |
|
- | 14 | #define WITH_FULL_ANALOG_TEXT |
|
- | 15 | #define WITHSPECTRUM |
|
- | 16 | #else |
|
- | 17 | #endif |
|
- | 18 | ||
- | 19 | //#define WITH_MKTOOL_Display /// MartinW; with MKTool Display 70604-63130 |
|
- | 20 | //#define WITHSPECTRUM /// MartinW; memsave |
|
- | 21 | //#define WITH_FULL_ANALOG_TEXT /// MartinW; memsave |
|
- | 22 | //#define WITH_ExternControl /// MartinW; memsave |
|
- | 23 | //#define WITH_ORIGINAL_MOTORSMOOTHING /// MartinW; memsave 63312-63164 |
|
- | 24 | //#define WITH_JETI_SIMULATION /// MartinW; memsave 63312-63016 |
|
- | 25 | #define WITH_JETI_BEEP /// MartinW; 63072-63038; 63216-63050 |
|
- | 26 | //#define WITH_PANOTRIGGER /// MartinW; 64336-64112 |
|
- | 27 | //#define WITH_HOTTMENU /// Metro; |
|
- | 28 | ||
- | 29 | ||
- | 30 | ||
- | 31 | ||
- | 32 | ||
- | 33 | ||
8 | 34 | ||
9 | // neue Hardware |
35 | // neue Hardware |
10 | #define ROT_OFF {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB &=~0x01; else PORTB |= 0x01;} |
36 | #define ROT_OFF {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB &=~0x01; else PORTB |= 0x01;} |
11 | #define ROT_ON {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB |= 0x01; else PORTB &=~0x01;} |
37 | #define ROT_ON {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB |= 0x01; else PORTB &=~0x01;} |
12 | #define ROT_FLASH PORTB ^= 0x01 |
38 | #define ROT_FLASH PORTB ^= 0x01 |
13 | #define GRN_OFF {if((PlatinenVersion < 12)) PORTB &=~0x02; else PORTB |= 0x02;} |
39 | #define GRN_OFF {if((PlatinenVersion < 12)) PORTB &=~0x02; else PORTB |= 0x02;} |
14 | #define GRN_ON {if((PlatinenVersion < 12)) PORTB |= 0x02; else PORTB &=~0x02;} |
40 | #define GRN_ON {if((PlatinenVersion < 12)) PORTB |= 0x02; else PORTB &=~0x02;} |
15 | #define GRN_FLASH PORTB ^= 0x02 |
41 | #define GRN_FLASH PORTB ^= 0x02 |
16 | 42 | ||
17 | #define SYSCLK F_CPU |
43 | #define SYSCLK F_CPU |
18 | 44 | ||
19 | //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
45 | //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
20 | 46 | ||
21 | #define J3High PORTD |= 0x20 |
47 | #define J3High PORTD |= 0x20 |
22 | #define J3Low PORTD &= ~0x20 |
48 | #define J3Low PORTD &= ~0x20 |
23 | #define J4High PORTD |= 0x10 |
49 | #define J4High PORTD |= 0x10 |
24 | #define J4Low PORTD &= ~0x10 |
50 | #define J4Low PORTD &= ~0x10 |
25 | #define J5High PORTD |= 0x08 |
51 | #define J5High PORTD |= 0x08 |
26 | #define J5Low PORTD &= ~0x08 |
52 | #define J5Low PORTD &= ~0x08 |
27 | 53 | ||
28 | extern volatile unsigned char SenderOkay; |
54 | extern volatile unsigned char SenderOkay; |
29 | extern unsigned char BattLowVoltageWarning; |
55 | extern unsigned char BattLowVoltageWarning; |
30 | extern unsigned char CosinusNickWinkel, CosinusRollWinkel; |
56 | extern unsigned char CosinusNickWinkel, CosinusRollWinkel; |
31 | extern unsigned char PlatinenVersion; |
57 | extern unsigned char PlatinenVersion; |
32 | extern unsigned char SendVersionToNavi; |
58 | extern unsigned char SendVersionToNavi; |
33 | extern unsigned char FoundMotors; |
59 | extern unsigned char FoundMotors; |
34 | extern unsigned char JetiBeep; |
60 | extern unsigned char JetiBeep; |
35 | void LipoDetection(unsigned char print); |
61 | void LipoDetection(unsigned char print); |
36 | extern unsigned int FlugMinuten,FlugMinutenGesamt,FlugSekunden; |
62 | extern unsigned int FlugMinuten,FlugMinutenGesamt,FlugSekunden; |
37 | - | ||
38 | #include <avr/pgmspace.h> |
63 | #include <avr/pgmspace.h> |
39 | 64 | ||
40 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
65 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
41 | 66 | ||
42 | #endif |
67 | #endif |
43 | 68 | ||
44 | #include <stdlib.h> |
69 | #include <stdlib.h> |
45 | #include <string.h> |
70 | #include <string.h> |
46 | #include <avr/io.h> |
71 | #include <avr/io.h> |
47 | #include <avr/pgmspace.h> |
72 | #include <avr/pgmspace.h> |
48 | #include <avr/interrupt.h> |
73 | #include <avr/interrupt.h> |
49 | #include <avr/eeprom.h> |
74 | #include <avr/eeprom.h> |
50 | #include <avr/boot.h> |
75 | #include <avr/boot.h> |
51 | #include <avr/wdt.h> |
76 | #include <avr/wdt.h> |
52 | 77 | ||
53 | #include "old_macros.h" |
78 | #include "old_macros.h" |
54 | 79 | ||
55 | #include "printf_P.h" |
80 | #include "printf_P.h" |
56 | #include "timer0.h" |
81 | #include "timer0.h" |
57 | #include "uart.h" |
82 | #include "uart.h" |
58 | #include "analog.h" |
83 | #include "analog.h" |
59 | #include "twimaster.h" |
84 | #include "twimaster.h" |
60 | #include "menu.h" |
85 | #include "menu.h" |
61 | #include "rc.h" |
86 | #include "rc.h" |
62 | #include "fc.h" |
87 | #include "fc.h" |
63 | #include "gps.h" |
88 | #include "gps.h" |
64 | #include "spi.h" |
89 | #include "spi.h" |
65 | #include "led.h" |
90 | #include "led.h" |
66 | #include "spektrum.h" |
91 | #include "spektrum.h" |
67 | #include "capacity.h" |
92 | #include "capacity.h" |
68 | #include "eeprom.h" |
93 | #include "eeprom.h" |
69 | #include "libfc.h" |
94 | #include "libfc.h" |
70 | #include "hottmenu.h" |
95 | #include "hottmenu.h" |
71 | #include "debug.h" |
96 | #include "debug.h" |
72 | 97 | ||
73 | 98 | ||
74 | #endif //_MAIN_H |
99 | #endif //_MAIN_H |
75 | 100 | ||
76 | 101 | ||
77 | 102 | ||
78 | 103 | ||
79 | 104 | ||
80 | 105 |