[bsp]:修改控制台打印串口由rt_config.h控制

This commit is contained in:
zylx 2018-05-23 19:09:55 +08:00
parent a99b09658e
commit 21ea377318
2 changed files with 1 additions and 17 deletions

View File

@ -96,7 +96,7 @@ void rt_hw_board_init()
rt_components_board_init();
#ifdef RT_USING_CONSOLE
rt_console_set_device(CONSOLE_DEVICE);
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
#endif
}

View File

@ -46,24 +46,8 @@ extern char __ICFEDIT_region_RAM_end__;
#define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
#endif
// <o> Console on USART: <0=> no console <1=>USART 1 <2=>USART 2 <3=> USART 3
// <i>Default: 1
#define STM32_CONSOLE_USART 2
void rt_hw_board_init(void);
#if STM32_CONSOLE_USART == 0
#define CONSOLE_DEVICE "no"
#elif STM32_CONSOLE_USART == 1
#define CONSOLE_DEVICE "uart1"
#elif STM32_CONSOLE_USART == 2
#define CONSOLE_DEVICE "uart2"
#elif STM32_CONSOLE_USART == 3
#define CONSOLE_DEVICE "uart3"
#endif
#define FINSH_DEVICE_NAME CONSOLE_DEVICE
#endif
// <<< Use Configuration Wizard in Context Menu >>>