/* Register address automatically incremented during a multiple byte access with a serial interface..  */
int32_t lsm6dso_auto_increment_set(stmdev_ctx_t *ctx, uint8_t val)
/* Register address automatically incremented during a multiple byte access with a serial interface..  */
int32_t lsm6dso_auto_increment_set(stmdev_ctx_t *ctx, uint8_t val)
{
  lsm6dso_ctrl3_c_t reg;
  int32_t ret;
  ret = lsm6dso_read_reg(ctx, LSM6DSO_CTRL3_C, (uint8_t *)&reg, 1);
  if (ret == 0) {
    reg.if_inc = val;
    ret = lsm6dso_write_reg(ctx, LSM6DSO_CTRL3_C, (uint8_t *)&reg, 1);
  }
  return ret;
}