COMMAND_PARSE_BOOL is only used within OpenOCD.
 
Symbols
loading...
Files
loading...

COMMAND_PARSE_BOOL macro

Parse the string @c as a binary parameter, storing the boolean value in @c out. The strings @c on and @c off are used to match different strings for true and false options (e.g. "on" and "off" or "enable" and "disable").

Syntax

#define COMMAND_PARSE_BOOL(in, out, on, off) \     do { \     bool value; \     int retval_macro_tmp = command_parse_bool_arg(in, &value); \     if (retval_macro_tmp != ERROR_OK) { \     command_print(CMD, stringify(out) \     " option value ('%s') is not valid", in); \     command_print(CMD, " choices are '%s' or '%s'", \     on, off); \     return retval_macro_tmp; \     } \     out = value; \     } while (0)

Arguments

in

out

on

off

References

LocationText
command.h:503
#define COMMAND_PARSE_BOOL(in, out, on, off) \
command.h:531
COMMAND_PARSE_BOOL(in, out, "on", "off")
command.h:534
COMMAND_PARSE_BOOL(in, out, "enable", "disable")
jtagspi.c:431
COMMAND_PARSE_BOOL(CMD_ARGV[1], jtagspi_info->always_4byte, "on", "off");
mips_mips64.c:1129
COMMAND_PARSE_BOOL(CMD_ARGV[0], mips64->mips64mode32, "on", "off");