summaryrefslogtreecommitdiff
path: root/src/megametrum-v0.1
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-05-18 20:16:35 -0700
committerKeith Packard <keithp@keithp.com>2012-05-18 20:19:01 -0700
commit34bb17bc1a3d8a1c95b5e57f059e7a1747e17a03 (patch)
treef0b1b2ae323316d1a495daecfa913078734c6c35 /src/megametrum-v0.1
parent5d8b9d524d6424ff98dcc4155fe8b8bd892b6d8f (diff)
altos: Finish ms5607 support
This has the MS5607 polling once each tick for pressure and temperature and then saving that in a global variable. The command UI provides for dumping the prom data so that an eeprom file can have raw sensor data along with the conversion factors necessary to compute useful values. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/megametrum-v0.1')
-rw-r--r--src/megametrum-v0.1/Makefile3
-rw-r--r--src/megametrum-v0.1/ao_pins.h7
2 files changed, 7 insertions, 3 deletions
diff --git a/src/megametrum-v0.1/Makefile b/src/megametrum-v0.1/Makefile
index 437e1a9e..6524d8b8 100644
--- a/src/megametrum-v0.1/Makefile
+++ b/src/megametrum-v0.1/Makefile
@@ -50,7 +50,8 @@ ALTOS_SRC = \
ao_packet_slave.c \
ao_i2c_stm.c \
ao_hmc5883.c \
- ao_mpu6000.c
+ ao_mpu6000.c \
+ ao_convert_pa.c
PRODUCT=MegaMetrum-v0.1
PRODUCT_DEF=-DMEGAMETRUM
diff --git a/src/megametrum-v0.1/ao_pins.h b/src/megametrum-v0.1/ao_pins.h
index cd270739..adc56151 100644
--- a/src/megametrum-v0.1/ao_pins.h
+++ b/src/megametrum-v0.1/ao_pins.h
@@ -182,6 +182,9 @@ struct ao_adc {
#define AO_MS5607_CS_GPIO stm_gpioc
#define AO_MS5607_CS 4
#define AO_MS5607_CS_MASK (1 << AO_MS5607_CS)
+#define AO_MS5607_MISO_GPIO stm_gpioa
+#define AO_MS5607_MISO 6
+#define AO_MS5607_MISO_MASK (1 << AO_MS5607_MISO)
#define AO_MS5607_SPI_INDEX (STM_SPI_INDEX(1))
/*
@@ -212,7 +215,7 @@ struct ao_adc {
#define AO_HMC5883_INT_PORT stm_gpioc
#define AO_HMC5883_INT_PIN 12
-#define AO_HMC5883_I2C_INDEX STM_SPI_INDEX(1)
+#define AO_HMC5883_I2C_INDEX STM_I2C_INDEX(1)
/*
* mpu6000
@@ -220,6 +223,6 @@ struct ao_adc {
#define AO_MPU6000_INT_PORT stm_gpioc
#define AO_MPU6000_INT_PIN 13
-#define AO_MPU6000_I2C_INDEX STM_SPI_INDEX(1)
+#define AO_MPU6000_I2C_INDEX STM_I2C_INDEX(1)
#endif /* _AO_PINS_H_ */