* $WIZ$ type = "int"
* $WIZ$ min = 0
*/
-#define PARSER_MAX_ARGS 4
+#define CONFIG_PARSER_MAX_ARGS 4
/**
* Max number of commands
* $WIZ$ type = "int"
* $WIZ$ min = 8
*/
-#define MAX_COMMANDS_NUMBER 16
+#define CONFIG_MAX_COMMANDS_NUMBER 16
/**
* Enable compatibility behaviour.
static const void* get_key_from_command(const void* cmd, uint8_t* length);
/// Hashtable that handles the commands that can be executed
-DECLARE_HASHTABLE_STATIC(commands, MAX_COMMANDS_NUMBER, get_key_from_command);
+DECLARE_HASHTABLE_STATIC(commands, CONFIG_MAX_COMMANDS_NUMBER, get_key_from_command);
/**
return end;
}
-bool parser_get_cmd_arguments(const char* input, const struct CmdTemplate* cmdp, parms args[PARSER_MAX_ARGS])
+bool parser_get_cmd_arguments(const char* input, const struct CmdTemplate* cmdp, parms args[CONFIG_PARSER_MAX_ARGS])
{
input = skip_to_params(input, cmdp);
if (!input)
bool parser_process_line(const char* input)
{
const struct CmdTemplate *cmdp;
- parms args[PARSER_MAX_ARGS];
+ parms args[CONFIG_PARSER_MAX_ARGS];
cmdp = parser_get_cmd_template(input);
if (!cmdp)
*
* \return False if the command returned an error, true otherwise
*/
-INLINE bool parser_execute_cmd(const struct CmdTemplate* templ, parms args[PARSER_MAX_ARGS])
+INLINE bool parser_execute_cmd(const struct CmdTemplate* templ, parms args[CONFIG_PARSER_MAX_ARGS])
{
return (templ->func(args) == 0);
}
*
* \return True if everything OK, false in case of parsing error.
*/
-bool parser_get_cmd_arguments(const char* line, const struct CmdTemplate* templ, parms args[PARSER_MAX_ARGS]);
+bool parser_get_cmd_arguments(const char* line, const struct CmdTemplate* templ, parms args[CONFIG_PARSER_MAX_ARGS]);
#if CONFIG_ENABLE_COMPAT_BEHAVIOUR