/* Selects the GPIO pin used as EXTI Line.  */
void EXTI_LineConfig(u8 port_source_gpio, u8 pin_source)
/* Selects the GPIO pin used as EXTI Line.  */
void EXTI_LineConfig(u8 port_source_gpio, u8 pin_source)
{
    EXTI->CR[pin_source >> 0x02] &= ~(0x0F << (0x04 * (pin_source & 0x03)));
    EXTI->CR[pin_source >> 0x02] |= ((port_source_gpio) << (0x04 * (pin_source & 0x03)));
}