/* Latch interrupt request to the INT_SOURCE (24h) register..  */
int32_t lps22hh_int_notification_set(stmdev_ctx_t *ctx, lps22hh_lir_t val)
/* Latch interrupt request to the INT_SOURCE (24h) register..  */
int32_t lps22hh_int_notification_set(stmdev_ctx_t *ctx, lps22hh_lir_t val)
{
  lps22hh_interrupt_cfg_t reg;
  int32_t ret;
  ret = lps22hh_read_reg(ctx, LPS22HH_INTERRUPT_CFG, (uint8_t *) &reg,
                         1);
  if (ret == 0) {
    reg.lir = (uint8_t)val;
    ret = lps22hh_write_reg(ctx, LPS22HH_INTERRUPT_CFG, (uint8_t *) &reg,
                            1);
  }
  return ret;
}