/* This API sets the FIFO watermark level in the sensor.  */
int8_t bmi160_set_fifo_wm(uint8_t fifo_wm, const struct bmi160_dev *dev)
/* This API sets the FIFO watermark level in the sensor.  */
int8_t bmi160_set_fifo_wm(uint8_t fifo_wm, const struct bmi160_dev *dev)
{
    int8_t rslt = 0;
    uint8_t data = fifo_wm;
    uint8_t reg_addr = BMI160_FIFO_CONFIG_0_ADDR;
    if (dev == NULL)
    {
        rslt = BMI160_E_NULL_PTR;
    }
    else
    {
        rslt = bmi160_set_regs(reg_addr, &data, BMI160_ONE, dev);
    }
    return rslt;
}