Library for supporting the Nucleo Sensor Shield.

Dependents:   Nucleo_Sensors_Demo m2x-temp_ethernet_demo m2x-MEMS_ACKme_Wifi_demo m2x_MEMS_Ublox_Cellular_demo ... more

Fork of Nucleo_Sensor_Shield by Daniel Griffin

Warning: Deprecated!

Supported drivers and applications can be found at this link.

Files at this revision

API Documentation at this revision

Comitter:
dangriffin
Date:
Tue Dec 16 21:14:32 2014 +0000
Parent:
1:354f61ffdcfb
Commit message:
Additional checking of return code in pressure sensor driver.

Changed in this revision

Components/LPS25H/lps25.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 354f61ffdcfb -r 57888ec40e75 Components/LPS25H/lps25.cpp
--- a/Components/LPS25H/lps25.cpp	Sat Dec 13 02:33:16 2014 +0000
+++ b/Components/LPS25H/lps25.cpp	Tue Dec 16 21:14:32 2014 +0000
@@ -154,7 +154,10 @@
     {        
       //PRESSURE_IO_Read(&tmp1, LPS25H_SlaveAddress, LPS25H_RES_CONF_ADDR, 1);
       ret = dev_i2c.i2c_read(&tmp1, LPS25H_ADDRESS_HIGH, LPS25H_RES_CONF_ADDR, 1);
+    }
 
+    if (ret == 0)
+    {
       /* Pressure Res selection */
       tmp1 &= ~(LPS25H_P_RES_MASK);
       tmp1 |= LPS25H_P_RES_AVG_32;