Merge pull request #1466 from qgyhd1234/407uart

[bsp]:修改控制台打印串口由rt_config.h控制
This commit is contained in:
Bernard Xiong 2018-05-24 11:09:24 +08:00 committed by GitHub
commit b0a91ad136
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 17 deletions

View File

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

View File

@ -46,24 +46,8 @@ extern char __ICFEDIT_region_RAM_end__;
#define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024) #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
#endif #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); 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 #endif
// <<< Use Configuration Wizard in Context Menu >>> // <<< Use Configuration Wizard in Context Menu >>>