summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-05-06 15:44:56 -0700
committerKeith Packard <keithp@keithp.com>2011-05-06 15:44:56 -0700
commitc1760cebd47d0f03808f3204c0fcb1183f754e50 (patch)
treecdc0517b800da41923b5bf8f8b625fd8b64a1bfc /src
parent72a03baa73698fc1213a74320e6253c2380dd8fa (diff)
altos: Add preliminary telebt v0.1 defines
This should make the telebt v0.1 binary that works on the real hardware. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.proto8
-rw-r--r--src/ao_log_telem.c30
-rw-r--r--src/ao_pins.h28
-rw-r--r--src/ao_telebt.c4
-rw-r--r--src/telebt-v0.1/.gitignore2
-rw-r--r--src/telebt-v0.1/.sdcdbrc1
-rw-r--r--src/telebt-v0.1/Makefile1
-rw-r--r--src/telebt-v0.1/Makefile.defs8
8 files changed, 81 insertions, 1 deletions
diff --git a/src/Makefile.proto b/src/Makefile.proto
index ca68edbc..04b708b2 100644
--- a/src/Makefile.proto
+++ b/src/Makefile.proto
@@ -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
index 00000000..1b472efe
--- /dev/null
+++ b/src/ao_log_telem.c
@@ -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;
+}
diff --git a/src/ao_pins.h b/src/ao_pins.h
index 324d7827..bc9bdcb9 100644
--- a/src/ao_pins.h
+++ b/src/ao_pins.h
@@ -243,6 +243,34 @@
#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 */
diff --git a/src/ao_telebt.c b/src/ao_telebt.c
index 295f0cec..34d4432d 100644
--- a/src/ao_telebt.c
+++ b/src/ao_telebt.c
@@ -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
index 00000000..1acfbfcc
--- /dev/null
+++ b/src/telebt-v0.1/.gitignore
@@ -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
index 00000000..710b4a2f
--- /dev/null
+++ b/src/telebt-v0.1/.sdcdbrc
@@ -0,0 +1 @@
+--directory=..
diff --git a/src/telebt-v0.1/Makefile b/src/telebt-v0.1/Makefile
new file mode 100644
index 00000000..d8867b19
--- /dev/null
+++ b/src/telebt-v0.1/Makefile
@@ -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
index 00000000..50657c83
--- /dev/null
+++ b/src/telebt-v0.1/Makefile.defs
@@ -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