The M25 driver can also talk to the MRAM chip, with a few adjustments
Signed-off-by: Keith Packard <keithp@keithp.com>
ao_arch_funcs.h \
ao_pins.h \
ao_product.h \
+ ao_watchdog.h \
+ ao_storage.h \
ao_task.h \
stm32l.h \
Makefile
ao_exti_stm.c \
ao_adc_stm.c \
ao_data.c \
+ ao_storage.c \
+ ao_m25.c \
ao_watchdog.c
PRODUCT=Fox1IHU-v1
#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)
ao_usb_init();
+ ao_storage_init();
+
ao_watchdog_init();
ao_start_scheduler();
#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_ */