语言:简体中文 | L1-Shell-Bridge-EN
模块代码如何成为 Shell 接口面。
l1_ext_shell_register_command_ex(name, fn, help, wp_tag)
fn 接收参数字符串,返回 0/非零。标签显示在 help -w 中。表格最多容纳 256 条命令(目前已注册 233 条)——当表格已满时,注册会被拒绝并给出明确错误,绝不会静默处理。
fn
help -w
l1_ext_shell_list_commands_a_z() l1_ext_shell_list_commands_by_wp()
TUI 命令桥(tui/tui_cmd.c)通过完全相同的方式枚举该表格,并渲染启动器——这是参考实现。任何 L1 模块都可以这样做。
tui/tui_cmd.c
shell_register_builtin / shell_unregister_builtin(自测路径使用这些)、shell_run(交互循环)、用于后台任务的 job_create / job_list / job_control,以及 tool_register 用于嵌入 ELF 载荷供 Shell run。
shell_register_builtin
shell_unregister_builtin
shell_run
job_create / job_list / job_control
tool_register
run
mkfs.fat32
health export
usage: ...
There was an error while loading. Please reload this page.