X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Ftelebt-v1.0%2Fao_pins.h;h=ca751be357c21292c49cd0fc4710576e4dbd6977;hp=b248521d7c462da7ebd9c9ec59b06d88ffde7076;hb=1085ec5d57e0ed5d132f2bbdac1a0b6a32c0ab4a;hpb=1d3ab47d82fe005ab6854386c0ffa5771ee49bf6 diff --git a/src/telebt-v1.0/ao_pins.h b/src/telebt-v1.0/ao_pins.h index b248521d..ca751be3 100644 --- a/src/telebt-v1.0/ao_pins.h +++ b/src/telebt-v1.0/ao_pins.h @@ -3,7 +3,8 @@ * * 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; version 2 of the License. + * 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 @@ -28,7 +29,6 @@ #define HAS_SERIAL_1_HW_FLOW 1 #define USE_SERIAL_1_STDIN 1 #define DELAY_SERIAL_1_STDIN 1 -#define HAS_ADC 0 #define HAS_DBG 1 #define HAS_EEPROM 0 #define HAS_LOG 0 @@ -49,6 +49,21 @@ #define BT_LINK_PIN P1_7 #define HAS_MONITOR 1 #define LEGACY_MONITOR 0 +#define HAS_TELEMETRY 0 +#define AO_RADIO_REG_TEST 1 + +#define HAS_ADC 1 +#define AO_PAD_ADC_BATT 0 +#define AO_ADC_PINS (1 << AO_PAD_ADC_BATT) + +struct ao_adc { + int16_t batt; +}; + +#define AO_ADC_DUMP(p) \ + printf ("tick: %5u batt %5d\n", \ + (p)->tick, \ + (p)->adc.batt) #if DBG_ON_P1