Rev 1179 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1179 | Rev 1180 | ||
---|---|---|---|
1 | #ifndef _ANALOG_H |
1 | #ifndef _ANALOG_H |
2 | #define _ANALOG_H |
2 | #define _ANALOG_H |
3 | 3 | ||
4 | #include <inttypes.h> |
4 | #include <inttypes.h> |
- | 5 | ||
5 | 6 | extern volatile uint16_t MeasurementCounter; |
|
6 | extern volatile int16_t UBat; |
7 | extern volatile int16_t UBat; |
- | 8 | extern volatile int16_t AdValueGyroNick, AdValueGyroRoll, AdValueGyroYaw; |
|
7 | extern volatile int16_t AdValueGyrNick, AdValueGyrRoll, AdValueGyrYaw; |
9 | #define HIRES_GYRO_AMPLIFY 8 // the offset corrected HiResGyro values are a factor of 8 scaled to the AdValues |
8 | extern uint8_t AnalogOffsetNick, AnalogOffsetRoll, AnalogOffsetYaw; |
10 | extern volatile int16_t HiResGyroNick, HiResGyroRoll; |
9 | extern volatile int16_t AdValueAccRoll, AdValueAccNick, AdValueAccTop; |
11 | extern volatile int16_t FilterHiResGyroNick, FilterHiResGyroRoll; |
10 | extern volatile int16_t Current_AccZ; |
12 | extern volatile int16_t AdValueAccRoll, AdValueAccNick, AdValueAccTop, AdValueAccZ; |
11 | extern volatile int32_t AirPressure; |
- | |
12 | extern volatile uint16_t MeasurementCounter; |
- | |
13 | extern int8_t ExpandBaro; |
- | |
14 | extern uint8_t PressureSensorOffset; |
13 | extern volatile int32_t AirPressure; |
15 | extern volatile int16_t HeightD; |
14 | extern volatile int16_t HeightD; |
16 | extern volatile uint16_t ReadingAirPressure; |
15 | extern volatile uint16_t ReadingAirPressure; |
- | 16 | extern volatile int16_t StartAirPressure; |
|
- | 17 | extern volatile uint8_t ADReady; |
|
- | 18 | ||
- | 19 | extern uint8_t DacOffsetGyroNick, DacOffsetGyroRoll, DacOffsetGyroYaw; |
|
- | 20 | extern uint8_t PressureSensorOffset; |
|
- | 21 | extern int8_t ExpandBaro; |
|
17 | extern volatile int16_t StartAirPressure; |
22 | |
18 | 23 | ||
19 | void SearchAirPressureOffset(void); |
24 | void SearchAirPressureOffset(void); |
- | 25 | void SearchDacGyroOffset(void); |
|
20 | void SearchGyroOffset(void); |
26 | void ADC_Init(void); |
21 | void ADC_Init(void); |
27 | |
22 | 28 | ||
23 | // clear ADC enable & ADC Start Conversion & ADC Interrupt Enable bit |
29 | // clear ADC enable & ADC Start Conversion & ADC Interrupt Enable bit |
24 | #define ADC_Disable() (ADCSRA &= ~((1<<ADEN)|(1<<ADSC)|(1<<ADIE))) |
30 | #define ADC_Disable() (ADCSRA &= ~((1<<ADEN)|(1<<ADSC)|(1<<ADIE))) |
25 | // set ADC enable & ADC Start Conversion & ADC Interrupt Enable bit |
31 | // set ADC enable & ADC Start Conversion & ADC Interrupt Enable bit |
26 | #define ADC_Enable() (ADCSRA |= (1<<ADEN)|(1<<ADSC)|(1<<ADIE)) |
32 | #define ADC_Enable() (ADCSRA |= (1<<ADEN)|(1<<ADSC)|(1<<ADIE)) |
27 | 33 | ||
28 | 34 | ||
29 | #endif //_ANALOG_H |
35 | #endif //_ANALOG_H |
30 | 36 | ||
31 | 37 | ||
32 | 38 |