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 编辑 ] 此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。