[drivers/serial] Introduce hooker for TTY (#8733)

In this patch, a hook list has been introduced to address the concerns
regarding coupling issues arising from modifications to the serial code
for integrating TTY logic.

Signed-off-by: Shell <smokewood@qq.com>
This commit is contained in:
Shell
2024-04-09 21:36:16 +08:00
committed by GitHub
parent 38204386b3
commit 4b0f42c24a
11 changed files with 90 additions and 35 deletions
+8 -1
View File
@@ -6,10 +6,17 @@ menuconfig RT_USING_LWP
The lwP is a light weight process running in user mode.
if RT_USING_LWP
config LWP_DEBUG
menuconfig LWP_DEBUG
bool "Enable debugging features of LwP"
default y
if LWP_DEBUG
config LWP_DEBUG_INIT
select RT_USING_HOOKLIST
bool "Enable debug mode of init process"
default n
endif
config RT_LWP_MAX_NR
int "The max number of light-weight process"
default 30
+2 -2
View File
@@ -137,7 +137,7 @@ static int lwp_startup(void)
char *argv[] = {0, "&"};
char *envp[] = {LWP_CONSOLE_PATH, 0};
#ifdef LWP_DEBUG
#ifdef LWP_DEBUG_INIT
int command;
int countdown = LATENCY_TIMES;
while (countdown)
@@ -152,7 +152,7 @@ static int lwp_startup(void)
rt_thread_mdelay(LATENCY_IN_MSEC);
}
rt_kprintf("Starting init ...\n");
#endif
#endif /* LWP_DEBUG_INIT */
for (size_t i = 0; i < sizeof(init_search_path)/sizeof(init_search_path[0]); i++)
{