Rev 750 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 750 | Rev 762 | ||
---|---|---|---|
1 | #ifndef _MAIN_H |
1 | #ifndef _MAIN_H |
2 | #define _MAIN_H |
2 | #define _MAIN_H |
- | 3 | ||
- | 4 | #include <avr/io.h> |
|
3 | 5 | ||
4 | //Hier die Quarz Frequenz einstellen |
6 | //Hier die Quarz Frequenz einstellen |
5 | #if defined (__AVR_ATmega32__) |
7 | #if defined (__AVR_ATmega32__) |
6 | #define SYSCLK 20000000L //Quarz Frequenz in Hz |
8 | #define SYSCLK 20000000L //Quarz Frequenz in Hz |
7 | #endif |
9 | #endif |
8 | 10 | ||
9 | #if defined (__AVR_ATmega644__) |
11 | #if defined (__AVR_ATmega644__) |
10 | #define SYSCLK 20000000L //Quarz Frequenz in Hz |
12 | #define SYSCLK 20000000L //Quarz Frequenz in Hz |
11 | #endif |
13 | #endif |
12 | 14 | ||
13 | #if defined (__AVR_ATmega644P__) |
15 | #if defined (__AVR_ATmega644P__) |
14 | #define SYSCLK 20000000L //Quarz Frequenz in Hz |
16 | #define SYSCLK 20000000L //Quarz Frequenz in Hz |
15 | #endif |
17 | #endif |
16 | 18 | ||
17 | #define F_CPU SYSCLK |
19 | #define F_CPU SYSCLK |
18 | 20 | ||
19 | 21 | ||
20 | // neue Hardware |
22 | // neue Hardware |
21 | #define ROT_OFF {if(BoardRelease == 10) PORTB &=~(1<<PORTB0); else PORTB |= (1<<PORTB0);} |
23 | #define ROT_OFF {if(BoardRelease == 10) PORTB &=~(1<<PORTB0); else PORTB |= (1<<PORTB0);} |
22 | #define ROT_ON {if(BoardRelease == 10) PORTB |= (1<<PORTB0); else PORTB &=~(1<<PORTB0);} |
24 | #define ROT_ON {if(BoardRelease == 10) PORTB |= (1<<PORTB0); else PORTB &=~(1<<PORTB0);} |
23 | #define ROT_FLASH PORTB ^= (1<<PORTB0) |
25 | #define ROT_FLASH PORTB ^= (1<<PORTB0) |
24 | #define GRN_OFF PORTB &=~(1<<PORTB1) |
26 | #define GRN_OFF PORTB &=~(1<<PORTB1) |
25 | #define GRN_ON PORTB |= (1<<PORTB1) |
27 | #define GRN_ON PORTB |= (1<<PORTB1) |
26 | #define GRN_FLASH PORTB ^= (1<<PORTB1) |
28 | #define GRN_FLASH PORTB ^= (1<<PORTB1) |
27 | - | ||
28 | #define J16_ON PORTC |= (1<<PORTC2) |
- | |
29 | #define J16_OFF PORTC &= ~(1<<PORTC2) |
- | |
30 | #define J17_ON PORTC |= (1<<PORTC3) |
- | |
31 | #define J17_OFF PORTC &= ~(1<<PORTC3) |
- | |
32 | 29 | ||
33 | #include <inttypes.h> |
30 | #include <inttypes.h> |
34 | 31 | ||
35 | extern uint8_t BoardRelease; |
32 | extern uint8_t BoardRelease; |
36 | 33 | ||
37 | #endif //_MAIN_H |
34 | #endif //_MAIN_H |
38 | 35 | ||
39 | 36 | ||
40 | 37 | ||
41 | 38 | ||
42 | 39 | ||
43 | 40 | ||
44 | 41 |