/* If the LIR_Click bit is not set, the interrupt is kept high for the duration of the latency window. If the LIR_Click bit is set, the interrupt is kept high until the CLICK_SRC(39h) register is read..  */
int32_t lis2dh12_tap_notification_mode_set(stmdev_ctx_t *ctx, lis2dh12_lir_click_t val)
/* If the LIR_Click bit is not set, the interrupt is kept high for the duration of the latency window. If the LIR_Click bit is set, the interrupt is kept high until the CLICK_SRC(39h) register is read..  */
int32_t lis2dh12_tap_notification_mode_set(stmdev_ctx_t *ctx, lis2dh12_lir_click_t val)
{
  lis2dh12_click_ths_t click_ths;
  int32_t ret;
  ret = lis2dh12_read_reg(ctx, LIS2DH12_CLICK_THS,
                          (uint8_t *)&click_ths, 1);
  if (ret == 0)
  {
    click_ths.lir_click = (uint8_t)val;
    ret = lis2dh12_write_reg(ctx, LIS2DH12_CLICK_THS,
                             (uint8_t *)&click_ths, 1);
  }
  return ret;
}