/* Register address automatically incremented during a multiple byte access with a serial interface (I2C or SPI)..  */
int32_t lps22hb_auto_add_inc_set(stmdev_ctx_t *ctx, uint8_t val)
/* Register address automatically incremented during a multiple byte access with a serial interface (I2C or SPI)..  */
int32_t lps22hb_auto_add_inc_set(stmdev_ctx_t *ctx, uint8_t val)
{
  lps22hb_ctrl_reg2_t ctrl_reg2;
  int32_t ret;
  ret = lps22hb_read_reg(ctx, LPS22HB_CTRL_REG2, (uint8_t*)&ctrl_reg2, 1);
  if(ret == 0){
    ctrl_reg2.if_add_inc = val;
    ret = lps22hb_write_reg(ctx, LPS22HB_CTRL_REG2, (uint8_t*)&ctrl_reg2, 1);
  }
  return ret;
}