Change to comply with mbed os 5.1, as the attach function as used has been deprecated
Dependents: Barometer-Example LoRaWAN-demo-72-bootcamp
Fork of BMP085 by
BMP085 library supporting mbed os low power
Diff: BMP085.cpp
- Revision:
- 4:ed587a5331e4
- Parent:
- 3:4622b90b4657
- Child:
- 5:64852447275f
--- a/BMP085.cpp Mon Jan 30 21:35:24 2017 +0000 +++ b/BMP085.cpp Mon Jan 30 21:42:49 2017 +0000 @@ -26,12 +26,13 @@ pc.printf("transfer "); _state = BMP085_BUSY; - _i2c.transfer(BMP085_ADDR, (char*)_tx_buf, 1, (char*)_rx_buf, 2, _callback); + _i2c.transfer(BMP085_ADDR, tx, tx_len, rx, rx_len, _callback); delay.attach(callback(this, &BMP085::_callback_handler_timeout), 2.0); while(_state == BMP085_BUSY) { sleep(); } if (_state == BMP085_TIMEOUT) { + pc.printf("\ntimeout\n"); _i2c.abort_transfer(); return -33; }