From 42d5a324eb673b2214a87c8911d850105c3bdaab Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 10 Jul 2017 11:18:47 -0400 Subject: Start mvoing hardware drivers to /drivers/ (#1433) * start driver isolation * update nyquist and orthodox boards * update atreus62 * move drivers to avr * update avr conditional --- drivers/avr/analog.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 drivers/avr/analog.h (limited to 'drivers/avr/analog.h') diff --git a/drivers/avr/analog.h b/drivers/avr/analog.h new file mode 100644 index 0000000000..8d93de7dc2 --- /dev/null +++ b/drivers/avr/analog.h @@ -0,0 +1,52 @@ +/* Copyright 2015 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef _analog_h_included__ +#define _analog_h_included__ + +#include + +void analogReference(uint8_t mode); +int16_t analogRead(uint8_t pin); +int16_t adc_read(uint8_t mux); + +#define ADC_REF_POWER (1<