summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2017-04-22 15:45:52 -0600
committerBdale Garbee <bdale@gag.com>2017-04-22 15:45:52 -0600
commit439a51ed503b74c1739cf150cdc91685653deed0 (patch)
treee1ecfd24af85b3386dc8b27e29a7e3e12514a17d /src
parentffc90fa3f932aef4dd85147817949aa9474b6d26 (diff)
enable spi flash on telefiretwo
Diffstat (limited to 'src')
-rw-r--r--src/telefiretwo-v1.0/Makefile2
-rw-r--r--src/telefiretwo-v1.0/ao_pins.h9
-rw-r--r--src/telefiretwo-v1.0/ao_telefiretwo.c2
3 files changed, 13 insertions, 0 deletions
diff --git a/src/telefiretwo-v1.0/Makefile b/src/telefiretwo-v1.0/Makefile
index 927b3a80..f4629599 100644
--- a/src/telefiretwo-v1.0/Makefile
+++ b/src/telefiretwo-v1.0/Makefile
@@ -43,6 +43,8 @@ ALTOS_SRC = \
ao_spi_stm.c \
ao_beep_stm.c \
ao_eeprom_stm.c \
+ ao_storage.c \
+ ao_m25.c \
ao_usb_stm.c \
ao_exti_stm.c \
ao_cc1200.c \
diff --git a/src/telefiretwo-v1.0/ao_pins.h b/src/telefiretwo-v1.0/ao_pins.h
index 8cde0043..aa8501c0 100644
--- a/src/telefiretwo-v1.0/ao_pins.h
+++ b/src/telefiretwo-v1.0/ao_pins.h
@@ -100,6 +100,15 @@
#define FAST_TIMER_FREQ 10000 /* .1ms for debouncing */
/*
+ * SPI Flash memory
+ */
+
+#define M25_MAX_CHIPS 1
+#define AO_M25_SPI_CS_PORT (&stm_gpioa)
+#define AO_M25_SPI_CS_MASK (1 << 15)
+#define AO_M25_SPI_BUS AO_SPI_2_PB13_PB14_PB15
+
+/*
* Radio is a cc1200 connected via SPI
*/
diff --git a/src/telefiretwo-v1.0/ao_telefiretwo.c b/src/telefiretwo-v1.0/ao_telefiretwo.c
index bdcf3213..fa7b7679 100644
--- a/src/telefiretwo-v1.0/ao_telefiretwo.c
+++ b/src/telefiretwo-v1.0/ao_telefiretwo.c
@@ -20,6 +20,7 @@
#include <ao_pad.h>
#include <ao_exti.h>
#include <ao_radio_cmac_cmd.h>
+#include <ao_eeprom.h>
void
main(void)
@@ -40,6 +41,7 @@ main(void)
ao_adc_init();
ao_eeprom_init();
+ ao_storage_init();
ao_radio_init();