/* This API is used to parse the gyro data from the FIFO data and store it in the instance of the structure bmi160_sensor_data.  */
static void unpack_gyro_data(struct bmi160_sensor_data *gyro_data, uint16_t data_start_index, const struct bmi160_dev *dev)
/* This API is used to parse the gyro data from the FIFO data and store it in the instance of the structure bmi160_sensor_data.  */
static void unpack_gyro_data(struct bmi160_sensor_data *gyro_data, uint16_t data_start_index, const struct bmi160_dev *dev)
{
    uint16_t data_lsb;
    uint16_t data_msb;
    data_lsb = dev->fifo->data[data_start_index++];
    data_msb = dev->fifo->data[data_start_index++];
    gyro_data->x = (int16_t)((data_msb << 8) | data_lsb);
    data_lsb = dev->fifo->data[data_start_index++];
    data_msb = dev->fifo->data[data_start_index++];
    gyro_data->y = (int16_t)((data_msb << 8) | data_lsb);
    data_lsb = dev->fifo->data[data_start_index++];
    data_msb = dev->fifo->data[data_start_index++];
    gyro_data->z = (int16_t)((data_msb << 8) | data_lsb);
}