/* Enable or disable interrupt on the rising edge of a event line  */
void stm32_exti_enable_int(unsigned int line, int enable)
/* Enable or disable interrupt on the rising edge of a event line  */
void stm32_exti_enable_int(unsigned int line, int enable)
{
	if (line >= STM32F2_EXTI_NUM_LINES)
		goto out;
	if (enable) {
		stm32_exti_clear_pending(line);
		KINETIS_EXTI->rtsr |= (1 << line);
		KINETIS_EXTI->ftsr &= ~(1 << line);
		KINETIS_EXTI->imr |= (1 << line);
	} else {
		KINETIS_EXTI->imr &= ~(1 << line);
		KINETIS_EXTI->rtsr &= ~(1 << line);
		KINETIS_EXTI->ftsr &= ~(1 << line);
		stm32_exti_clear_pending(line);
	}
out:
	;
}