Subversion Repositories FlightCtrl

Rev

Rev 685 | Blame | Last modification | View Log | RSS feed

#ifndef _ANALOG_H
#define _ANALOG_H

#include <inttypes.h>

extern volatile int16_t UBat;
extern volatile int16_t AdValueGyrPitch, AdValueGyrRoll, AdValueGyrYaw;
extern volatile int16_t AdValueAccRoll, AdValueAccPitch, AdValueAccTop;
extern volatile int16_t Current_Pitch, Current_Roll, Current_Yaw;
extern volatile int16_t Current_AccX, Current_AccY, Current_AccZ;
extern volatile int32_t AirPressure;
extern volatile int8_t messanzahl_Druck;
extern volatile uint16_t ZaehlMessungen;
extern uint8_t DruckOffsetSetting;
extern volatile int16_t HoeheD;
extern volatile uint16_t ReadingAirPressure;
extern volatile int16_t  StartAirPressure;

extern void SearchAirPressureOffset(void);

extern void ADC_Init(void);

// clear ADC enable & ADC Start Conversion & ADC Interrupt Enable bit
#define ADC_Disable() (ADCSRA &= ~((1<<ADEN)|(1<<ADSC)|(1<<ADIE)))
// set ADC enable & ADC Start Conversion & ADC Interrupt Enable bit
#define ADC_Enable() (ADCSRA |= (1<<ADEN)|(1<<ADSC)|(1<<ADIE))


#endif //_ANALOG_H