You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to lps22hb datasheet, the pressure data are stored in 3 registers, so the last line *buff *= 256; of below API should be removed. I had confirmed this issue in lps22hb, and checked other lps2x series sensors, looks like they had the same issue.
int32_tlps22hb_pressure_raw_get(conststmdev_ctx_t*ctx, uint32_t*buff)
{
uint8_treg[3];
int32_tret;
ret=lps22hb_read_reg(ctx, LPS22HB_PRESS_OUT_XL, reg, 3);
*buff=reg[2];
*buff= (*buff*256) +reg[1];
*buff= (*buff*256) +reg[0];
*buff *= 256; /* this line should be removed */returnret;
}
The text was updated successfully, but these errors were encountered:
According to lps22hb datasheet, the pressure data are stored in 3 registers, so the last line
*buff *= 256;
of below API should be removed. I had confirmed this issue in lps22hb, and checked other lps2x series sensors, looks like they had the same issue.The text was updated successfully, but these errors were encountered: