projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add pwm pins set registers.
[bertos.git]
/
bertos
/
mware
/
parser.h
diff --git
a/bertos/mware/parser.h
b/bertos/mware/parser.h
index ca1d26e99bfa29b030acc86699db9554ace8657f..281db3964c05e51c8a85fe110daf8a670fb3947b 100644
(file)
--- a/
bertos/mware/parser.h
+++ b/
bertos/mware/parser.h
@@
-118,6
+118,7
@@
#include "cfg/cfg_parser.h"
#include <cpu/types.h>
#include "cfg/cfg_parser.h"
#include <cpu/types.h>
+#include <cfg/debug.h>
/**
* Error generated by the commands through the return code.
/**
* Error generated by the commands through the return code.
@@
-163,7
+164,11
@@
struct CmdTemplate
*
* \param NAME Command name to register
*/
*
* \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.
/**
* Utility macro to create a command template.
@@
-219,7
+224,7
@@
MAKE_TEMPLATE(NAME, ARGS, RES, FLAGS)
*/
void parser_init(void);
*/
void parser_init(void);
-
void
parser_register_cmd(const struct CmdTemplate* cmd);
+
bool
parser_register_cmd(const struct CmdTemplate* cmd);
/**
/**