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, committed 2019-03-04
- Comitter:
- cparata
- Date:
- Mon Mar 04 13:07:24 2019 +0000
- Parent:
- 2:f7b403c70f6b
- Commit message:
- Fix issue in SPI write
Changed in this revision
LPS22HBSensor.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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;