diff --git a/Core/Src/main.c b/Core/Src/main.c index 69c046c..cf51c07 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -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 */