Atmel Software Framework

adc_example1_gfx.c File Reference

AVR XMEGA Analog to Digital Converter Driver Example 1.

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

#include <asf.h>
#include <stdio.h>
#include <conf_example.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)
 

Variables

static volatile int16_t last_temperature
 The latest, computed temperature. 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.
ch_maskADC channel mask.
resultConversion result from ADC channel.

References adc_start_conversion(), gfx_mono_draw_filled_rect, gfx_mono_draw_string(), GFX_PIXEL_CLR, last_temperature, and sysfont.

volatile int16_t last_temperature
static

The latest, computed temperature.

Referenced by adc_handler().