STM32高手过来帮小弟看哈

2019-03-23 20:04发布

void USART_Configuration()
{
 USART_InitTypeDef USART_InitStructure;
 USART_InitStructure.USART_BaudRate=115200;
 USART_InitStructure.USART_WordLength=USART_WordLength_8b;
 USART_InitStructure.USART_StopBits=USART_StopBits_1;
 USART_InitStructure.USART_Parity=USART_Parity_No;
 USART_InitStructure.USART_Mode=USART_Mode_Rx|USART_Mode_Tx;
 USART_InitStructure.USART_HardwareFlowControl=USART_HardwareFlowControl_None;
 USART_InitStructure.USART_Clock=USART_Clock_Disable;
 USART_InitStructure.USART_CPOL=USART_CPOL_Low;
 USART_InitStructure.USART_CPHA=USART_CPHA_2Edge;
 USART_InitStructure.USART_LastBit=USART_LastBit_Disable;
 USART_Init(USART1,&USART_InitStructure);
 USART_Cmd(USART1,ENABLE);
}
[ 本帖最后由 TopMars 于 2011-8-12 15:04 编辑 ] 此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
9条回答
TopMars
2019-03-23 23:28
/ STM32的高手  帮我看看  我配置的同步模式  编译怎么老出错呢
main.c(88): error:  #136: struct "<unnamed>" has no field "USART_Clock"
main.c(89): error:  #136: struct "<unnamed>" has no field "USART_CPOL"
main.c(90): error:  #136: struct "<unnamed>" has no field "USART_CPHA"
main.c(91): error:  #136: struct "<unnamed>" has no field "USART_LastBit"
这就是KEIL报的错  是怎么回事呢

一周热门 更多>