ST / LSM6DSL

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

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

Files at this revision

API Documentation at this revision

Comitter:
cparata
Date:
Mon Mar 04 13:07:57 2019 +0000
Parent:
3:20ccff7dd652
Child:
5:77ec4781b110
Commit message:
Fix issue in SPI write

Changed in this revision

LSM6DSLSensor.h Show annotated file Show diff for this revision Revisions of this file
--- a/LSM6DSLSensor.h	Tue Oct 03 14:04:56 2017 +0200
+++ b/LSM6DSLSensor.h	Mon Mar 04 13:07:57 2019 +0000
@@ -286,11 +286,11 @@
         if (_dev_spi) { 
             _dev_spi->lock();
             _cs_pin = 0;
-            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;