/* 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_get(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_get(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);
  switch (reg.odr_ts_batch) {
    case LSM6DSO_NO_DECIMATION:
      *val = LSM6DSO_NO_DECIMATION;
      break;
    case LSM6DSO_DEC_1:
      *val = LSM6DSO_DEC_1;
      break;
    case LSM6DSO_DEC_8:
      *val = LSM6DSO_DEC_8;
      break;
    case LSM6DSO_DEC_32:
      *val = LSM6DSO_DEC_32;
      break;
    default:
      *val = LSM6DSO_NO_DECIMATION;
      break;
  }
  return ret;
}