STM8庫里面時鐘初始化函數:
void CLK_DeInit(void) {
CLK->ICKR = CLK_ICKR_RESET_VALUE; CLK->ECKR = CLK_ECKR_RESET_VALUE; CLK->SWR = CLK_SWR_RESET_VALUE; CLK->SWCR = CLK_SWCR_RESET_VALUE; CLK->CKDIVR = CLK_CKDIVR_RESET_VALUE; CLK->PCKENR1 = CLK_PCKENR1_RESET_VALUE; CLK->PCKENR2 = CLK_PCKENR2_RESET_VALUE; CLK->CSSR = CLK_CSSR_RESET_VALUE; CLK->CCOR = CLK_CCOR_RESET_VALUE; while (CLK->CCOR & CLK_CCOR_CCOEN) {} CLK->CCOR = CLK_CCOR_RESET_VALUE; CLK->CANCCR = CLK_CANCCR_RESET_VALUE; CLK->HSITRIMR = CLK_HSITRIMR_RESET_VALUE; CLK->SWIMCCR = CLK_SWIMCCR_RESET_VALUE;
}
while (CLK->CCOR & CLK_CCOR_CCOEN) {} 這一句干嗎? CCOEN是標志嗎? |