本文主要是介绍U-Boot DM(一):CMDLINE宏,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
一:U_BOOT_CMD
U_BOOT_CMD(demo, 4, 1, do_demo,"Driver model (dm) demo operations","list List available demo devices\n""demo hello <num> [<char>] Say hello\n""demo light [<num>] Set or get the lights\n""demo status <num> Get demo device status\n""demo list List available demo devices"
);
U_BOOT_CMD宏展开过程中的一些定义:
#define U_BOOT_CMD(_name, _maxargs, _rep, _cmd, _usage, _help) \U_BOOT_CMD_COMPLETE(_name, _maxargs, _rep, _cmd, _usage, _help, NULL)#define U_BOOT_CMD_COMPLETE(_name, _maxargs, _rep, _cmd, _usage, _help, _comp) \ll_entry_declare(cmd_tbl_t, _name, cmd) = \U_BOOT_CMD_MKENT_COMPLETE(_name, _maxargs, _rep, _cmd, \_usage, _help, _comp);#define
这篇关于U-Boot DM(一):CMDLINE宏的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!