/* This API is used to get the operation mode of the sensor.  */
int8_t bme68x_get_op_mode(uint8_t *op_mode, struct bme68x_dev *dev)
/* This API is used to get the operation mode of the sensor.  */
int8_t bme68x_get_op_mode(uint8_t *op_mode, struct bme68x_dev *dev)
{
    int8_t rslt;
    uint8_t mode;
    if (op_mode)
    {
        rslt = bme68x_get_regs(BME68X_REG_CTRL_MEAS, &mode, 1, dev);
        *op_mode = mode & BME68X_MODE_MSK;
    }
    else
    {
        rslt = BME68X_E_NULL_PTR;
    }
    return rslt;
}