Subversion Repositories FlightCtrl

Rev

Rev 935 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 935 Rev 936
Line 1... Line 1...
1
#ifndef _MAIN_H
1
#ifndef _MAIN_H
2
#define _MAIN_H
2
#define _MAIN_H
Line 3... Line 3...
3
 
3
 
Line 4... Line 4...
4
#include <avr/io.h>
4
#include <avr/io.h>
5
 
-
 
6
//Hier die Quarz Frequenz einstellen
-
 
7
#if defined (__AVR_ATmega32__)
-
 
8
#define SYSCLK  20000000L       //Quarz Frequenz in Hz
-
 
9
#endif
5
 
10
 
6
//set crystal frequency here
11
#if defined (__AVR_ATmega644__)
7
#if defined (__AVR_ATmega644__)
Line 12... Line 8...
12
#define SYSCLK  20000000L       //Quarz Frequenz in Hz
8
#define SYSCLK  20000000L       //crystal freqency in Hz
13
#endif
9
#endif
14
 
10
 
Line 15... Line 11...
15
#if defined (__AVR_ATmega644P__)
11
#if defined (__AVR_ATmega644P__)
Line 16... Line 12...
16
#define SYSCLK  20000000L       //Quarz Frequenz in Hz
12
#define SYSCLK  20000000L       //crystal freqency in Hz
17
#endif
13
#endif
18
 
14
 
19
#define F_CPU SYSCLK
15
#define F_CPU SYSCLK
20
 
16
 
21
 
17
 
22
// neue Hardware
18
// neue Hardware
Line 23... Line 19...
23
#define ROT_OFF   {if(BoardRelease == 10) PORTB &=~(1<<PORTB0); else  PORTB |= (1<<PORTB0);}
19
#define RED_OFF   {if(BoardRelease == 10) PORTB &=~(1<<PORTB0); else  PORTB |= (1<<PORTB0);}
Line 24... Line 20...
24
#define ROT_ON    {if(BoardRelease == 10) PORTB |= (1<<PORTB0); else  PORTB &=~(1<<PORTB0);}
20
#define RED_ON    {if(BoardRelease == 10) PORTB |= (1<<PORTB0); else  PORTB &=~(1<<PORTB0);}