Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | ingob | 1 | #ifndef _MAIN_H |
2 | #define _MAIN_H |
||
3 | |||
4 | //Hier die Quarz Frequenz einstellen |
||
5 | #if defined (__AVR_ATmega32__) |
||
6 | #define SYSCLK 20000000L //Quarz Frequenz in Hz |
||
7 | #endif |
||
8 | |||
9 | #if defined (__AVR_ATmega644__) |
||
10 | #define SYSCLK 20000000L //Quarz Frequenz in Hz |
||
11 | #endif |
||
12 | |||
683 | killagreg | 13 | #if defined (__AVR_ATmega644P__) |
14 | #define SYSCLK 20000000L //Quarz Frequenz in Hz |
||
15 | #endif |
||
16 | |||
687 | killagreg | 17 | #define F_CPU SYSCLK |
18 | |||
19 | |||
1 | ingob | 20 | // neue Hardware |
685 | killagreg | 21 | #define ROT_OFF {if(BoardRelease == 10) PORTB &=~0x01; else PORTB |= 0x01;} |
22 | #define ROT_ON {if(BoardRelease == 10) PORTB |= 0x01; else PORTB &=~0x01;} |
||
1 | ingob | 23 | #define ROT_FLASH PORTB ^= 0x01 |
683 | killagreg | 24 | #define GRN_OFF PORTB &=~0x02 |
25 | #define GRN_ON PORTB |= 0x02 |
||
173 | holgerb | 26 | #define GRN_FLASH PORTB ^= 0x02 |
1 | ingob | 27 | |
597 | ingob | 28 | |
29 | |||
1 | ingob | 30 | |
31 | |||
687 | killagreg | 32 | #include <inttypes.h> |
513 | hbuss | 33 | |
687 | killagreg | 34 | extern volatile int16_t i_Nick[20],i_Roll[20],DiffNick,DiffRoll; |
35 | extern uint8_t CosinusNickWinkel, CosinusRollWinkel; |
||
685 | killagreg | 36 | extern uint8_t BoardRelease; |
1 | ingob | 37 | |
304 | ingob | 38 | |
685 | killagreg | 39 | |
1 | ingob | 40 | #define DEBUG_DISPLAY_INTERVALL 123 // in ms |
41 | |||
42 | |||
687 | killagreg | 43 | #define DELAY_US(x) ((uint16_t)( (x) * 1e-6 * F_CPU )) |
683 | killagreg | 44 | |
1 | ingob | 45 | #endif //_MAIN_H |
46 | |||
47 | |||
48 | |||
49 | |||
50 | |||
51 |