This just uses the TeleMini bits, which should work fine for now.
Signed-off-by: Keith Packard <keithp@keithp.com>
SUBDIRS=\
telemetrum-v1.1 telemetrum-v1.0 \
teledongle-v0.2 teledongle-v0.1 \
- telemini-v0.1 \
+ telemini-v0.1 telenano-v0.1 \
telemetrum-v0.1-sky telemetrum-v0.1-sirf \
tidongle test
$(TMINI_TASK_SRC) \
$(TMINI_MAIN_SRC)
+#
+# Sources for TeleNano
+TNANO_DRIVER_SRC = \
+ ao_adc.c \
+ ao_ignite.c \
+ ao_config.c \
+ ao_storage.c \
+ ao_intflash.c
+
+TNANO_TASK_SRC = \
+ ao_flight.c \
+ ao_log.c \
+ ao_log_tiny.c \
+ ao_report.c \
+ ao_telemetry.c
+
+TNANO_MAIN_SRC = \
+ ao_telemini.c
+
+TNANO_BASE_SRC = \
+ $(ALTOS_SRC) \
+ $(ALTOS_DRIVER_SRC) \
+ $(TELE_DRIVER_SRC) \
+ $(TELE_COMMON_SRC) \
+ $(TNANO_DRIVER_SRC) \
+ $(TNANO_TASK_SRC) \
+ $(TNANO_MAIN_SRC)
+
+#
+# TI Dongle sources
+#
TI_MAIN_SRC = \
ao_tidongle.c
#if HAS_ACCEL_REF
ADCCON3 = ADCCON3_EREF_VDD | ADCCON3_EDIV_512 | 2;
#else
+# ifdef TELENANO_V_0_1
+ ADCCON3 = ADCCON3_EREF_VDD | ADCCON3_EDIV_512 | 1;
+# else
ADCCON3 = ADCCON3_EREF_VDD | ADCCON3_EDIV_512 | 0;
+# endif
#endif
}
a = (uint8_t __xdata *) (&ao_adc_ring[ao_adc_head].accel + sequence);
sequence++;
}
+#define GOT_ADC
a[0] = ADCL;
a[1] = ADCH;
if (sequence < 6) {
#if IGNITE_ON_P0
/* TeleMini readings */
a = (uint8_t __xdata *) (&ao_adc_ring[ao_adc_head].pres);
+#ifdef TELEMINI_V_0_1
switch (sequence) {
case 0:
/* pressure */
sequence = 0;
break;
}
+#define GOT_ADC
+#endif
+#ifdef TELENANO_V_0_1
+ switch (sequence) {
+ case 1:
+ /* pressure */
+ a += 0;
+ sequence = ADCCON3_EREF_VDD | ADCCON3_EDIV_512 | 3;
+ break;
+ case 3:
+ /* battery */
+ a += 4;
+ sequence = ADCCON3_EREF_1_25 | ADCCON3_EDIV_512 | ADCCON3_ECH_TEMP;
+ break;
+ case ADCCON3_ECH_TEMP:
+ a += 2;
+ sequence = 0;
+ break;
+ }
+#define GOT_ADC
+#endif
a[0] = ADCL;
a[1] = ADCH;
if (sequence) {
/* Start next conversion */
ADCCON3 = sequence;
}
+#endif
+#ifndef GOT_ADC
+#error No known ADC configuration set
#endif
else {
#define HAS_ACCEL 0
#endif
+#if defined(TELENANO_V_0_1)
+ #define HAS_FLIGHT 1
+ #define HAS_USB 0
+ #define HAS_BEEP 0
+ #define HAS_GPS 0
+ #define HAS_SERIAL_1 0
+ #define HAS_ADC 1
+ #define HAS_EEPROM 1
+ #define HAS_DBG 0
+ #define USE_KALMAN 1
+ #define IGNITE_ON_P2 0
+ #define IGNITE_ON_P0 1
+ #define PACKET_HAS_MASTER 0
+ #define PACKET_HAS_SLAVE 1
+
+ #define AO_LED_GREEN 1
+ #define AO_LED_RED 2
+ #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
+ #define HAS_EXTERNAL_TEMP 0
+ #define HAS_ACCEL 0
+#endif
+
#if defined(TELEMETRUM_V_0_1)
#define HAS_FLIGHT 1
#define HAS_USB 1
--- /dev/null
+telenano-*
+ao_product.h
--- /dev/null
+--directory=..
--- /dev/null
+include ../Makefile.proto
--- /dev/null
+PROG = telenano-v0.1-$(VERSION).ihx
+
+SRC = \
+ $(TNANO_BASE_SRC)
+
+PRODUCT=TeleNano-v0.1
+PRODUCT_DEF=-DTELENANO_V_0_1
+IDPRODUCT=0x000a
+CODESIZE=0x6700