@2019-01-30
【小記】
一般 rt-thread 發布的 bsp 庫默認的 rt_kprintf 函數的輸出設備是串口1,想要更改輸出設備為串口1,以 stm32 為例步驟如下:
首先,打開 UART2 設備
其次,在 menuconfig 中 RT-Thread Kernel --- Kernel Device Object --- Using console for rt_kprintf 修改 the device name for console 的值為 uart2
最后,在文件 <stm32f1xx_hal_msp.c> 中加入串口2相關的時鍾、引腳配置信息即可
