diff options
author | Keith Packard <keithp@keithp.com> | 2013-03-21 10:16:35 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2018-04-26 19:33:48 -0700 |
commit | f517aa5e042af8dd7fd36be47e4b196f212e79b0 (patch) | |
tree | e220276987ab0cfcff6a7fd20350b8275f4f190e /src | |
parent | e0c969910a516c018e64eaa73cdbe4bc2f979835 (diff) |
altos/fox: Enable M25 driver for MRAM.
The M25 driver can also talk to the MRAM chip, with a few adjustments
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/fox1ihu/Makefile | 4 | ||||
-rw-r--r-- | src/fox1ihu/ao_fox1ihu.c | 6 | ||||
-rw-r--r-- | src/fox1ihu/ao_pins.h | 7 |
3 files changed, 15 insertions, 2 deletions
diff --git a/src/fox1ihu/Makefile b/src/fox1ihu/Makefile index 94315e79..d702cca8 100644 --- a/src/fox1ihu/Makefile +++ b/src/fox1ihu/Makefile @@ -11,6 +11,8 @@ INC = \ ao_arch_funcs.h \ ao_pins.h \ ao_product.h \ + ao_watchdog.h \ + ao_storage.h \ ao_task.h \ stm32l.h \ Makefile @@ -42,6 +44,8 @@ ALTOS_SRC = \ ao_exti_stm.c \ ao_adc_stm.c \ ao_data.c \ + ao_storage.c \ + ao_m25.c \ ao_watchdog.c PRODUCT=Fox1IHU-v1 diff --git a/src/fox1ihu/ao_fox1ihu.c b/src/fox1ihu/ao_fox1ihu.c index 9f7821f7..5bbad328 100644 --- a/src/fox1ihu/ao_fox1ihu.c +++ b/src/fox1ihu/ao_fox1ihu.c @@ -17,8 +17,8 @@ #include <ao.h> #include <ao_exti.h> -#include <ao_packet.h> -#include <ao_send_packet.h> +#include <ao_watchdog.h> +#include <ao_storage.h> int main(void) @@ -44,6 +44,8 @@ main(void) ao_usb_init(); + ao_storage_init(); + ao_watchdog_init(); ao_start_scheduler(); diff --git a/src/fox1ihu/ao_pins.h b/src/fox1ihu/ao_pins.h index e73ef63a..f901a96b 100644 --- a/src/fox1ihu/ao_pins.h +++ b/src/fox1ihu/ao_pins.h @@ -250,4 +250,11 @@ struct ao_adc { #define AO_WATCHDOG_PORT (&stm_gpiod) #define AO_WATCHDOG_BIT 3 +/* MRAM device */ + +#define M25_MAX_CHIPS 1 +#define AO_M25_SPI_CS_PORT (&stm_gpiod) +#define AO_M25_SPI_CS_MASK (1 << 0) +#define AO_M25_SPI_BUS AO_SPI_2_PB13_PB14_PB15 + #endif /* _AO_PINS_H_ */ |