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.
Fork of BME680 by
Revision 6:37b94c473e8a, committed 2017-01-25
- Comitter:
- UHSLMarcus
- Date:
- Wed Jan 25 12:06:36 2017 +0000
- Parent:
- 5:0cdc1c3adb32
- Commit message:
- debug prints
Changed in this revision
BME680.cpp | Show annotated file Show diff for this revision Revisions of this file |
BME680.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/BME680.cpp Tue Jan 24 14:10:36 2017 +0000 +++ b/BME680.cpp Wed Jan 25 12:06:36 2017 +0000 @@ -808,7 +808,7 @@ void BME680::readRegister(int reg, int size) { _i2c_bus->start(); - _i2c_bus->write(_addr); + if (_i2c_bus->write(_addr) != 1) USBserialComms.printf("BME680 addr write failed (read)\r"); _i2c_bus->write(reg); _i2c_bus->start(); _i2c_bus->write(_addr | 0x01); @@ -822,7 +822,7 @@ void BME680::writeRegister(int reg, int value) { _i2c_bus->start(); - _i2c_bus->write(_addr); + if (_i2c_bus->write(_addr) != 1) USBserialComms.printf("BME680 addr write failed (write)\r"); _i2c_bus->write(reg); _i2c_bus->write(value); _i2c_bus->stop();
--- a/BME680.h Tue Jan 24 14:10:36 2017 +0000 +++ b/BME680.h Wed Jan 25 12:06:36 2017 +0000 @@ -3,6 +3,7 @@ #include "mbed.h" #include "stdint.h" +#include "serial.h" /* * Use below macro for fixed Point Calculation