关于STM32RCC问题的解答

2019-08-23 14:53发布


ErrorStatus RCC_WaitForHSEStartUp(void)
{
  __IO uint32_t StartUpCounter = 0;
  ErrorStatus status = ERROR;
  FlagStatus HSEStatus = RESET;

  /* Wait till HSE is ready and if Time out is reached exit */
  do
  {
    HSEStatus = RCC_GetFlagStatus(RCC_FLAG_HSERDY);
    StartUpCounter++;  
  } while((StartUpCounter != HSE_STARTUP_TIMEOUT) && (HSEStatus == RESET));//这里是什么意思啊。是当状态已经复位以后执行然后前面那句一点不懂,想了很久





  if (RCC_GetFlagStatus(RCC_FLAG_HSERDY) != RESET)//这里是懂得
  {
    status = SUCCESS;
  }
  else
  {
    status = ERROR;
  }  
  return (status);
}


友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。