From 97442e7faaed76d0da347c96df3da2122e033bd1 Mon Sep 17 00:00:00 2001 From: Theodore Ateba Date: Sun, 15 Oct 2017 21:37:33 +0000 Subject: Update EX/BMP085 example according to the BMP085 driver modification. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10831 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- testex/STM32/STM32F4xx/I2C-BMP085/main.c | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) (limited to 'testex/STM32') diff --git a/testex/STM32/STM32F4xx/I2C-BMP085/main.c b/testex/STM32/STM32F4xx/I2C-BMP085/main.c index fc9c4a8d3..5f2b657dc 100644 --- a/testex/STM32/STM32F4xx/I2C-BMP085/main.c +++ b/testex/STM32/STM32F4xx/I2C-BMP085/main.c @@ -31,9 +31,6 @@ /* Variables and Driver configuration for the demo. */ /*==========================================================================*/ -/* Use to write to the serial driver */ -//static BaseSequentialStream *chp = (BaseSequentialStream*) &SD2; - /* BMP085 Driver: This object represent an BMP085 instance. */ static BMP085Driver BMP085D1; @@ -54,30 +51,21 @@ static const I2CConfig i2cConfig = { FAST_DUTY_CYCLE_2, /* I2C interface duty cycle mode. */ }; -/** - * @brief BMP085 Barometer configuration structure. - */ -static const BMP085BaroConfig bmp085BaroConfig = { - BMP085_BARO_CT_LOW, /* Pressure conversion time. */ - BMP085_BARO_MODE_LOW, /* BMP085 Mode. */ - BMP085_BARO_OSS_0 /* Oversempling setting. */ -}; - -/** - * @brief BMP085 Thermometeer configuration structure. - */ -static const BMP085ThermoConfig bmp085ThermoConfig = { - BMP085_THERMO_CT_LOW /* Temperature conversion time */ -}; - /** * @brief BMP085 configuration structure. */ static const BMP085Config bmp085Config = { &I2CD1, /* I2C Driver pointer. */ &i2cConfig, /* I2C Driver configuration. */ - &bmp085BaroConfig, /* BMP085 Baromether configuration. */ - &bmp085ThermoConfig /* BMP085 Thermometer configuration. */ + NULL, /* Sensibility. */ + NULL, /* bias. */ + NULL, /* Output data rate. */ +#if BMP085_USE_ADVANCED || defined(__DOXYGEN__) + BMP085_BARO_CT_LOW, /* Pressure conversion time. */ + BMP085_BARO_MODE_LOW, /* BMP085 Mode. */ + BMP085_BARO_OSS_0, /* Oversempling setting. */ + BMP085_THERMO_CT_LOW, /* Temperature conversion time */ +#endif }; /*==========================================================================*/ -- cgit v1.2.3