aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/ex/ST/lps22hb.c8
-rw-r--r--os/ex/ST/lps22hb.h4
-rw-r--r--readme.txt1
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.