/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. See the file COPYING * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Copyright (C) 2010 Frank van Maarseveen */ #ifndef _ADC_H_ #define _ADC_H_ void adc_init(void); __attribute__((always_inline)) static inline void adc_start(void) { BIT_SET(ADCSRA, ADSC); } /* * Callbacks in interrupt context, implemented outside adc.c */ void adc_iled(uint16_t value); void adc_vbat(uint16_t value); void adc_temp(uint16_t value); void adc_cleanup(void); #endif