初级会员

- 积分
- 190
- 金钱
- 190
- 注册时间
- 2014-2-23
- 在线时间
- 0 小时
|

楼主 |
发表于 2014-10-23 14:24:34
|
显示全部楼层
回复【2楼】龙之谷:
---------------------------------
static void USART_Config(void)
{
USART_InitTypeDef USART_InitStructure;
/* USARTx configured as follows:
- BaudRate = 115200 baud
- Word Length = 8 Bits
- One Stop Bit
- No parity
- Hardware flow control disabled (RTS and CTS signals)
- Receive and transmit enabled
*/
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_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
STM_EVAL_COMInit(COM1, &USART_InitStructure);
} |
|