在user_init( )中开始的地方调用user_uart_init( ) /** * @brief 波特率:9600 . * @note no. * @param no. * @retval no. */ void user_uart_init(void) { UART_ConfigTypeDef uart_config; uart_config.baud_rate = BIT_RATE_9600; uart_config.data_bits = UART_WordLength_8b; uart_config.parity = USART_Parity_None; uart_config.stop_bits = USART_StopBits_1; uart_config.flow_ctrl = USART_HardwareFlowControl_None; uart_config.UART_RxFlowThresh = 0; uart_config.UART_InverseMask = UART_None_Inverse; UART_ParamConfig(UART1, &uart_config); UART_SetPrintPort( UART1 ); } |