#include "cfg/cfg_parser.h"
#include <cpu/types.h>
+#include <cfg/debug.h>
/**
* Error generated by the commands through the return code.
*
* \param NAME Command name to register
*/
-#define REGISTER_CMD(NAME) REGISTER_FUNCTION(&cmd_ ## NAME ## _template)
+#define REGISTER_CMD(NAME) \
+ do { \
+ if (!REGISTER_FUNCTION(&cmd_ ## NAME ## _template)) \
+ ASSERT2(0, "Error in registering command, no space left"); \
+ } while (0)
/**
* Utility macro to create a command template.
*/
void parser_init(void);
-void parser_register_cmd(const struct CmdTemplate* cmd);
+bool parser_register_cmd(const struct CmdTemplate* cmd);
/**