Atmel Software Framework

adc_example3.c File Reference

AVR XMEGA Analog to Digital Converter Driver Example 3.

Copyright (c) 2011-2015 Atmel Corporation. All rights reserved.

#include <asf.h>
#include <string.h>

Functions

static void adc_handler (ADC_t *adc, uint8_t ch_mask, adc_result_t result)
 Callback function for ADC interrupts. More...
 
int main (void)
 ADC Example 3 main application function. More...
 

Variables

static volatile int16_t adc_scan_results [8]
 
static volatile double vcc_voltage
 The last measured voltage on the board. More...
 

static void adc_handler ( ADC_t *  adc,
uint8_t  ch_mask,
adc_result_t  result 
)
static

Callback function for ADC interrupts.

Parameters
adcPointer to ADC module.
channelADC channel number.
resultConversion result from ADC channel.

References ADC_CH0, adc_scan_results, and result.

volatile int16_t adc_scan_results[8]
static

Referenced by adc_handler().

volatile double vcc_voltage
static

The last measured voltage on the board.