/* This function enables the pressure sensor and temperature sensor */
static int drv_baro_bosch_bmp380_enable_pressure_temp(i2c_dev_t *drv)
/* This function enables the pressure sensor and temperature sensor */
static int drv_baro_bosch_bmp380_enable_pressure_temp(i2c_dev_t *drv)
{
    int     ret = 0;
    uint8_t value = 0x00;
    ret = sensor_i2c_read(drv, BMP380_PWR_CTRL_ADDR, &value, I2C_DATA_LEN, I2C_OP_RETRIES);
    if (unlikely(ret) != 0) {
        return ret;
    }
    value = BMP380_SET_BITSLICE(value,BMP380_PRESS_EN,BMP380_PRESS_ENABLED);
    value = BMP380_SET_BITSLICE(value,BMP380_TEMP_EN,BMP380_TEMP_ENABLED);
    ret = sensor_i2c_write(drv, BMP380_PWR_CTRL_ADDR, &value, I2C_DATA_LEN, I2C_OP_RETRIES);
    aos_msleep(2);
    if (unlikely(ret) != 0) {
        return ret;
    }
    return 0;
}