Subversion Repositories FlightCtrl

Rev

Rev 683 | 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 AdValueGyrNick, AdValueGyrRoll, AdValueGyrGier;
extern volatile int16_t AdValueAccRoll, AdValueAccNick, AdValueAccTop;
extern volatile int16_t Current_Nick, Current_Roll, Current_Gier;
extern volatile int16_t Current_AccX, Current_AccY, Current_AccZ;
extern volatile int32_t Luftdruck;
extern volatile int8_t messanzahl_Druck;
extern volatile uint16_t ZaehlMessungen;
extern uint8_t DruckOffsetSetting;
extern volatile int16_t HoeheD;
extern volatile uint16_t MessLuftdruck;
extern volatile int16_t  StartLuftdruck;

extern void SucheLuftruckOffset(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