USART1问题。。。。

2019-07-20 17:30发布

int main(void)
{
  GPIO_InitTypeDef  GPIO_InitStructure;        //建立 GPIOA初始化函数入口参数
  RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);  //  GPIOA 外设时钟使能

RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1,ENABLE);         库函数的版本的例程 加了一句USART1外设时钟使能就报错 什么问题。。。。
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
  GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
  GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
  GPIO_Init(GPIOA, &GPIO_InitStructure);
  while(1){
  GPIO_SetBits(GPIOA,GPIO_Pin_6|GPIO_Pin_7);
  Delay(0x7FFFFF);
  GPIO_ResetBits(GPIOA,GPIO_Pin_6|GPIO_Pin_7);
  Delay(0x7FFFFF);

}
}
main.c(25): error:  #7: unrecognized token
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1,ENABLE);
main.c(25): error:  #18: expected a ")"
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1,ENABLE);
main.c: 0 warnings, 2 errors
"main.c" - 2 Error(s), 0 Warning(s).
大神教教

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