Rev 683 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 683 | Rev 685 | ||
---|---|---|---|
1 | /*####################################################################################### |
- | |
- | 1 | #ifndef _ANALOG_H |
|
- | 2 | #define _ANALOG_H |
|
2 | 3 | ||
3 | #######################################################################################*/ |
4 | #include <inttypes.h> |
4 | 5 | ||
5 | extern volatile int16_t UBat; |
6 | extern volatile int16_t UBat; |
6 | extern volatile int16_t AdValueGyrNick, AdValueGyrRoll, AdValueGyrGier; |
7 | extern volatile int16_t AdValueGyrNick, AdValueGyrRoll, AdValueGyrGier; |
7 | extern volatile int16_t AdValueAccRoll, AdValueAccNick, AdValueAccTop; |
8 | extern volatile int16_t AdValueAccRoll, AdValueAccNick, AdValueAccTop; |
8 | extern volatile int16_t Current_Nick, Current_Roll, Current_Gier; |
9 | extern volatile int16_t Current_Nick, Current_Roll, Current_Gier; |
9 | extern volatile int16_t Current_AccX, Current_AccY, Current_AccZ; |
10 | extern volatile int16_t Current_AccX, Current_AccY, Current_AccZ; |
10 | extern volatile int32_t Luftdruck; |
11 | extern volatile int32_t Luftdruck; |
11 | extern volatile int8_t messanzahl_Druck; |
12 | extern volatile int8_t messanzahl_Druck; |
12 | extern volatile uint16_t ZaehlMessungen; |
13 | extern volatile uint16_t ZaehlMessungen; |
13 | extern uint8_t DruckOffsetSetting; |
14 | extern uint8_t DruckOffsetSetting; |
14 | extern volatile int16_t HoeheD; |
15 | extern volatile int16_t HoeheD; |
15 | extern volatile uint16_t MessLuftdruck; |
16 | extern volatile uint16_t MessLuftdruck; |
16 | extern volatile int16_t StartLuftdruck; |
17 | extern volatile int16_t StartLuftdruck; |
17 | 18 | ||
18 | void SucheLuftruckOffset(void); |
19 | extern void SucheLuftruckOffset(void); |
19 | 20 | ||
20 | void ADC_Init(void); |
21 | extern void ADC_Init(void); |
21 | 22 | ||
22 | // clear ADC enable & ADC Start Conversion & ADC Interrupt Enable bit |
23 | // clear ADC enable & ADC Start Conversion & ADC Interrupt Enable bit |
23 | #define ADC_Disable() (ADCSRA &= ~((1<<ADEN)|(1<<ADSC)|(1<<ADIE))) |
24 | #define ADC_Disable() (ADCSRA &= ~((1<<ADEN)|(1<<ADSC)|(1<<ADIE))) |
24 | // set ADC enable & ADC Start Conversion & ADC Interrupt Enable bit |
25 | // set ADC enable & ADC Start Conversion & ADC Interrupt Enable bit |
25 | #define ADC_Enable() (ADCSRA |= (1<<ADEN)|(1<<ADSC)|(1<<ADIE)) |
26 | #define ADC_Enable() (ADCSRA |= (1<<ADEN)|(1<<ADSC)|(1<<ADIE)) |
- | 27 | ||
- | 28 | ||
- | 29 | #endif //_ANALOG_H |
|
- | 30 | ||
26 | 31 | ||
27 | 32 |