We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
void func(void) { ; } SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC), ASK?, func, func info);
此时因为有符号?,无法编译,但是我的命令确实要带符号,该怎么操作呢?
The text was updated successfully, but these errors were encountered:
可以试试用 asii 转义 ASK\x3f
Sorry, something went wrong.
展开宏定义看了下,应该是不行的,变量名不能有特殊符号吧。 #define SHELL_EXPORT_CMD(_attr, _name, _func, _desc, ...) const char shellCmd##_name[] = #_name; const char shellDesc##_name[] = #_desc; SHELL_USED const ShellCommand shellCommand##_name SHELL_SECTION("shellCommand") = { .attr.value = _attr, .data.cmd.name = shellCmd##_name, .data.cmd.function = (int (*)())_func, .data.cmd.desc = shellDesc##_name, ##VA_ARGS }
那只能不用宏,直接把这个宏展开定义了
No branches or pull requests
void func(void)
{
;
}
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC), ASK?, func, func info);
此时因为有符号?,无法编译,但是我的命令确实要带符号,该怎么操作呢?
The text was updated successfully, but these errors were encountered: