/* Interrupt request to the INT_SOURCE (25h) register mode (pulsed / latched) .  */
int32_t lps22hb_int_notification_mode_set(stmdev_ctx_t *ctx, lps22hb_lir_t val)
/* Interrupt request to the INT_SOURCE (25h) register mode (pulsed / latched) .  */
int32_t lps22hb_int_notification_mode_set(stmdev_ctx_t *ctx, lps22hb_lir_t val)
{
  lps22hb_interrupt_cfg_t interrupt_cfg;
  int32_t ret;
  ret = lps22hb_read_reg(ctx, LPS22HB_INTERRUPT_CFG,
                         (uint8_t*)&interrupt_cfg, 1);
  if(ret == 0){
    interrupt_cfg.lir = (uint8_t)val;
    ret = lps22hb_write_reg(ctx, LPS22HB_INTERRUPT_CFG,
                            (uint8_t*)&interrupt_cfg, 1);
  }
  return ret;
}