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 编辑 ]
此帖出自
小平头技术问答
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报的错 是怎么回事呢
一周热门 更多>