Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2.0.1新增功能请教 #10

Open
mojinpan opened this issue Mar 1, 2019 · 1 comment
Open

V2.0.1新增功能请教 #10

mojinpan opened this issue Mar 1, 2019 · 1 comment

Comments

@mojinpan
Copy link

mojinpan commented Mar 1, 2019

在跟进大神的V2.0.1,有些问题和建议:
1、新增的SHELL_EXPORT_CMD_EX(cmd, func, desc, help)导出方式,就是最后增加了一个长描述,这个长描述默认可以被help命令解析并显示出来?
2、SHELL_GET_TICK()这个宏定义需要用户自己额外实现吧?建议shellRead及shellWrite那样,在结构体中用函数指针来实现,这样用户在shell实例化的过程统一处理比较好。

@NevermindZZT
Copy link
Owner

长描述是用作对命令的具体的说明,可以用help [命令]显示,类似于PC上有些命令的-h帮助吧
SHELL_GET_TICK这个,是用于过去系统时钟,主要是为了实现双击tab键快速输入help [命令]这样的,比如有一个erase命令,输入e以后可以单击tab补全成erase,然后双击tab可以补全成help erase
一般嵌入式芯片的库中都是有GetTick这个函数的,所以用的宏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants