aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F4xx
diff options
context:
space:
mode:
authorRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-09-29 15:02:05 +0000
committerRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-09-29 15:02:05 +0000
commita3728946f8a57b3f4bbc1642d082866517f8038b (patch)
tree9ca84e39dd2021423839a99157434aff295a327d /testhal/STM32/STM32F4xx
parent501dce6dc591f065acdf3e83b2de29e9bf7af4a4 (diff)
downloadChibiOS-a3728946f8a57b3f4bbc1642d082866517f8038b.tar.gz
ChibiOS-a3728946f8a57b3f4bbc1642d082866517f8038b.tar.bz2
ChibiOS-a3728946f8a57b3f4bbc1642d082866517f8038b.zip
Improved LSM303DLHC driver and related demos: improved bias and sensitivity handling.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9823 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/STM32F4xx')
-rw-r--r--testhal/STM32/STM32F4xx/I2C-LSM303DLHC/Makefile4
-rw-r--r--testhal/STM32/STM32F4xx/I2C-LSM303DLHC/main.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/testhal/STM32/STM32F4xx/I2C-LSM303DLHC/Makefile b/testhal/STM32/STM32F4xx/I2C-LSM303DLHC/Makefile
index 266c918db..37305ed89 100644
--- a/testhal/STM32/STM32F4xx/I2C-LSM303DLHC/Makefile
+++ b/testhal/STM32/STM32F4xx/I2C-LSM303DLHC/Makefile
@@ -201,8 +201,8 @@ CPPWARN = -Wall -Wextra -Wundef
# List all user C define here, like -D_DEBUG=1
UDEFS = -DCHPRINTF_USE_FLOAT=1 -DSHELL_CMD_TEST_ENABLED=0 \
- -DLSM303DLHC_ACC_USE_ADVANCED=0 -DLSM303DLHC_COMP_USE_ADVANCED=0
-
+ -DLSM303DLHC_ACC_USE_ADVANCED=0 -DLSM303DLHC_COMP_USE_ADVANCED=0 \
+ -DLSM303DLHC_SHARED_I2C=0
# Define ASM defines here
UADEFS =
diff --git a/testhal/STM32/STM32F4xx/I2C-LSM303DLHC/main.c b/testhal/STM32/STM32F4xx/I2C-LSM303DLHC/main.c
index fb3adc819..b7fa1a455 100644
--- a/testhal/STM32/STM32F4xx/I2C-LSM303DLHC/main.c
+++ b/testhal/STM32/STM32F4xx/I2C-LSM303DLHC/main.c
@@ -46,8 +46,8 @@ static const I2CConfig i2ccfg = {
};
static const LSM303DLHCAccConfig lsm303dlhcacccfg = {
- {0, 0, 0}, /* Use default sensitivity.*/
- {0, 0, 0}, /* Use default bias.*/
+ NULL, /* Use default sensitivity.*/
+ NULL, /* Use default bias.*/
LSM303DLHC_ACC_FS_4G, /* Full scale value 2g.*/
LSM303DLHC_ACC_ODR_100Hz, /* Output data rate 100 Hz.*/
#if LSM303DLHC_ACC_USE_ADVANCED || defined(__DOXYGEN__)
@@ -59,6 +59,8 @@ static const LSM303DLHCAccConfig lsm303dlhcacccfg = {
};
static const LSM303DLHCCompConfig lsm303dlhccompcfg = {
+ NULL, /* Use default sensitivity.*/
+ NULL, /* Use default bias.*/
LSM303DLHC_COMP_FS_1P3GA, /* Full scale value 1.3 Gauss.*/
LSM303DLHC_COMP_ODR_30HZ, /* Output data rate 30 Hz.*/
#if LSM303DLHC_COMP_USE_ADVANCED || defined(__DOXYGEN__)