Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: HelloWorld_ST_Sensors MOTENV_Mbed mbed-os-mqtt-client LSM6DSL_JS ... more
Revision 4:a00b29ed17c3, committed 2019-03-04
- 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;