60 pressure = pressure << 8;
62 return (pressure >> (8 - mode));
66 int32_t ut = 0, compt = 0;
72 x1 = ((int32_t) ut - (int32_t) bmp085_coeff.ac6)
73 * (int32_t) bmp085_coeff.ac5 >> 15;
74 x2 = ((int32_t) bmp085_coeff.mc << 11) / (x1 + bmp085_coeff.md);
76 compt = (b5 + 8) >> 4;
82 int32_t ut = 0, compt = 0;
83 int32_t up = 0, compp = 0;
85 int32_t x1, x2, b5, b6, x3, b3, p;
91 x1 = ((int32_t) ut - (int32_t) bmp085_coeff.ac6)
92 * (int32_t) bmp085_coeff.ac5 >> 15;
93 x2 = ((int32_t) bmp085_coeff.mc << 11) / (x1 + bmp085_coeff.md);
95 compt = (b5 + 8) >> 4;
98 x1 = (bmp085_coeff.b2 * ((b6 * b6) >> 12)) >> 11;
99 x2 = (bmp085_coeff.ac2 * b6) >> 11;
101 b3 = (((((int32_t) bmp085_coeff.ac1) * 4 + x3) << mode) + 2) >> 2;
102 x1 = (bmp085_coeff.ac3 * b6) >> 13;
103 x2 = (bmp085_coeff.b1 * ((b6 * b6) >> 12)) >> 16;
104 x3 = ((x1 + x2) + 2) >> 2;
105 b4 = (bmp085_coeff.ac4 * (uint32_t) (x3 + 32768)) >> 15;
106 b7 = ((uint32_t) (up - b3) * (50000 >> mode));
108 if (b7 < 0x80000000) {
114 x1 = (p >> 8) * (p >> 8);
115 x1 = (x1 * 3038) >> 16;
116 x2 = (-7357 * p) >> 16;
117 compp = p + ((x1 + x2 + 3791) >> 4);
136 uint8_t msb = 0, lsb = 0;
143 return (uint16_t) ((msb << 8) | lsb);