Switch from GPLv2 to GPLv2+
[fw/altos] / src / telebt-v1.0 / ao_pins.h
index b248521d7c462da7ebd9c9ec59b06d88ffde7076..ca751be357c21292c49cd0fc4710576e4dbd6977 100644 (file)
@@ -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
 #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