题目内容
/******************************************************************************** Function Name : RCC_Configuration* Description: Configures System Clocks*******************************************************************************/void RCC_Configuration(void){RCC_DeInit();RCC_HSEConfig(RCC_HSE_ON);HSEStartUpStatus = RCC_WaitForHSEStartUp();if(HSEStartUpStatus == SUCCESS){RCC_HCLKConfig(RCC_SYSCLK_Div1);RCC_PCLK2Config(RCC_HCLK_Div1);RCC_PCLK1Config(RCC_HCLK_Div2);FLASH_SetLatency(FLASH_Latency_2);FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9);RCC_PLLCmd(ENABLE);while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET);RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);while(RCC_GetSYSCLKSource() != 0x08);}/* Enable GPIOA~E and AFIO clocks */(1)}/******************************************************************************** Function Name : GPIO_Configuration* Description: Configures GPIO Modes*******************************************************************************/void GPIO_Configuration(){/* Configures IO*/GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8|GPIO_Pin_9;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;GPIO_Init(GPIOB, &GPIO_InitStructure);//开关按钮 A0 C13(2)(3)}
查看答案
搜索结果不匹配?点我反馈
更多问题