Subversion Repositories FlightCtrl

Rev

Rev 942 | 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
 
943 pangu 17
#ifdef HEXAKOPTER
18
#define MOTOR_COUNT 6
19
#else
20
#define MOTOR_COUNT 4
21
#endif
1 ingob 22
 
886 killagreg 23
// neue Hardware
936 killagreg 24
#define RED_OFF   {if(BoardRelease == 10) PORTB &=~(1<<PORTB0); else  PORTB |= (1<<PORTB0);}
25
#define RED_ON    {if(BoardRelease == 10) PORTB |= (1<<PORTB0); else  PORTB &=~(1<<PORTB0);}
26
#define RED_FLASH PORTB ^= (1<<PORTB0)
27
#define GRN_OFF   {if(BoardRelease  < 12) PORTB &=~(1<<PORTB1); else PORTB |= (1<<PORTB1);}
28
#define GRN_ON    {if(BoardRelease  < 12) PORTB |= (1<<PORTB1); else PORTB &=~(1<<PORTB1);}
886 killagreg 29
#define GRN_FLASH PORTB ^= (1<<PORTB1)
513 hbuss 30
 
886 killagreg 31
#include <inttypes.h>
1 ingob 32
 
886 killagreg 33
extern uint8_t BoardRelease;
1 ingob 34
 
35
#endif //_MAIN_H
36
 
37
 
38
 
39
 
40
 
41