Capacitive digital sensor for relative humidity and temperature.

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

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

Revision:
3:aadcccf527ef
Parent:
2:312ee2694a77
Child:
4:9f317607860e
--- a/HTS221Sensor.h	Mon Oct 02 09:28:41 2017 +0200
+++ b/HTS221Sensor.h	Mon Mar 04 13:06:44 2019 +0000
@@ -107,11 +107,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;