summaryrefslogtreecommitdiff
path: root/src/megametrum-v0.1
diff options
context:
space:
mode:
Diffstat (limited to 'src/megametrum-v0.1')
-rw-r--r--src/megametrum-v0.1/Makefile2
-rw-r--r--src/megametrum-v0.1/ao_megametrum.c4
-rw-r--r--src/megametrum-v0.1/ao_pins.h9
3 files changed, 15 insertions, 0 deletions
diff --git a/src/megametrum-v0.1/Makefile b/src/megametrum-v0.1/Makefile
index 4a4c983a..1dfebca0 100644
--- a/src/megametrum-v0.1/Makefile
+++ b/src/megametrum-v0.1/Makefile
@@ -19,6 +19,7 @@ INC = \
ao_ms5607.h \
ao_hmc5883.h \
ao_mpu6000.h \
+ ao_mma655x.h \
ao_cc1120_CC1120.h \
ao_profile.h \
ao_whiten.h \
@@ -56,6 +57,7 @@ ALTOS_SRC = \
ao_fec_tx.c \
ao_fec_rx.c \
ao_ms5607.c \
+ ao_mma655x.c \
ao_adc_stm.c \
ao_beep_stm.c \
ao_storage.c \
diff --git a/src/megametrum-v0.1/ao_megametrum.c b/src/megametrum-v0.1/ao_megametrum.c
index 55324514..d3ae4690 100644
--- a/src/megametrum-v0.1/ao_megametrum.c
+++ b/src/megametrum-v0.1/ao_megametrum.c
@@ -18,6 +18,7 @@
#include <ao.h>
#include <ao_hmc5883.h>
#include <ao_mpu6000.h>
+#include <ao_mma655x.h>
#include <ao_log.h>
#include <ao_exti.h>
#include <ao_packet.h>
@@ -53,6 +54,9 @@ main(void)
#if HAS_MPU6000
ao_mpu6000_init();
#endif
+#if HAS_MMA655X
+ ao_mma655x_init();
+#endif
ao_storage_init();
diff --git a/src/megametrum-v0.1/ao_pins.h b/src/megametrum-v0.1/ao_pins.h
index 42715968..6256d2f6 100644
--- a/src/megametrum-v0.1/ao_pins.h
+++ b/src/megametrum-v0.1/ao_pins.h
@@ -305,6 +305,15 @@ struct ao_adc {
#define HAS_HIGHG_ACCEL 0
+/*
+ * mma655x
+ */
+
+#define HAS_MMA655X 1
+#define AO_MMA655X_SPI_INDEX AO_SPI_1_PA5_PA6_PA7
+#define AO_MMA655X_CS_GPIO (&stm_gpiod)
+#define AO_MMA655X_CS 4
+
#define NUM_CMDS 16
/*