Subversion Repositories FlightCtrl

Rev

Rev 1538 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1538 killagreg 1
#ifndef _MAIN_H
2
#define _MAIN_H
3
 
4
#include <avr/io.h>
5
 
6
#define ATMEGA644       0
7
#define ATMEGA644P      1
8
 
9
#define SYSCLK F_CPU
10
 
11
 
12
 
13
// neue Hardware
14
#define RED_OFF   {if((BoardRelease == 10)||(BoardRelease == 20)) PORTB &=~(1<<PORTB0); else  PORTB |= (1<<PORTB0);}
15
#define RED_ON    {if((BoardRelease == 10)||(BoardRelease == 20)) PORTB |= (1<<PORTB0); else  PORTB &=~(1<<PORTB0);}
16
#define RED_FLASH PORTB ^= (1<<PORTB0)
17
#define GRN_OFF   {if(BoardRelease  < 12) PORTB &=~(1<<PORTB1); else PORTB |= (1<<PORTB1);}
18
#define GRN_ON    {if(BoardRelease  < 12) PORTB |= (1<<PORTB1); else PORTB &=~(1<<PORTB1);}
19
#define GRN_FLASH PORTB ^= (1<<PORTB1)
20
 
21
#include <inttypes.h>
22
 
23
extern uint8_t LowVoltageWarning;
24
extern uint8_t BoardRelease;
25
extern uint8_t CPUType;
26
extern uint16_t FlightMinutes, FlightMinutesTotal;
27
void LipoDetection(uint8_t print);
28
 
29
#endif //_MAIN_H
30
 
31
 
32
 
33
 
34
 
35