Subversion Repositories MK3Mag

Rev

Rev 18 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef _ANALOG_H_
#define _ANALOG_H_

#include <inttypes.h>
#include <avr/io.h>

#define FLIP_HIGH  PORTD |=  ((1<<PORTD5)|(1<<PORTD6))
#define FLIP_LOW   PORTD &= ~((1<<PORTD5)|(1<<PORTD6))

typedef enum
{
        ADC0 = 0,
        ADC1 = 1,
        ADC2 = 2,
        ADC3 = 3,
        ADC4 = 4,
        ADC5 = 5,
        ADC6 = 6,
        ADC7 = 7,
        REF1V1 = 14,
        AGND = 15
} ADChannel_t;

void ADC_Init(void);
uint16_t ADC_GetValue(ADChannel_t channel);

#endif // _ANALOG_H_