36 static void cb(uint8_t result)
91 int16_t raw_diff_pressure = 0x3FFF & ((
buf_[0] << 8) +
buf_[1]);
92 int16_t raw_temp = (0xFFE0 & ((
buf_[2] << 8) +
buf_[3])) >> 5;
94 diff_press_ = -((
static_cast<float>(raw_diff_pressure) - 1638.3
f) / 6553.2f - 1.0f) * 6894.757
f;
95 temp_ = ((200.0f * raw_temp) / 2047.0) - 50 ;
volatile uint32_t millis(void)
static volatile uint8_t * status
static const uint8_t ADDR
static void cb(uint8_t result)
static volatile int16_t temp
void read_cb(uint8_t result)
int8_t read(uint8_t addr, uint8_t reg, uint8_t num_bytes, uint8_t *data, void(*callback)(uint8_t)=nullptr, bool blocking=false)
void read(float *differential_pressure, float *temp)