/* Controls the automatic channel swtich enabled or disabled in Comparator Automatic Mode.  */
void CMP_AutoCSwCmd(u32 NewState)
/* Controls the automatic channel swtich enabled or disabled in Comparator Automatic Mode.  */
void CMP_AutoCSwCmd(u32 NewState)
{
	CMP_TypeDef *comparator = COMPARATOR;
	if(NewState != DISABLE) {
		comparator->COMP_AUTOSW_EN = BIT_COMP_AUTOSW_EN;
		comparator->COMP_EN_TRIG |= BIT_COMP_EN_TRIG;
	} else {
		comparator->COMP_AUTOSW_EN = 0;
		comparator->COMP_EN_TRIG &= ~BIT_COMP_EN_TRIG;
	}
}