static void MX_USART3_UART_Init(void) { / USER CODE BEGIN USART3_Init 0 / / USER CODE END USART3_Init 0 / / USER CODE BEGIN USART3_Init 1 / / USER CODE END USART3_Init 1 / huart3.Instance = USART3; huart3.Init.BaudRate = 115200; huart3.Init.WordLength = UART_WORDLENGTH_8B; huart3.Init.StopBits = UART_STOPBITS_1; huart3.Init.Parity = UART_PARITY_NONE; huart3.Init.Mode = UART_MODE_TX_RX; huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE; huart3.Init.OverSampling = UART_OVERSAMPLING_16; huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; huart3.Init.ClockPrescaler = UART_PRESCALER_DIV1; huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; if (HAL_UART_Init(&huart3) != HAL_OK) { Error_Handler(); } / USER CODE BEGIN USART3_Init 2 / // __HAL_UART_CLEAR_FLAG(&huart3, UART_FLAG_FE); // __HAL_UART_CLEAR_FLAG(&huart3, UART_FLAG_ORE); __HAL_UART_ENABLE_IT(&huart3, UART_IT_ERR);__HAL_UART_ENABLE_IT(&huart3, UART_IT_RXNE);__HAL_UART_ENABLE(&huart3);HAL_UART_Receive_IT(&huart3, &U3_RxDat_Tmp, 1);/ USER CODE END USART3_Init 2 / } static void MX_USART4_UART_Init(void) { / USER CODE BEGIN USART4_Init 0 / / USER CODE END USART4_Init 0 / / USER CODE BEGIN USART4_Init 1 / / USER CODE END USART4_Init 1 / huart4.Instance = USART4; huart4.Init.BaudRate = 9600; huart4.Init.WordLength = UART_WORDLENGTH_8B; huart4.Init.StopBits = UART_STOPBITS_1; huart4.Init.Parity = UART_PARITY_NONE; huart4.Init.Mode = UART_MODE_TX_RX; huart4.Init.HwFlowCtl = UART_HWCONTROL_NONE; huart4.Init.OverSampling = UART_OVERSAMPLING_16; huart4.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; huart4.Init.ClockPrescaler = UART_PRESCALER_DIV4; huart4.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; if (HAL_UART_Init(&huart4) != HAL_OK) { Error_Handler(); } / USER CODE BEGIN USART4_Init 2 / __HAL_UART_ENABLE_IT(&huart4, UART_IT_ERR);__HAL_UART_ENABLE_IT(&huart4, UART_IT_RXNE);__HAL_UART_ENABLE(&huart4);U4_Rx_Enable(); HAL_UART_Receive_IT(&huart4, &U4_RxDat_Tmp, 1);/ USER CODE END USART4_Init 2 / }
|