static void COMP_Config(void)
{
CLK_PeripheralClockConfig(CLK_Peripheral_COMP, ENABLE);
/* Connect internal reference voltage to COMP1 inverting input */
COMP_VrefintToCOMP1Connect(ENABLE);
/* close the analog switch number 0 */
SYSCFG_RIAnalogSwitchConfig(RI_AnalogSwitch_0, ENABLE);
/* close the analog switch number 1 */
SYSCFG_RIAnalogSwitchConfig(RI_AnalogSwitch_14, ENABLE);
/* close the I/O switch number 2 */
SYSCFG_RIIOSwitchConfig(RI_IOSwitch_2, ENABLE);// PA5
INTERRUPT_HANDLER(ADC1_COMP_IRQHandler,18)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
COMP_ClearITPendingBit(COMP_Selection_COMP1);
}