Subversion Repositories FlightCtrl

Rev

Rev 712 | Rev 762 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef _MAIN_H
 #define _MAIN_H

//Hier die Quarz Frequenz einstellen
#if defined (__AVR_ATmega32__)
#define SYSCLK  20000000L       //Quarz Frequenz in Hz
#endif

#if defined (__AVR_ATmega644__)
#define SYSCLK  20000000L       //Quarz Frequenz in Hz
#endif

#if defined (__AVR_ATmega644P__)
#define SYSCLK  20000000L       //Quarz Frequenz in Hz
#endif

#define F_CPU SYSCLK


// neue Hardware
#define ROT_OFF   {if(BoardRelease == 10) PORTB &=~(1<<PORTB0); else  PORTB |= (1<<PORTB0);}
#define ROT_ON    {if(BoardRelease == 10) PORTB |= (1<<PORTB0); else  PORTB &=~(1<<PORTB0);}
#define ROT_FLASH PORTB ^= (1<<PORTB0)
#define GRN_OFF   PORTB &=~(1<<PORTB1)
#define GRN_ON    PORTB |= (1<<PORTB1)
#define GRN_FLASH PORTB ^= (1<<PORTB1)

#define J16_ON   PORTC |=  (1<<PORTC2)
#define J16_OFF  PORTC &= ~(1<<PORTC2)
#define J17_ON   PORTC |=  (1<<PORTC3)
#define J17_OFF  PORTC &= ~(1<<PORTC3)

#include <inttypes.h>

extern uint8_t BoardRelease;

#endif //_MAIN_H