/* This API reads the FIFO water mark level which is set in the sensor.  */
uint16_t bma4_get_fifo_wm(uint16_t *fifo_wm, struct bma4_dev *dev)
/* This API reads the FIFO water mark level which is set in the sensor.  */
uint16_t bma4_get_fifo_wm(uint16_t *fifo_wm, struct bma4_dev *dev)
{
    uint16_t rslt = 0;
    uint8_t data[2] = {0, 0};
    if (dev == NULL) {
        rslt |= BMA4_E_NULL_PTR;
    } else {
        rslt |= bma4_read_regs(BMA4_FIFO_WTM_0_ADDR, data, BMA4_FIFO_WM_LENGTH, dev);
        if (BMA4_OK == rslt)
            *fifo_wm = (data[1] << 8) | (data[0]);
    }
    return rslt;
}