Rev 1155 | Rev 1168 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1155 | hbuss | 1 | #ifndef _ANALOG_H |
2 | #define _ANALOG_H |
||
1 | ingob | 3 | /*####################################################################################### |
4 | |||
5 | #######################################################################################*/ |
||
6 | |||
7 | extern volatile int UBat; |
||
395 | hbuss | 8 | extern volatile int AdWertNick, AdWertRoll, AdWertGier; |
9 | extern volatile int AdWertAccRoll,AdWertAccNick,AdWertAccHoch; |
||
1166 | hbuss | 10 | extern volatile int HiResNick, HiResRoll; |
11 | extern volatile int AdWertNickFilter, AdWertRollFilter, AdWertGierFilter; |
||
1 | ingob | 12 | extern volatile int Aktuell_Nick,Aktuell_Roll,Aktuell_Gier,Aktuell_ax, Aktuell_ay,Aktuell_az; |
13 | extern volatile long Luftdruck; |
||
14 | extern volatile char messanzahl_Druck; |
||
15 | extern volatile unsigned int ZaehlMessungen; |
||
16 | extern unsigned char DruckOffsetSetting; |
||
1036 | hbuss | 17 | extern signed char ExpandBaro; |
1 | ingob | 18 | extern volatile int HoeheD; |
19 | extern volatile unsigned int MessLuftdruck; |
||
20 | extern volatile int StartLuftdruck; |
||
395 | hbuss | 21 | extern volatile char MessanzahlNick; |
918 | hbuss | 22 | extern unsigned char AnalogOffsetNick,AnalogOffsetRoll,AnalogOffsetGier; |
1155 | hbuss | 23 | extern unsigned char AdReady; |
1 | ingob | 24 | |
1155 | hbuss | 25 | |
304 | ingob | 26 | unsigned int ReadADC(unsigned char adc_input); |
27 | void ADC_Init(void); |
||
28 | void SucheLuftruckOffset(void); |
||
918 | hbuss | 29 | void SucheGyroOffset(void); |
1 | ingob | 30 | |
1155 | hbuss | 31 | #define AD_GIER 0 |
32 | #define AD_ROLL 1 |
||
33 | #define AD_NICK 2 |
||
34 | #define AD_DRUCK 3 |
||
35 | #define AD_UBAT 4 |
||
36 | #define AD_ACC_Z 5 |
||
37 | #define AD_ACC_Y 6 |
||
38 | #define AD_ACC_X 7 |
||
1 | ingob | 39 | |
1155 | hbuss | 40 | |
1 | ingob | 41 | #define ANALOG_OFF ADCSRA=0 |
1166 | hbuss | 42 | |
43 | #define ANALOG_ON ADCSRA=(1<<ADEN)|(1<<ADSC)|(0<<ADATE)|(1<<ADPS2)|(1<<ADPS1)|(0<<ADPS0)|(1<<ADIE) |
||
44 | //Signle trigger Mode, Interrupt on |
||
1155 | hbuss | 45 | #endif //_ANALOG_H |