/* Initializes the COMP peripheral according to the specified.  */
void COMP_Init(COMP_Selection_TypeDef selection, COMP_InitTypeDef *init_struct)
/* Initializes the COMP peripheral according to the specified.  */
void COMP_Init(COMP_Selection_TypeDef selection, COMP_InitTypeDef *init_struct)
{
    *(vu32*)(COMP_BASE + selection) =    init_struct->Invert     |
                                         init_struct->NonInvert  |
                                         init_struct->Output     |
                                         init_struct->OutputPol  |
                                         init_struct->BlankingSrce   |
                                         init_struct->Hysteresis |
                                         init_struct->Mode       |
                                         init_struct->OFLT;
}