From dd525d05dbf985837da4616ee52ffb1b732df607 Mon Sep 17 00:00:00 2001 From: Rocco Marco Guglielmi Date: Thu, 22 Sep 2016 16:01:28 +0000 Subject: Updated LSM6DS0 driver and related STM32 Nucleo F401RE demo git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9770 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ex/ST/lsm6ds0.c | 4 ++-- os/ex/ST/lsm6ds0.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'os/ex') diff --git a/os/ex/ST/lsm6ds0.c b/os/ex/ST/lsm6ds0.c index 707c7b90c..17f02b52f 100644 --- a/os/ex/ST/lsm6ds0.c +++ b/os/ex/ST/lsm6ds0.c @@ -75,6 +75,7 @@ typedef enum { uint8_t lsm6ds0I2CReadRegister(I2CDriver *i2cp, lsm6ds0_sad_t sad, uint8_t reg, msg_t* msgp) { msg_t msg; + uint8_t txbuf = reg; #if defined(STM32F103_MCUCONF) uint8_t rxbuf[2]; msg = i2cMasterTransmitTimeout(i2cp, sad, &txbuf, 1, rxbuf, 2, @@ -84,8 +85,7 @@ uint8_t lsm6ds0I2CReadRegister(I2CDriver *i2cp, lsm6ds0_sad_t sad, uint8_t reg, } return rxbuf[0]; #else - uint8_t txbuf, rxbuf; - txbuf = reg; + uint8_t rxbuf; msg = i2cMasterTransmitTimeout(i2cp, sad, &txbuf, 1, &rxbuf, 1, TIME_INFINITE); if(msgp != NULL){ diff --git a/os/ex/ST/lsm6ds0.h b/os/ex/ST/lsm6ds0.h index 34efdcec3..20bef3134 100644 --- a/os/ex/ST/lsm6ds0.h +++ b/os/ex/ST/lsm6ds0.h @@ -41,7 +41,7 @@ /** * @brief LSM6DS0 driver version string. */ -#define EX_LSM6DS0_VERSION "1.0.0" +#define EX_LSM6DS0_VERSION "1.0.1" /** * @brief LSM6DS0 driver version major number. @@ -56,7 +56,7 @@ /** * @brief LSM6DS0 driver version patch number. */ -#define EX_LSM6DS0_PATCH 0 +#define EX_LSM6DS0_PATCH 1 /** @} */ /** -- cgit v1.2.3