Rev 273 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 273 | Rev 284 | ||
---|---|---|---|
1 | #ifndef _ANALOG_H |
1 | #ifndef _ANALOG_H |
2 | #define _ANALOG_H |
2 | #define _ANALOG_H |
3 | 3 | ||
4 | #include <inttypes.h> |
4 | #include <inttypes.h> |
5 | 5 | ||
6 | extern volatile int16_t Adc0, Adc1, Adc2, Adc3, Adc4, Adc5, Adc6, Adc7; |
6 | extern volatile uint16_t Adc0, Adc1, Adc2, Adc3, Adc4, Adc5, Adc6, Adc7; |
7 | extern volatile uint8_t ADReady; |
7 | extern volatile uint8_t ADReady; |
8 | 8 | ||
9 | void ADC_Init(void); |
9 | void ADC_Init(void); |
10 | 10 | ||
11 | 11 | ||
12 | // clear ADC enable & ADC Start Conversion & ADC Interrupt Enable bit |
12 | // clear ADC enable & ADC Start Conversion & ADC Interrupt Enable bit |
13 | #define ADC_Disable() (ADCSRA &= ~((1<<ADEN)|(1<<ADSC)|(1<<ADIE))) |
13 | #define ADC_Disable() (ADCSRA &= ~((1<<ADEN)|(1<<ADSC)|(1<<ADIE))) |
14 | // set ADC enable & ADC Start Conversion & ADC Interrupt Enable bit |
14 | // set ADC enable & ADC Start Conversion & ADC Interrupt Enable bit |
15 | #define ADC_Enable() (ADCSRA |= (1<<ADEN)|(1<<ADSC)|(1<<ADIE)) |
15 | #define ADC_Enable() (ADCSRA |= (1<<ADEN)|(1<<ADSC)|(1<<ADIE)) |
16 | 16 | ||
17 | 17 | ||
18 | #endif //_ANALOG_H |
18 | #endif //_ANALOG_H |
19 | 19 | ||
20 | 20 | ||
21 | 21 |