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.h
- Revision:
- 3:4622b90b4657
- Parent:
- 2:dcd90bee9ac2
--- a/BMP085.h Tue Jan 24 10:33:24 2017 +0000 +++ b/BMP085.h Mon Jan 30 21:35:24 2017 +0000 @@ -41,7 +41,8 @@ typedef enum { BMP085_IDLE, - BMP085_BUSY + BMP085_BUSY, + BMP085_TIMEOUT } BMP085_State; typedef struct { @@ -79,10 +80,15 @@ float _pressure; BMP085_Calibration_Data _cal_data; private: + int transfer(char *tx, int tx_len, char *rx, int rx_len); + int wait(float delay); + event_callback_t _callback; void _callback_handler(int event); uint8_t _tx_buf[2]; uint8_t _rx_buf[3]; + + Timer _timeout; }; #endif /* BMP085_H */ \ No newline at end of file