ATMEL: adc_drv.h File Reference

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

# adc_drv.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Defines

#define | ADHSM 7
#define | Enable_adc() (ADCSRA |= (1<<ADEN))
#define | Right_adjust_adc_result() (ADMUX &= ~(1<<ADLAR))
#define | Left_adjust_adc_result() (ADMUX |= (1<<ADLAR))
#define | Enable_adc_high_speed_mode() (ADCSRB |= (1<<ADHSM))
#define | Disable_adc_high_speed_mode() (ADCSRB &= ~(1<<ADHSM))
#define | Enable_internal_vref() (ADMUX |= ((1<<REFS1)|(1<<REFS0)) )
#define | Enable_external_vref() (ADMUX &= ~((1<<REFS1)|(1<<REFS0)) )
#define | Enable_vcc_vref()
#define | Enable_all_it() (SREG |= (0x80) )
#define | Disable_all_it() (SREG &= ~(0x80) )
#define | Enable_adc_it() (ADCSRA |= (1<<ADIE) )
#define | Disable_adc_it() (ADCSRA &= ~(1<<ADIE) )
#define | Clear_adc_flag() (ADCSRA &= (1<<ADIF) )
#define | Set_prescaler(prescaler)
#define | Clear_adc_mux() (ADMUX &= ~((1<<MUX3)|(1<<MUX2)|(1<<MUX1)|(1<<MUX0)) )
#define | Select_adc_channel(channel) (Clear_adc_mux(), ADMUX |= (channel) )
#define | Start_conv() (ADCSRA |= (1<<ADSC) )
#define | Start_conv_channel(channel) (Select_adc_channel(channel), Start_conv() )
#define | Start_amplified_conv() (ADCSRB |= (1<<ADASCR) )
#define | Stop_amplified_conv() (ADCSRB &= ~(1<<ADASCR) )
#define | Start_amplified_conv_channel(channel) (Select_adc_channel(channel), Start_amplified_conv() )
#define | Start_conv_idle() (SMCR |= (1<<SM0)|(1<<SE) )
#define | Start_conv_idle_channel(channel) (Select_adc_channel(channel), Start_conv_idle() )
#define | Clear_sleep_mode() (SMCR &= ~(1<<SM0)|(1<<SE) )
#define | Adc_get_8_bits_result() ((U8)(ADCH))
#define | Adc_get_10_bits_result() ((U16)(ADCL+((U16)(ADCH<<8))))
#define | Disable_adc() (ADCSRA &= ~(1<<ADEN))
#define | Is_adc_conv_finished() ((ADCSRA & (1<<ADIF)) ? TRUE : FALSE)
#define | Is_adc_conv_not_finished() ((ADCSRA | ~(1<<ADIF)) ? TRUE : FALSE)

## Functions

void | init_adc (void)
| Configures the ADC accordingly to the ADC Define Configuration values.

## Detailed Description

This file contains the low level macros and definition for the ADC - Compiler: IAR EWAVR and GNU GCC for AVR

- Supported devices: AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
  Author:
    Atmel Corporation: http://www.atmel.com
    Support and FAQ: http://support.atmel.no/

Definition in file adc_drv.h.

## Define Documentation

#define ADHSM 7

Definition at line 47 of file adc_drv.h.