9 int16_t ac1, ac2, ac3, b1, b2, mb, mc, md;
10 uint16_t ac4, ac5, ac6;
12 uint16_t readWord(uint8_t last)
const
13 { uint16_t v =
read(0) << 8;
return v |
read(last); }
14 void readFromReg(uint8_t reg)
const
45 void calculate(int16_t& tval, int32_t& pval)
const;
BMP085(const PortI2C &p, uint8_t osrs=0)
Constructor for BMP085 class.
Definition: PortsBMP085.h:25
void calculate(int16_t &tval, int32_t &pval) const
Calculate the temperature and pressure based on the values stored by the last call to measure()...
Definition: PortsBMP085.cpp:55
void setOverSampling(uint8_t osrs)
Set the oversampling setting for the high resolution mode.
Definition: PortsBMP085.h:30
uint8_t receive() const
Create a start condition on the I2C bus, and set things up for receiving data from this device...
Definition: Ports.h:284
Can be used to drive a software (bit-banged) I2C bus via a Port interface.
Definition: Ports.h:213
int32_t measure(uint8_t type)
Take a measurement.
Definition: PortsBMP085.h:41
uint8_t write(uint8_t data) const
Write a byte to the currently addressed device.
Definition: Ports.h:293
Each device on the I2C bus needs to be defined using a DeviceI2C instance.
Definition: Ports.h:266
uint8_t startMeas(uint8_t type) const
Start a measurement.
Definition: PortsBMP085.cpp:15
int32_t getResult(uint8_t type)
Get the results from the last measurement.
Definition: PortsBMP085.cpp:23
void getCalibData()
Call this during setup() if you want to use calculate() later on.
Definition: PortsBMP085.cpp:36
uint8_t send() const
Create a start condition on the I2C bus, and set things up for sending data to this device...
Definition: Ports.h:279
uint8_t read(uint8_t last) const
Read a byte from the currently addressed device.
Definition: Ports.h:300
Interface for the Pressure Plug - see https://jeelabs.org/pp.
Definition: PortsBMP085.h:8