From 439a51ed503b74c1739cf150cdc91685653deed0 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sat, 22 Apr 2017 15:45:52 -0600 Subject: [PATCH] enable spi flash on telefiretwo --- src/telefiretwo-v1.0/Makefile | 2 ++ src/telefiretwo-v1.0/ao_pins.h | 9 +++++++++ src/telefiretwo-v1.0/ao_telefiretwo.c | 2 ++ 3 files changed, 13 insertions(+) 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 @@ -99,6 +99,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 #include #include +#include void main(void) @@ -40,6 +41,7 @@ main(void) ao_adc_init(); ao_eeprom_init(); + ao_storage_init(); ao_radio_init(); -- 2.30.2