From 752238dbe82bd995d0853bc9c03117157bf5f38c Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 30 Jan 2021 19:47:13 +0800 Subject: [PATCH] bsp:ls2k:make set console device more flexible --- bsp/ls2kdev/drivers/board.c | 2 +- bsp/ls2kdev/rtconfig.h | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/bsp/ls2kdev/drivers/board.c b/bsp/ls2kdev/drivers/board.c index 1d165cf5ef..9b79902c41 100644 --- a/bsp/ls2kdev/drivers/board.c +++ b/bsp/ls2kdev/drivers/board.c @@ -90,7 +90,7 @@ void rt_hw_board_init(void) /* init hardware UART device */ rt_hw_uart_init(); /* set console device */ - rt_console_set_device("uart0"); + rt_console_set_device(RT_CONSOLE_DEVICE_NAME); #endif #ifdef RT_USING_HEAP diff --git a/bsp/ls2kdev/rtconfig.h b/bsp/ls2kdev/rtconfig.h index dfaa45a009..c4c1bd2a86 100644 --- a/bsp/ls2kdev/rtconfig.h +++ b/bsp/ls2kdev/rtconfig.h @@ -37,7 +37,7 @@ #define RT_USING_DEVICE #define RT_USING_CONSOLE #define RT_CONSOLEBUF_SIZE 256 -#define RT_CONSOLE_DEVICE_NAME "uart" +#define RT_CONSOLE_DEVICE_NAME "uart0" #define RT_VER_NUM 0x40003 #define ARCH_CPU_64BIT #define ARCH_MIPS64 @@ -82,6 +82,8 @@ #define RT_DFS_ELM_WORD_ACCESS #define RT_DFS_ELM_USE_LFN_3 #define RT_DFS_ELM_USE_LFN 3 +#define RT_DFS_ELM_LFN_UNICODE_0 +#define RT_DFS_ELM_LFN_UNICODE 0 #define RT_DFS_ELM_MAX_LFN 255 #define RT_DFS_ELM_DRIVES 9 #define RT_DFS_ELM_MAX_SECTOR_SIZE 512 @@ -114,6 +116,7 @@ /* Socket abstraction layer */ #define RT_USING_SAL +#define SAL_INTERNET_CHECK /* protocol stack implement */ @@ -220,9 +223,6 @@ /* system packages */ -/* Micrium: Micrium software products porting for RT-Thread */ - - /* peripheral libraries and drivers */ @@ -231,9 +231,6 @@ /* samples: kernel and components samples */ - -/* games: games run on RT-Thread console */ - #define SOC_LS2K1000 #endif