From 3c7905ac015c89f6d1dd63c9a97bddd164240c5f Mon Sep 17 00:00:00 2001 From: Rocco Marco Guglielmi Date: Sun, 3 Feb 2019 11:20:45 +0000 Subject: Fixed Bug #1005 git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_19.1.x@12633 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/ex/ST/lps22hb.c | 8 ++++++-- os/ex/ST/lps22hb.h | 4 ++-- readme.txt | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/os/ex/ST/lps22hb.c b/os/ex/ST/lps22hb.c index a341f5fcd..ce1698e76 100644 --- a/os/ex/ST/lps22hb.c +++ b/os/ex/ST/lps22hb.c @@ -585,6 +585,10 @@ void lps22hbStart(LPS22HBDriver *devp, const LPS22HBConfig *config) { lps22hbI2CWriteRegister(devp->config->i2cp, devp->config->slaveaddress, cr, 1); +#if LPS22HB_SHARED_I2C + i2cReleaseBus((devp)->config->i2cp); +#endif /* LPS22HB_SHARED_I2C */ + /* Control register 1 configuration block.*/ { cr[0] = LPS22HB_AD_CTRL_REG1; @@ -597,9 +601,9 @@ void lps22hbStart(LPS22HBDriver *devp, const LPS22HBConfig *config) { #if LPS22HB_SHARED_I2C i2cAcquireBus((devp)->config->i2cp); -#endif /* LPS22HB_SHARED_I2C */ i2cStart((devp)->config->i2cp, - (devp)->config->i2ccfg); + (devp)->config->i2ccfg); +#endif /* LPS22HB_SHARED_I2C */ lps22hbI2CWriteRegister(devp->config->i2cp, devp->config->slaveaddress, cr, 1); diff --git a/os/ex/ST/lps22hb.h b/os/ex/ST/lps22hb.h index dee503d09..484e40120 100644 --- a/os/ex/ST/lps22hb.h +++ b/os/ex/ST/lps22hb.h @@ -43,7 +43,7 @@ /** * @brief LPS22HB driver version string. */ -#define EX_LPS22HB_VERSION "1.0.1" +#define EX_LPS22HB_VERSION "1.0.2" /** * @brief LPS22HB driver version major number. @@ -58,7 +58,7 @@ /** * @brief LPS22HB driver version patch number. */ -#define EX_LPS22HB_PATCH 1 +#define EX_LPS22HB_PATCH 2 /** @} */ /** diff --git a/readme.txt b/readme.txt index 0d0685c77..1a18e5526 100644 --- a/readme.txt +++ b/readme.txt @@ -75,6 +75,7 @@ *** 19.1.1 *** - FIX: Fixed problem in STM32 mcuconf.h template files (bug #1007). +- EX: Missing I2C release bus in LPS22HB initialization (bug #1005). *** 19.1.0 *** - First 19.1.x release, see release note 19.1.0. -- cgit v1.2.3