/* Register address automatically incremented during a multiple byte access with a serial interface..  */
int32_t lps22hh_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 lps22hh_auto_increment_set(stmdev_ctx_t *ctx, uint8_t val)
{
  lps22hh_ctrl_reg2_t reg;
  int32_t ret;
  ret = lps22hh_read_reg(ctx, LPS22HH_CTRL_REG2, (uint8_t *) &reg, 1);
  if (ret == 0) {
    reg.if_add_inc = val;
    ret = lps22hh_write_reg(ctx, LPS22HH_CTRL_REG2, (uint8_t *) &reg, 1);
  }
  return ret;
}