/Designs/Measuring_instruments/AWS01A/SW/MPL115A1.c/MPL115A1.c |
---|
21,7 → 21,7 |
float c12; |
void MPL_init() |
int1 MPL_init() |
{ |
unsigned int8 a0_MSB, a0_LSB; |
unsigned int8 b1_MSB, b1_LSB; |
59,6 → 59,10 |
b1 = ((((b1_MSB & 0x1F) * 0x100) + b1_LSB) / 8192.0) - 3; |
b2 = ((((unsigned int16) (b2_MSB - 0x80) << 8) + b2_LSB)/ 16384.0) - 2; |
c12 =(((c12_MSB * 0x100) + c12_LSB)/16777216.0); |
if((a0_MSB | a0_LSB | b1_MSB | b1_LSB | b2_MSB | b2_LSB |c12_MSB | c12_LSB) == 0xFF) |
return (TRUE); |
else return (FALSE); |
} |
float MPL_get_pressure() |