/* Difference in percentage of the effective ODR(and timestamp rate) with respect to the typical. Step: 0.15%. 8-bit format, 2's complement..  */
int32_t lsm6dso_odr_cal_reg_set(stmdev_ctx_t *ctx, uint8_t val)
/* Difference in percentage of the effective ODR(and timestamp rate) with respect to the typical. Step: 0.15%. 8-bit format, 2's complement..  */
int32_t lsm6dso_odr_cal_reg_set(stmdev_ctx_t *ctx, uint8_t val)
{
  lsm6dso_internal_freq_fine_t reg;
  int32_t ret;
  ret = lsm6dso_read_reg(ctx, LSM6DSO_INTERNAL_FREQ_FINE,
                         (uint8_t *)&reg, 1);
  if (ret == 0) {
    reg.freq_fine = val;
    ret = lsm6dso_write_reg(ctx, LSM6DSO_INTERNAL_FREQ_FINE,
                            (uint8_t *)&reg, 1);
  }
  return ret;
}