Rev 1701 | Rev 1703 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1701 | Rev 1702 | ||
---|---|---|---|
1 | #ifndef _MAIN_H |
1 | #ifndef _MAIN_H |
2 | #define _MAIN_H |
2 | #define _MAIN_H |
3 | - | ||
4 | 3 | ||
5 | //#define DEBUG // use to activate debug output to MK-Tool: use Debug(text); |
- | |
6 | 4 | //#define DEBUG // use to activate debug output to MK-Tool: use Debug(text); |
|
7 | //#define ACT_S3D_SUMMENSIGNAL |
5 | //#define ACT_S3D_SUMMENSIGNAL |
- | 6 | //#define SWITCH_LEARNS_CAREFREE |
|
8 | //#define SWITCH_LEARNS_CAREFREE |
7 | //#define RECEIVER_SPEKTRUM_EXP |
9 | 8 | ||
10 | // neue Hardware |
9 | // neue Hardware |
11 | #define ROT_OFF {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB &=~0x01; else PORTB |= 0x01;} |
10 | #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;} |
11 | #define ROT_ON {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB |= 0x01; else PORTB &=~0x01;} |
13 | #define ROT_FLASH PORTB ^= 0x01 |
12 | #define ROT_FLASH PORTB ^= 0x01 |
14 | #define GRN_OFF {if((PlatinenVersion < 12)) PORTB &=~0x02; else PORTB |= 0x02;} |
13 | #define GRN_OFF {if((PlatinenVersion < 12)) PORTB &=~0x02; else PORTB |= 0x02;} |
15 | #define GRN_ON {if((PlatinenVersion < 12)) PORTB |= 0x02; else PORTB &=~0x02;} |
14 | #define GRN_ON {if((PlatinenVersion < 12)) PORTB |= 0x02; else PORTB &=~0x02;} |
16 | #define GRN_FLASH PORTB ^= 0x02 |
15 | #define GRN_FLASH PORTB ^= 0x02 |
17 | 16 | ||
18 | #define SYSCLK F_CPU |
17 | #define SYSCLK F_CPU |
19 | 18 | ||
20 | //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
19 | //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
21 | 20 | ||
22 | #define J3High PORTD |= 0x20 |
21 | #define J3High PORTD |= 0x20 |
23 | #define J3Low PORTD &= ~0x20 |
22 | #define J3Low PORTD &= ~0x20 |
24 | #define J4High PORTD |= 0x10 |
23 | #define J4High PORTD |= 0x10 |
25 | #define J4Low PORTD &= ~0x10 |
24 | #define J4Low PORTD &= ~0x10 |
26 | #define J5High PORTD |= 0x08 |
25 | #define J5High PORTD |= 0x08 |
27 | #define J5Low PORTD &= ~0x08 |
26 | #define J5Low PORTD &= ~0x08 |
28 | 27 | ||
29 | extern volatile unsigned char SenderOkay; |
28 | extern volatile unsigned char SenderOkay; |
30 | extern unsigned char BattLowVoltageWarning; |
29 | extern unsigned char BattLowVoltageWarning; |
31 | extern unsigned char CosinusNickWinkel, CosinusRollWinkel; |
30 | extern unsigned char CosinusNickWinkel, CosinusRollWinkel; |
32 | extern unsigned char PlatinenVersion; |
31 | extern unsigned char PlatinenVersion; |
33 | extern unsigned char SendVersionToNavi; |
32 | extern unsigned char SendVersionToNavi; |
34 | - | ||
- | 33 | extern unsigned char FoundMotors; |
|
35 | 34 | ||
36 | void LipoDetection(unsigned char print); |
35 | void LipoDetection(unsigned char print); |
37 | extern unsigned int FlugMinuten,FlugMinutenGesamt,FlugSekunden; |
36 | extern unsigned int FlugMinuten,FlugMinutenGesamt,FlugSekunden; |
38 | 37 | ||
39 | #include <stdlib.h> |
38 | #include <stdlib.h> |
40 | #include <string.h> |
39 | #include <string.h> |
41 | #include <avr/io.h> |
40 | #include <avr/io.h> |
42 | #include <avr/pgmspace.h> |
41 | #include <avr/pgmspace.h> |
43 | #include <avr/interrupt.h> |
42 | #include <avr/interrupt.h> |
44 | #include <avr/eeprom.h> |
43 | #include <avr/eeprom.h> |
45 | #include <avr/boot.h> |
44 | #include <avr/boot.h> |
46 | #include <avr/wdt.h> |
45 | #include <avr/wdt.h> |
47 | 46 | ||
48 | 47 | ||
49 | #include "old_macros.h" |
48 | #include "old_macros.h" |
50 | 49 | ||
51 | #include "_Settings.h" |
50 | #include "_Settings.h" |
52 | #include "printf_P.h" |
51 | #include "printf_P.h" |
53 | #include "timer0.h" |
52 | #include "timer0.h" |
54 | #include "uart.h" |
53 | #include "uart.h" |
55 | #include "analog.h" |
54 | #include "analog.h" |
56 | #include "twimaster.h" |
55 | #include "twimaster.h" |
57 | #include "menu.h" |
56 | #include "menu.h" |
58 | #include "rc.h" |
57 | #include "rc.h" |
59 | #include "fc.h" |
58 | #include "fc.h" |
60 | #include "gps.h" |
59 | #include "gps.h" |
61 | #include "spi.h" |
60 | #include "spi.h" |
62 | #include "led.h" |
61 | #include "led.h" |
63 | #include "spektrum.h" |
62 | #include "spektrum.h" |
64 | #include "capacity.h" |
63 | #include "capacity.h" |
65 | #include "eeprom.h" |
64 | #include "eeprom.h" |
66 | #include "libfc.h" |
65 | #include "libfc.h" |
67 | #include "debug.h" |
66 | #include "debug.h" |
68 | 67 | ||
69 | 68 | ||
70 | 69 | ||
71 | #endif //_MAIN_H |
70 | #endif //_MAIN_H |
72 | 71 | ||
73 | 72 | ||
74 | 73 | ||
75 | 74 | ||
76 | 75 | ||
77 | 76 | ||
78 | 77 |