From ab8c1418a6931e6ef27b520aabddead3cdd2d05e Mon Sep 17 00:00:00 2001 From: a1012112796 <1012112796@qq.com> Date: Mon, 10 Oct 2022 21:47:11 +0800 Subject: [PATCH] tshell is the default value of FINSH_THREAD_NAME --- components/drivers/serial/serial_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/drivers/serial/serial_v2.c b/components/drivers/serial/serial_v2.c index b1e5002d0c..9d550be484 100644 --- a/components/drivers/serial/serial_v2.c +++ b/components/drivers/serial/serial_v2.c @@ -1247,7 +1247,7 @@ static rt_err_t rt_serial_control(struct rt_device *dev, struct winsize* p_winsize; p_winsize = (struct winsize*)args; - if(rt_thread_self() != rt_thread_find("tshell")) + if(rt_thread_self() != rt_thread_find(FINSH_THREAD_NAME)) { /* only can be used in tshell thread; otherwise, return default size */ p_winsize->ws_col = 80;