/* This API checks the fifo read data as empty frame, if it is empty frame then moves the index to last byte.  */
static void check_empty_fifo(uint16_t *data_index, const struct bma4_dev *dev)
/* This API checks the fifo read data as empty frame, if it is empty frame then moves the index to last byte.  */
static void check_empty_fifo(uint16_t *data_index, const struct bma4_dev *dev)
{
    if ((*data_index + 2) < dev->fifo->length) {
        if ((dev->fifo->data[*data_index] == FIFO_MSB_CONFIG_CHECK)
                && (dev->fifo->data[*data_index + 1] == FIFO_LSB_CONFIG_CHECK)) {
            *data_index = dev->fifo->length;
        }
    }
}