Rev 886 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | ingob | 1 | #ifndef _MAIN_H |
886 | killagreg | 2 | #define _MAIN_H |
1 | ingob | 3 | |
886 | killagreg | 4 | #include <avr/io.h> |
5 | |||
1 | ingob | 6 | //Hier die Quarz Frequenz einstellen |
7 | #if defined (__AVR_ATmega32__) |
||
8 | #define SYSCLK 20000000L //Quarz Frequenz in Hz |
||
9 | #endif |
||
10 | |||
11 | #if defined (__AVR_ATmega644__) |
||
12 | #define SYSCLK 20000000L //Quarz Frequenz in Hz |
||
13 | #endif |
||
14 | |||
886 | killagreg | 15 | #if defined (__AVR_ATmega644P__) |
16 | #define SYSCLK 20000000L //Quarz Frequenz in Hz |
||
17 | #endif |
||
1 | ingob | 18 | |
304 | ingob | 19 | #define F_CPU SYSCLK |
1 | ingob | 20 | |
903 | pangu | 21 | #ifdef HEXAKOPTER |
22 | #define MOTOR_COUNT 6 |
||
23 | #else |
||
24 | #define MOTOR_COUNT 4 |
||
25 | #endif |
||
1 | ingob | 26 | |
886 | killagreg | 27 | // neue Hardware |
28 | #define ROT_OFF {if(BoardRelease == 10) PORTB &=~(1<<PORTB0); else PORTB |= (1<<PORTB0);} |
||
29 | #define ROT_ON {if(BoardRelease == 10) PORTB |= (1<<PORTB0); else PORTB &=~(1<<PORTB0);} |
||
30 | #define ROT_FLASH PORTB ^= (1<<PORTB0) |
||
31 | #define GRN_OFF PORTB &=~(1<<PORTB1) |
||
32 | #define GRN_ON PORTB |= (1<<PORTB1) |
||
33 | #define GRN_FLASH PORTB ^= (1<<PORTB1) |
||
513 | hbuss | 34 | |
886 | killagreg | 35 | #include <inttypes.h> |
1 | ingob | 36 | |
886 | killagreg | 37 | extern uint8_t BoardRelease; |
1 | ingob | 38 | |
39 | #endif //_MAIN_H |
||
40 | |||
41 | |||
42 | |||
43 | |||
44 | |||
45 |