2015-04-19 07:38 PM
/*******************************************************************************
* Function Name : PowerOn* Description :* Input : None.* Output : None.* Return : USB_SUCCESS.*******************************************************************************/RESULT PowerOn(void){#ifndef STM32F10X_CL uint16_t wRegVal; /*** cable plugged-in ? ***/ USB_Cable_Config(ENABLE); /*** CNTR_PWDN = 0 ***/ wRegVal = CNTR_FRES; _SetCNTR(wRegVal); /*** CNTR_FRES = 0 ***/ wInterrupt_Mask = 0; _SetCNTR(wInterrupt_Mask); /*** Clear pending interrupts ***/ _SetISTR(0); /*** Set interrupt mask ***/ wInterrupt_Mask = CNTR_RESETM | CNTR_SUSPM | CNTR_WKUPM; _SetCNTR(wInterrupt_Mask);#endif /* STM32F10X_CL */ return USB_SUCCESS;}Why do we define #ifn
def STM32F10X_CL. It means that when i define STM32F10X_CL, the program will ignore the body of this function, so i wonder how can the program configure USB Power ON for STM32F10X_CL?