Subversion Repositories FlightCtrl

Rev

Rev 1877 | Rev 1955 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1877 Rev 1952
Line 239... Line 239...
239
 */
239
 */
240
extern volatile uint8_t analogDataReady;
240
extern volatile uint8_t analogDataReady;
Line 241... Line 241...
241
 
241
 
Line -... Line 242...
-
 
242
void analog_init(void);
242
void analog_init(void);
243
 
-
 
244
/*
243
 
245
 * Start the conversion cycle. It will stop automatically.
Line -... Line 246...
-
 
246
 */
244
// clear ADC enable & ADC Start Conversion & ADC Interrupt Enable bit
247
void startAnalogConversionCycle(void);
-
 
248
 
245
#define analog_stop() (ADCSRA &= ~((1<<ADEN)|(1<<ADSC)|(1<<ADIE)))
249
/*
Line 246... Line 250...
246
 
250
 * Process the sensor data to update the exported variables. Must be called after each measurement cycle and before the data is used.
247
// set ADC enable & ADC Start Conversion & ADC Interrupt Enable bit
251
 */
248
#define analog_start() (ADCSRA |= (1<<ADEN)|(1<<ADSC)|(1<<ADIE))
252
void analog_update(void) {
249
 
253