Subversion Repositories FlightCtrl

Rev

Rev 885 | Rev 903 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
886 killagreg 1
#ifndef _ANALOG_H
2
#define _ANALOG_H
1 ingob 3
 
886 killagreg 4
#include <inttypes.h>
1 ingob 5
 
886 killagreg 6
extern volatile int16_t UBat;
7
extern volatile int16_t AdValueGyrPitch, AdValueGyrRoll, AdValueGyrYaw;
8
extern volatile int16_t AdValueAccRoll, AdValueAccPitch, AdValueAccTop;
9
extern volatile int16_t Current_AccZ;
10
extern volatile int32_t AirPressure;
11
extern volatile uint16_t MeasurementCounter;
12
extern uint8_t PressureSensorOffset;
13
extern volatile int16_t HeightD;
14
extern volatile uint16_t ReadingAirPressure;
15
extern volatile int16_t  StartAirPressure;
1 ingob 16
 
886 killagreg 17
extern void SearchAirPressureOffset(void);
1 ingob 18
 
886 killagreg 19
extern void ADC_Init(void);
1 ingob 20
 
886 killagreg 21
// clear ADC enable & ADC Start Conversion & ADC Interrupt Enable bit
22
#define ADC_Disable() (ADCSRA &= ~((1<<ADEN)|(1<<ADSC)|(1<<ADIE)))
23
// set ADC enable & ADC Start Conversion & ADC Interrupt Enable bit
24
#define ADC_Enable() (ADCSRA |= (1<<ADEN)|(1<<ADSC)|(1<<ADIE))
25
 
26
 
27
#endif //_ANALOG_H
28
 
29