/* Selects the GPIO pin used as Event output.  */
void GPIO_ConfigEventOutput(uint8_t PortSource, uint8_t PinSource)
/* Selects the GPIO pin used as Event output.  */
void GPIO_ConfigEventOutput(uint8_t PortSource, uint8_t PinSource)
{
    uint32_t tmpregister = 0x00;
    assert_param(IS_GPIO_EVENTOUT_PORT_SOURCE(PortSource));
    assert_param(IS_GPIO_PIN_SOURCE(PinSource));
    tmpregister = AFIO->ECTRL;
    tmpregister &= EVCR_PORTPINCONFIG_MASK;
    tmpregister |= (uint32_t)PortSource << 0x04;
    tmpregister |= PinSource;
    AFIO->ECTRL = tmpregister;
}