Subversion Repositories MK3Mag

Rev

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

Rev 1 Rev 32
Line -... Line 1...
-
 
1
#ifndef _ANALOG_H_
-
 
2
#define _ANALOG_H_
-
 
3
 
-
 
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
 
-
 
25
#define MAG_X ADC0
-
 
26
#define MAG_Y ADC1
-
 
27
#define MAG_Z ADC7
-
 
28
#define ACC_X ADC2
-
 
29
#define ACC_Y ADC3
-
 
30
#define ACC_Z ADC6
-
 
31
 
-
 
32
 
-
 
33
extern uint8_t AccPresent;
-
 
34
 
-
 
35
void ADC_Init(void);
-
 
36
uint16_t ADC_GetValue(ADChannel_t channel);
-
 
37
 
-
 
38
#endif // _ANALOG_H_
Line 1... Line -...
1
 
-
 
2
extern void ADC_Init(void);
-
 
3
extern void GetAnalogWerte(void);
-
 
4
extern void AdConvert(void);
-
 
5
extern void FastADConvert(void);
-