Subversion Repositories FlightCtrl

Rev

Rev 1036 | Rev 1166 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1036 Rev 1155
Line -... Line 1...
-
 
1
#ifndef _ANALOG_H
-
 
2
 #define _ANALOG_H
1
/*#######################################################################################
3
/*#######################################################################################
Line 2... Line 4...
2
 
4
 
Line 3... Line 5...
3
#######################################################################################*/
5
#######################################################################################*/
Line 14... Line 16...
14
extern volatile int HoeheD;
16
extern volatile int HoeheD;
15
extern volatile unsigned int  MessLuftdruck;
17
extern volatile unsigned int  MessLuftdruck;
16
extern volatile int  StartLuftdruck;
18
extern volatile int  StartLuftdruck;
17
extern volatile char MessanzahlNick;
19
extern volatile char MessanzahlNick;
18
extern unsigned char AnalogOffsetNick,AnalogOffsetRoll,AnalogOffsetGier;
20
extern unsigned char AnalogOffsetNick,AnalogOffsetRoll,AnalogOffsetGier;
-
 
21
extern unsigned char AdReady;
-
 
22
 
Line 19... Line 23...
19
 
23
 
20
unsigned int ReadADC(unsigned char adc_input);
24
unsigned int ReadADC(unsigned char adc_input);
21
void         ADC_Init(void);
25
void         ADC_Init(void);
22
void SucheLuftruckOffset(void);
26
void SucheLuftruckOffset(void);
Line -... Line 27...
-
 
27
void SucheGyroOffset(void);
-
 
28
 
-
 
29
#define AD_GIER     0
-
 
30
#define AD_ROLL     1
-
 
31
#define AD_NICK     2
-
 
32
#define AD_DRUCK    3
-
 
33
#define AD_UBAT     4
-
 
34
#define AD_ACC_Z    5
-
 
35
#define AD_ACC_Y    6
Line 23... Line 36...
23
void SucheGyroOffset(void);
36
#define AD_ACC_X    7
-
 
37
 
-
 
38
 
24
 
39
#define ANALOG_OFF ADCSRA=0
-
 
40
//#define ANALOG_ON ADCSRA=(1<<ADEN)|(1<<ADSC)|(1<<ADATE)|(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0)|(1<<ADIE)
-
 
41
    //Free Running Mode, Division Factor 128, Interrupt on