/* Latch interrupt request to the INT_SOURCE (24h) register..  */
int32_t lps22hh_int_notification_get(stmdev_ctx_t *ctx, lps22hh_lir_t *val)
/* Latch interrupt request to the INT_SOURCE (24h) register..  */
int32_t lps22hh_int_notification_get(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);
  switch (reg.lir) {
    case LPS22HH_INT_PULSED:
      *val = LPS22HH_INT_PULSED;
      break;
    case LPS22HH_INT_LATCHED:
      *val = LPS22HH_INT_LATCHED;
      break;
    default:
      *val = LPS22HH_INT_PULSED;
      break;
  }
  return ret;
}