/* This function gets the baro ODR according to HZ */
static uint8_t drv_baro_bosch_bmp380_hz2odr(int hz)
/* This function gets the baro ODR according to HZ */
static uint8_t drv_baro_bosch_bmp380_hz2odr(int hz)
{
    if (hz > 100)
        return BMP380_ODR_200_HZ;
    else if (hz > 50)
        return BMP380_ODR_100_HZ;
    else if (hz > 25)
        return BMP380_ODR_50_HZ;
    else if (hz > 12)
        return BMP380_ODR_25_HZ;
    else if (hz > 6)
        return BMP380_ODR_12_5_HZ;
    else if (hz > 3)
        return BMP380_ODR_6_25_HZ;
    else if (hz > 1)
        return BMP380_ODR_3_1_HZ;
    else
        return BMP380_ODR_1_5_HZ;
}