STM32-Printf用DMA方式输出

1.简单的printf打印,把底层的fputc重写就行函数 int fputc(int ch, FILE *f) { while (__HAL_UART_GET_FLAG(&huart1, UART_FLAG_TC) == RESET) {} HAL_UART_Transmit(&huart1, (uint8_t*) &ch,1,0xFF); return ch; } 2.经过DMA打
相关文章
相关标签/搜索