/* Selects Batching Data Rate (writing frequency in FIFO) for gyroscope data..  */
int32_t lsm6dsl_fifo_gy_batch_set(stmdev_ctx_t *ctx, lsm6dsl_dec_fifo_gyro_t val)
/* Selects Batching Data Rate (writing frequency in FIFO) for gyroscope data..  */
int32_t lsm6dsl_fifo_gy_batch_set(stmdev_ctx_t *ctx, lsm6dsl_dec_fifo_gyro_t val)
{
  lsm6dsl_fifo_ctrl3_t fifo_ctrl3;
  int32_t ret;
  ret = lsm6dsl_read_reg(ctx, LSM6DSL_FIFO_CTRL3, (uint8_t*)&fifo_ctrl3, 1);
  if(ret == 0){
    fifo_ctrl3.dec_fifo_gyro = (uint8_t)val;
    ret = lsm6dsl_write_reg(ctx, LSM6DSL_FIFO_CTRL3, (uint8_t*)&fifo_ctrl3, 1);
  }
  return ret;
}