Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1951 → Rev 1952

/branches/dongfang_FC_rewrite/analog.h
241,11 → 241,15
 
void analog_init(void);
 
// clear ADC enable & ADC Start Conversion & ADC Interrupt Enable bit
#define analog_stop() (ADCSRA &= ~((1<<ADEN)|(1<<ADSC)|(1<<ADIE)))
/*
* Start the conversion cycle. It will stop automatically.
*/
void startAnalogConversionCycle(void);
 
// set ADC enable & ADC Start Conversion & ADC Interrupt Enable bit
#define analog_start() (ADCSRA |= (1<<ADEN)|(1<<ADSC)|(1<<ADIE))
/*
* Process the sensor data to update the exported variables. Must be called after each measurement cycle and before the data is used.
*/
void analog_update(void) {
 
/*
* "Warm" calibration: Zero-offset gyros.