Wait until UART ready
This commit is contained in:
+1
-2
@@ -102,7 +102,7 @@ void uart_debug_print(const char *fmt, ...)
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
while (HAL_UART_GetState(&huart1) & HAL_UART_STATE_BUSY_TX);
|
||||
while (huart1.gState != HAL_UART_STATE_READY);
|
||||
HAL_UART_Transmit(&huart1, (uint8_t*)buf, len, 100);
|
||||
}
|
||||
}
|
||||
@@ -134,7 +134,6 @@ int main(void)
|
||||
|
||||
/* MCU Configuration--------------------------------------------------------*/
|
||||
|
||||
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
|
||||
HAL_Init();
|
||||
|
||||
/* USER CODE BEGIN Init */
|
||||
|
||||
Reference in New Issue
Block a user