Rev 750 |
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_AccX, Current_AccY, Current_AccZ;
extern volatile int32_t AirPressure;
extern volatile uint16_t MeasurementCounter;
extern uint8_t PressureSensorOffset;
extern volatile int16_t HeightD;
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