/* This API computes the number of bytes of accel FIFO data which is to be parsed. 
Static Function Declarations */
static void get_accel_len_to_parse(u8 *data_index, u8 *data_read_length, u8 accel_frame_count, u8 fifo_data_select, struct fifo_configuration *fifo_conf)
/* This API computes the number of bytes of accel FIFO data which is to be parsed. 
Static Function Declarations */
static void get_accel_len_to_parse(u8 *data_index, u8 *data_read_length, u8 accel_frame_count, u8 fifo_data_select, struct fifo_configuration *fifo_conf)
{
    *data_index = fifo_conf->accel_byte_start_index;
    if (fifo_data_select == BMA2x2_FIFO_XYZ_DATA_ENABLED)
    {
        *data_read_length = accel_frame_count *
                            BMA2x2_FIFO_XYZ_AXES_FRAME_SIZE;
    }
    else
    {
        *data_read_length = accel_frame_count *
                            BMA2x2_FIFO_SINGLE_AXIS_FRAME_SIZE;
    }
    if ((*data_read_length) > fifo_conf->fifo_length)
    {
        *data_read_length = fifo_conf->fifo_length;
    }
}