/* Initiates pressure measurement on the barometric pressure sensor and reads pressure from it.  */
uint32_t BMP_getPressure(float *pressure)
/* Initiates pressure measurement on the barometric pressure sensor and reads pressure from it.  */
uint32_t BMP_getPressure(float *pressure)
{
   int8_t result;
   int32_t uncompTemp;
   int32_t uncompPressure;
   uint32_t compPressure;
   if( bmp280PowerMode == BMP280_NORMAL_MODE ) {
      result = bmp280_read_uncomp_pressure( &uncompPressure );
      if( result == SUCCESS ){
         result = bmp280_read_uncomp_temperature( &uncompTemp );
      }
   }
   else {
      result = bmp280_get_forced_uncomp_pressure_temperature( &uncompPressure, &uncompTemp );
   }
   if( result != SUCCESS ) {
      return (uint32_t) result;
   }
   bmp280_compensate_temperature_int32( uncompTemp );
   compPressure = bmp280_compensate_pressure_int64( uncompPressure );
   *pressure = (float) compPressure;
   *pressure /= 256.0f;
   *pressure /= 100.0f;
   return BMP_OK;
}