Subversion Repositories FlightCtrl

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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