diff options
author | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-09-28 18:12:29 +0000 |
---|---|---|
committer | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-09-28 18:12:29 +0000 |
commit | 3369e1e04c7cb451e6c206ed6b8ab1abda649c24 (patch) | |
tree | f683ff77f654c441bc0670c6a6fd74b96a98bc3c /testhal/STM32 | |
parent | 73419a9adb4e53396ab43a815b581e0271432a04 (diff) | |
download | ChibiOS-3369e1e04c7cb451e6c206ed6b8ab1abda649c24.tar.gz ChibiOS-3369e1e04c7cb451e6c206ed6b8ab1abda649c24.tar.bz2 ChibiOS-3369e1e04c7cb451e6c206ed6b8ab1abda649c24.zip |
Improved LSM6DS0 driver and related demo: added multiple register read/write.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9818 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32')
-rw-r--r-- | testhal/STM32/STM32F4xx/I2C-LSM6DS0/Makefile | 2 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/I2C-LSM6DS0/main.c | 19 |
2 files changed, 8 insertions, 13 deletions
diff --git a/testhal/STM32/STM32F4xx/I2C-LSM6DS0/Makefile b/testhal/STM32/STM32F4xx/I2C-LSM6DS0/Makefile index 31b3ede4c..f205016a5 100644 --- a/testhal/STM32/STM32F4xx/I2C-LSM6DS0/Makefile +++ b/testhal/STM32/STM32F4xx/I2C-LSM6DS0/Makefile @@ -202,7 +202,7 @@ CPPWARN = -Wall -Wextra -Wundef # List all user C define here, like -D_DEBUG=1
UDEFS = -DCHPRINTF_USE_FLOAT=1 -DSHELL_CMD_TEST_ENABLED=0 \
-DLSM6DS0_USE_ADVANCED=0 -DLSM6DS0_GYRO_USE_ADVANCED=0 \
- -DLSM6DS0_ACC_USE_ADVANCED=0
+ -DLSM6DS0_ACC_USE_ADVANCED=0 -DLSM6DS0_SHARED_I2C=0
# Define ASM defines here
UADEFS =
diff --git a/testhal/STM32/STM32F4xx/I2C-LSM6DS0/main.c b/testhal/STM32/STM32F4xx/I2C-LSM6DS0/main.c index 5cbdd16c1..ef3510782 100644 --- a/testhal/STM32/STM32F4xx/I2C-LSM6DS0/main.c +++ b/testhal/STM32/STM32F4xx/I2C-LSM6DS0/main.c @@ -44,25 +44,20 @@ static const I2CConfig i2ccfg = { };
static const LSM6DS0AccConfig lsm6ds0acccfg = {
- {0, 0, 0}, /* Use default sensitivity.*/
- {0, 0, 0}, /* Use default bias.*/
+ NULL, /* Use default sensitivity.*/
+ NULL, /* Use default bias.*/
LSM6DS0_ACC_FS_2G, /* Full scale value 2g.*/
LSM6DS0_ACC_ODR_50Hz, /* Output data rate 100 Hz.*/
#if LSM6DS0_ACC_USE_ADVANCED || defined(__DOXYGEN__)
- LSM6DS0_ACC_OBW_AA,
- LSM6DS0_ACC_HR_ENABLED,
- LSM6DS0_ACC_FDS_DISABLED,
- LSM6DS0_ACC_DCF_9,
- LSM6DS0_ACC_AABW_AUTO,
- LSM6DS0_ACC_DEC_DISABLED,
+ LSM6DS0_ACC_DEC_X4,
#endif
};
static const LSM6DS0GyroConfig lsm6ds0gyrocfg = {
- {0, 0, 0}, /* Use default sensitivity.*/
- {0, 0, 0}, /* Use default bias.*/
- LSM6DS0_GYRO_FS_245DPS, /* Full scale value 245DPS.*/
- LSM6DS0_GYRO_ODR_119HZ_FC_31 /* Output data rate 119 Hz.*/
+ NULL, /* Use default sensitivity.*/
+ NULL, /* Use default bias.*/
+ LSM6DS0_GYRO_FS_245DPS, /* Full scale value 245DPS.*/
+ LSM6DS0_GYRO_ODR_119HZ_FC_31, /* Output data rate 119 Hz.*/
#if LSM6DS0_GYRO_USE_ADVANCED || defined(__DOXYGEN__)
LSM6DS0_GYRO_LP_DISABLED,
LSM6DS0_GYRO_OUT_SEL_0,
|