/* Circular burst-mode (rounding) read of the output registers..  */
int32_t lsm6dso_rounding_mode_set(stmdev_ctx_t *ctx, lsm6dso_rounding_t val)
/* Circular burst-mode (rounding) read of the output registers..  */
int32_t lsm6dso_rounding_mode_set(stmdev_ctx_t *ctx, lsm6dso_rounding_t val)
{
  lsm6dso_ctrl5_c_t reg;
  int32_t ret;
  ret = lsm6dso_read_reg(ctx, LSM6DSO_CTRL5_C, (uint8_t *)&reg, 1);
  if (ret == 0) {
    reg.rounding = (uint8_t)val;
    ret = lsm6dso_write_reg(ctx, LSM6DSO_CTRL5_C, (uint8_t *)&reg, 1);
  }
  return ret;
}