altos: Add preliminary telebt v0.1 defines
authorKeith Packard <keithp@keithp.com>
Fri, 6 May 2011 22:44:56 +0000 (15:44 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 6 May 2011 22:44:56 +0000 (15:44 -0700)
This should make the telebt v0.1 binary that works on the real hardware.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/Makefile.proto
src/ao_log_telem.c [new file with mode: 0644]
src/ao_pins.h
src/ao_telebt.c
src/telebt-v0.1/.gitignore [new file with mode: 0644]
src/telebt-v0.1/.sdcdbrc [new file with mode: 0644]
src/telebt-v0.1/Makefile [new file with mode: 0644]
src/telebt-v0.1/Makefile.defs [new file with mode: 0644]

index ca68edbcba016322c3f80db92f8ac8fbe489c32f..04b708b2e46f7ca64d674d6d97b54ec44960011b 100644 (file)
@@ -238,7 +238,7 @@ TNANO_BASE_SRC = \
        $(TNANO_MAIN_SRC)
 
 #
-# Sources for TeleDongle
+# Sources for TeleBluetooth
 #
 
 TBT_MAIN_SRC = \
@@ -255,6 +255,12 @@ TBT_BASE_SRC = \
        $(DBG_SRC) \
        $(TBT_MAIN_SRC)
 
+TBT_V_0_1_SRC = \
+       $(TBT_BASE_SRC) \
+       $(SPI_DRIVER_SRC) \
+       $(M25_DRIVER_SRC) \
+       ao_log_telem.c
+
 #
 # TI Dongle sources
 #
diff --git a/src/ao_log_telem.c b/src/ao_log_telem.c
new file mode 100644 (file)
index 0000000..1b472ef
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright © 2011 Keith Packard <keithp@keithp.com>
+ *
+ * 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.
+ *
+ * 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, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+#include "ao.h"
+
+void
+ao_log_write_erase(uint8_t pos)
+{
+       (void) pos;
+}
+
+uint8_t
+ao_log_present(void)
+{
+       return 0;
+}
index 324d78273daaca46c9900446ade5299a1a5d2ed8..bc9bdcb9ce03cc3c91beb49512749f646980b7e9 100644 (file)
        #define HAS_IGNITE              0
 #endif
 
+#if defined(TELEBT_V_0_1)
+       #define HAS_FLIGHT              0
+       #define HAS_USB                 1
+       #define HAS_BEEP                0
+       #define HAS_SERIAL_1            1
+       #define USE_SERIAL_STDIN        1
+       #define HAS_ADC                 0
+       #define HAS_DBG                 1
+       #define HAS_EEPROM              1
+       #define USE_INTERNAL_FLASH      0
+       #define HAS_BTM                 1
+       #define DBG_ON_P1               1
+       #define DBG_ON_P0               0
+       #define IGNITE_ON_P2            0
+       #define IGNITE_ON_P0            0
+       #define PACKET_HAS_MASTER       1
+       #define PACKET_HAS_SLAVE        0
+       #define AO_LED_RED              1
+       #define AO_LED_GREEN            2
+       #define LEDS_AVAILABLE          (AO_LED_RED|AO_LED_GREEN)
+       #define SPI_CS_ON_P1            1
+       #define SPI_CS_ON_P0            0
+       #define M25_CS_MASK             0x04    /* CS0 is P1_2 */
+       #define M25_MAX_CHIPS           1
+       #define HAS_ACCEL               0
+       #define HAS_IGNITE              0
+#endif
+
 #if DBG_ON_P1
 
        #define DBG_CLOCK       (1 << 4)        /* mi0 */
index 295f0cec8e3d30accce1fc58dd2d050c5582245b..34d4432d9c90d4500451a70a1096bc47a93dd180 100644 (file)
@@ -27,6 +27,10 @@ main(void)
        ao_led_on(AO_LED_RED);
        ao_timer_init();
        ao_cmd_init();
+#if HAS_EEPROM
+       ao_spi_init();
+       ao_storage_init();
+#endif
        ao_usb_init();
        ao_monitor_init(AO_LED_GREEN, TRUE);
        ao_rssi_init(AO_LED_RED);
diff --git a/src/telebt-v0.1/.gitignore b/src/telebt-v0.1/.gitignore
new file mode 100644 (file)
index 0000000..1acfbfc
--- /dev/null
@@ -0,0 +1,2 @@
+telebt-*
+ao_product.h
diff --git a/src/telebt-v0.1/.sdcdbrc b/src/telebt-v0.1/.sdcdbrc
new file mode 100644 (file)
index 0000000..710b4a2
--- /dev/null
@@ -0,0 +1 @@
+--directory=..
diff --git a/src/telebt-v0.1/Makefile b/src/telebt-v0.1/Makefile
new file mode 100644 (file)
index 0000000..d8867b1
--- /dev/null
@@ -0,0 +1 @@
+include ../Makefile.proto
diff --git a/src/telebt-v0.1/Makefile.defs b/src/telebt-v0.1/Makefile.defs
new file mode 100644 (file)
index 0000000..50657c8
--- /dev/null
@@ -0,0 +1,8 @@
+PROG = telebt-v0.1-$(VERSION).ihx
+
+SRC = \
+       $(TBT_V_0_1_SRC)
+
+PRODUCT=TeleBT-v0.1
+PRODUCT_DEF=-DTELEBT_V_0_1
+IDPRODUCT=0x000e