Subversion Repositories FlightCtrl

Rev

Rev 935 | Go to most recent revision | 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
 
936 killagreg 6
//set crystal frequency here
1 ingob 7
#if defined (__AVR_ATmega644__)
936 killagreg 8
#define SYSCLK  20000000L       //crystal freqency in Hz
1 ingob 9
#endif
10
 
886 killagreg 11
#if defined (__AVR_ATmega644P__)
936 killagreg 12
#define SYSCLK  20000000L       //crystal freqency in Hz
886 killagreg 13
#endif
1 ingob 14
 
304 ingob 15
#define F_CPU SYSCLK
1 ingob 16
 
17
 
886 killagreg 18
// neue Hardware
936 killagreg 19
#define RED_OFF   {if(BoardRelease == 10) PORTB &=~(1<<PORTB0); else  PORTB |= (1<<PORTB0);}
20
#define RED_ON    {if(BoardRelease == 10) PORTB |= (1<<PORTB0); else  PORTB &=~(1<<PORTB0);}
21
#define RED_FLASH PORTB ^= (1<<PORTB0)
22
#define GRN_OFF   {if(BoardRelease  < 12) PORTB &=~(1<<PORTB1); else PORTB |= (1<<PORTB1);}
23
#define GRN_ON    {if(BoardRelease  < 12) PORTB |= (1<<PORTB1); else PORTB &=~(1<<PORTB1);}
886 killagreg 24
#define GRN_FLASH PORTB ^= (1<<PORTB1)
513 hbuss 25
 
886 killagreg 26
#include <inttypes.h>
1 ingob 27
 
886 killagreg 28
extern uint8_t BoardRelease;
1 ingob 29
 
30
#endif //_MAIN_H
31
 
32
 
33
 
34
 
35
 
36