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