#include #include #include #include #include "usart.h" #include "log.h" #include "main.h" static char _dbg_TXBuff[128]; void _dbg_printf(const char *format, ...) { uint32_t length; va_list args; va_start(args, format); length = vsnprintf((char *)_dbg_TXBuff, sizeof(_dbg_TXBuff), (char *)format, args); va_end(args); // HAL_UART_Transmit_DMA(&huart3, (uint8_t *)_dbg_TXBuff, length); HAL_UART_Transmit(&huart1, (uint8_t *)_dbg_TXBuff, length, 1000); }