Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 426 → Rev 434

/FollowMe/trunk/analog.c
2,8 → 2,8
#include <stdlib.h>
#include <avr/io.h>
#include <avr/interrupt.h>
 
#include "analog.h"
#include "printf_P.h"
 
volatile uint16_t Adc0, Adc1, Adc2, Adc3, Adc4, Adc5, Adc6, Adc7;
volatile uint8_t ADReady = 1;
14,6 → 14,7
void ADC_Init(void)
{
uint8_t sreg = SREG;
printf("\r\n ADC init...");
// disable all interrupts before reconfiguration
cli();
//ADC0 ... ADC7 is connected to PortA pin 0 ... 7
36,6 → 37,8
ADC_Enable();
// restore global interrupt flags
SREG = sreg;
sei();
printf("ok");
}
 
/*****************************************************/