/* Selects decimation for timestamp batching in FIFO. Writing rate will be the maximum rate between XL and GYRO BDR divided by decimation decoder..  */
int32_t lsm6dso_fifo_timestamp_decimation_set(stmdev_ctx_t *ctx, lsm6dso_odr_ts_batch_t val)
/* Selects decimation for timestamp batching in FIFO. Writing rate will be the maximum rate between XL and GYRO BDR divided by decimation decoder..  */
int32_t lsm6dso_fifo_timestamp_decimation_set(stmdev_ctx_t *ctx, lsm6dso_odr_ts_batch_t val)
{
  lsm6dso_fifo_ctrl4_t reg;
  int32_t ret;
  ret = lsm6dso_read_reg(ctx, LSM6DSO_FIFO_CTRL4, (uint8_t *)&reg, 1);
  if (ret == 0) {
    reg.odr_ts_batch = (uint8_t)val;
    ret = lsm6dso_write_reg(ctx, LSM6DSO_FIFO_CTRL4, (uint8_t *)&reg, 1);
  }
  return ret;
}