MEMS nano pressure sensor: 260-1260 hPa absolute digital output barometer.

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   HelloWorld_ST_Sensors MOTENV_Mbed mbed-os-mqtt-client LPS22HB_JS ... more

Revision:
3:3971e9431200
Parent:
2:f7b403c70f6b
--- a/LPS22HBSensor.h	Mon Oct 02 09:29:15 2017 +0200
+++ b/LPS22HBSensor.h	Mon Mar 04 13:07:24 2019 +0000
@@ -117,11 +117,11 @@
         if (_dev_spi) { 
             _dev_spi->lock();
             _cs_pin = 0;
-            int data = _dev_spi->write(RegisterAddr);                    
+            _dev_spi->write(RegisterAddr);                    
             _dev_spi->write((char *)pBuffer, (int) NumByteToWrite, NULL, 0);                     
             _cs_pin = 1;                    
             _dev_spi->unlock();
-            return data;                    
+            return 0;                    
         }        
         if (_dev_i2c) return (uint8_t) _dev_i2c->i2c_write(pBuffer, _address, RegisterAddr, NumByteToWrite);    
         return 1;