Subversion Repositories MK3Mag

Rev

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

Rev Author Line No. Line
19 killagreg 1
#ifndef _ANALOG_H_
2
#define _ANALOG_H_
1 ingob 3
 
19 killagreg 4
#include <inttypes.h>
5
#include <avr/io.h>
6
 
7
#define FLIP_HIGH  PORTD |=  ((1<<PORTD5)|(1<<PORTD6))
8
#define FLIP_LOW   PORTD &= ~((1<<PORTD5)|(1<<PORTD6))
9
 
10
typedef enum
11
{
12
        ADC0 = 0,
13
        ADC1 = 1,
14
        ADC2 = 2,
15
        ADC3 = 3,
16
        ADC4 = 4,
17
        ADC5 = 5,
18
        ADC6 = 6,
19
        ADC7 = 7,
20
        REF1V1 = 14,
21
        AGND = 15
22
} ADChannel_t;
23
 
24
void ADC_Init(void);
25
uint16_t ADC_GetValue(ADChannel_t channel);
26
 
27
#endif // _ANALOG_H_
28