remove unused param to arg parser

This commit is contained in:
John
2023-10-01 14:54:27 +02:00
parent acc6eddbba
commit c71b1daf74
9 changed files with 118 additions and 118 deletions
+7 -7
View File
@@ -53,20 +53,20 @@ using std::dec;
/** the definition of the KNX arguments. */
static const argDef g_knx_argDefs[] = {
{nullptr, 0, nullptr, 0, "KNX options:", 1 },
{nullptr, 0, nullptr, 0, "KNX options:"},
{"knxurl", O_URL, "URL", af_optional, "URL to open (i.e. \"[multicast][@interface]\" for KNXnet/IP"
#ifdef HAVE_KNXD
" or \"ip:host[:port]\" / \"local:/socketpath\" for knxd"
#endif
") (no default)", 0 },
") (no default)"},
{"knxrage", O_AGR, "SEC", 0, "Maximum age in seconds for using the last value of read messages (0=disable)"
" [5]", 0 },
" [5]"},
{"knxwage", O_AGW, "SEC", 0, "Maximum age in seconds for using the last value for reads on write messages"
" (0=disable), [99999999]", 0 },
{"knxint", O_INT, "FILE", 0, "Read KNX integration settings from FILE [/etc/ebusd/knx.cfg]", 0 },
{"knxvar", O_VAR, "NAME=VALUE[,...]", 0, "Add variable(s) to the read KNX integration settings", 0 },
" (0=disable), [99999999]"},
{"knxint", O_INT, "FILE", 0, "Read KNX integration settings from FILE [/etc/ebusd/knx.cfg]"},
{"knxvar", O_VAR, "NAME=VALUE[,...]", 0, "Add variable(s) to the read KNX integration settings"},
{nullptr, 0, nullptr, 0, nullptr, 0 },
{nullptr, 0, nullptr, 0, nullptr},
};
static const char* g_url = nullptr; //!< URL of KNX daemon
+54 -54
View File
@@ -177,21 +177,21 @@ static bool s_scanConfigOrPathSet = false;
/** the definition of the known program arguments. */
static const argDef argDefs[] = {
{nullptr, 0, nullptr, 0, "Device options:", 1 },
{nullptr, 0, nullptr, 0, "Device options:"},
{"device", 'd', "DEV", 0, "Use DEV as eBUS device ("
"prefix \"ens:\" for enhanced high speed device or "
"\"enh:\" for enhanced device, with "
"\"IP:PORT\" for network device or "
"\"DEVICE\" for serial device"
") [/dev/ttyUSB0]", 0 },
{"nodevicecheck", 'n', nullptr, 0, "Skip serial eBUS device test", 0 },
{"readonly", 'r', nullptr, 0, "Only read from device, never write to it", 0 },
{"initsend", O_INISND, nullptr, 0, "Send an initial escape symbol after connecting device", 0 },
{"latency", O_DEVLAT, "MSEC", 0, "Extra transfer latency in ms [0]", 0 },
") [/dev/ttyUSB0]"},
{"nodevicecheck", 'n', nullptr, 0, "Skip serial eBUS device test"},
{"readonly", 'r', nullptr, 0, "Only read from device, never write to it"},
{"initsend", O_INISND, nullptr, 0, "Send an initial escape symbol after connecting device"},
{"latency", O_DEVLAT, "MSEC", 0, "Extra transfer latency in ms [0]"},
{nullptr, 0, nullptr, 0, "Message configuration options:", 2 },
{nullptr, 0, nullptr, 0, "Message configuration options:"},
{"configpath", 'c', "PATH", 0, "Read CSV config files from PATH (local folder or HTTPS URL) ["
CONFIG_PATH "]", 0 },
CONFIG_PATH "]"},
{"scanconfig", 's', "ADDR", af_optional, "Pick CSV config files matching initial scan ADDR: "
"empty for broadcast ident message (default when configpath is not given), "
"\"none\" for no initial scan message, "
@@ -199,69 +199,69 @@ static const argDef argDefs[] = {
"a single hex address to scan, or "
"\"off\" for not picking CSV files by scan result (default when configpath is given).\n"
"If combined with --checkconfig, you can add scan message data as "
"arguments for checking a particular scan configuration, e.g. \"FF08070400/0AB5454850303003277201\".", 0 },
{"scanretries", O_SCNRET, "COUNT", 0, "Retry scanning devices COUNT times [5]", 0 },
"arguments for checking a particular scan configuration, e.g. \"FF08070400/0AB5454850303003277201\"."},
{"scanretries", O_SCNRET, "COUNT", 0, "Retry scanning devices COUNT times [5]"},
{"configlang", O_CFGLNG, "LANG", 0,
"Prefer LANG in multilingual configuration files [system default language]", 0 },
{"checkconfig", O_CHKCFG, nullptr, 0, "Check config files, then stop", 0 },
"Prefer LANG in multilingual configuration files [system default language]"},
{"checkconfig", O_CHKCFG, nullptr, 0, "Check config files, then stop"},
{"dumpconfig", O_DMPCFG, "FORMAT", af_optional,
"Check and dump config files in FORMAT (\"json\" or \"csv\"), then stop", 0 },
{"dumpconfigto", O_DMPCTO, "FILE", 0, "Dump config files to FILE", 0 },
{"pollinterval", O_POLINT, "SEC", 0, "Poll for data every SEC seconds (0=disable) [5]", 0 },
"Check and dump config files in FORMAT (\"json\" or \"csv\"), then stop"},
{"dumpconfigto", O_DMPCTO, "FILE", 0, "Dump config files to FILE"},
{"pollinterval", O_POLINT, "SEC", 0, "Poll for data every SEC seconds (0=disable) [5]"},
{"inject", 'i', "stop", af_optional, "Inject remaining arguments as already seen messages (e.g. "
"\"FF08070400/0AB5454850303003277201\"), optionally stop afterwards", 0 },
"\"FF08070400/0AB5454850303003277201\"), optionally stop afterwards"},
#ifdef HAVE_SSL
{"cafile", O_CAFILE, "FILE", 0, "Use CA FILE for checking certificates (uses defaults,"
" \"#\" for insecure)", 0 },
{"capath", O_CAPATH, "PATH", 0, "Use CA PATH for checking certificates (uses defaults)", 0 },
" \"#\" for insecure)"},
{"capath", O_CAPATH, "PATH", 0, "Use CA PATH for checking certificates (uses defaults)"},
#endif // HAVE_SSL
{nullptr, 0, nullptr, 0, "eBUS options:", 3 },
{"address", 'a', "ADDR", 0, "Use hex ADDR as own master bus address [31]", 0 },
{"answer", O_ANSWER, nullptr, 0, "Actively answer to requests from other masters", 0 },
{"acquiretimeout", O_ACQTIM, "MSEC", 0, "Stop bus acquisition after MSEC ms [10]", 0 },
{"acquireretries", O_ACQRET, "COUNT", 0, "Retry bus acquisition COUNT times [3]", 0 },
{"sendretries", O_SNDRET, "COUNT", 0, "Repeat failed sends COUNT times [2]", 0 },
{"receivetimeout", O_RCVTIM, "MSEC", 0, "Expect a slave to answer within MSEC ms [25]", 0 },
{"numbermasters", O_MASCNT, "COUNT", 0, "Expect COUNT masters on the bus, 0 for auto detection [0]", 0 },
{"generatesyn", O_GENSYN, nullptr, 0, "Enable AUTO-SYN symbol generation", 0 },
{nullptr, 0, nullptr, 0, "eBUS options:"},
{"address", 'a', "ADDR", 0, "Use hex ADDR as own master bus address [31]"},
{"answer", O_ANSWER, nullptr, 0, "Actively answer to requests from other masters"},
{"acquiretimeout", O_ACQTIM, "MSEC", 0, "Stop bus acquisition after MSEC ms [10]"},
{"acquireretries", O_ACQRET, "COUNT", 0, "Retry bus acquisition COUNT times [3]"},
{"sendretries", O_SNDRET, "COUNT", 0, "Repeat failed sends COUNT times [2]"},
{"receivetimeout", O_RCVTIM, "MSEC", 0, "Expect a slave to answer within MSEC ms [25]"},
{"numbermasters", O_MASCNT, "COUNT", 0, "Expect COUNT masters on the bus, 0 for auto detection [0]"},
{"generatesyn", O_GENSYN, nullptr, 0, "Enable AUTO-SYN symbol generation"},
{nullptr, 0, nullptr, 0, "Daemon options:", 4 },
{"accesslevel", O_ACLDEF, "LEVEL", 0, "Set default access level to LEVEL (\"*\" for everything) [\"\"]", 0 },
{"aclfile", O_ACLFIL, "FILE", 0, "Read access control list from FILE", 0 },
{"foreground", 'f', nullptr, 0, "Run in foreground", 0 },
{"enablehex", O_HEXCMD, nullptr, 0, "Enable hex command", 0 },
{"enabledefine", O_DEFCMD, nullptr, 0, "Enable define command", 0 },
{"pidfile", O_PIDFIL, "FILE", 0, "PID file name (only for daemon) [" PACKAGE_PIDFILE "]", 0 },
{"port", 'p', "PORT", 0, "Listen for command line connections on PORT [8888]", 0 },
{"localhost", O_LOCAL, nullptr, 0, "Listen for command line connections on 127.0.0.1 interface only", 0 },
{"httpport", O_HTTPPT, "PORT", 0, "Listen for HTTP connections on PORT, 0 to disable [0]", 0 },
{"htmlpath", O_HTMLPA, "PATH", 0, "Path for HTML files served by HTTP port [/var/ebusd/html]", 0 },
{"updatecheck", O_UPDCHK, "MODE", 0, "Set automatic update check to MODE (on|off) [on]", 0 },
{nullptr, 0, nullptr, 0, "Daemon options:"},
{"accesslevel", O_ACLDEF, "LEVEL", 0, "Set default access level to LEVEL (\"*\" for everything) [\"\"]"},
{"aclfile", O_ACLFIL, "FILE", 0, "Read access control list from FILE"},
{"foreground", 'f', nullptr, 0, "Run in foreground"},
{"enablehex", O_HEXCMD, nullptr, 0, "Enable hex command"},
{"enabledefine", O_DEFCMD, nullptr, 0, "Enable define command"},
{"pidfile", O_PIDFIL, "FILE", 0, "PID file name (only for daemon) [" PACKAGE_PIDFILE "]"},
{"port", 'p', "PORT", 0, "Listen for command line connections on PORT [8888]"},
{"localhost", O_LOCAL, nullptr, 0, "Listen for command line connections on 127.0.0.1 interface only"},
{"httpport", O_HTTPPT, "PORT", 0, "Listen for HTTP connections on PORT, 0 to disable [0]"},
{"htmlpath", O_HTMLPA, "PATH", 0, "Path for HTML files served by HTTP port [/var/ebusd/html]"},
{"updatecheck", O_UPDCHK, "MODE", 0, "Set automatic update check to MODE (on|off) [on]"},
{nullptr, 0, nullptr, 0, "Log options:", 5 },
{nullptr, 0, nullptr, 0, "Log options:"},
{"logfile", 'l', "FILE", 0, "Write log to FILE (only for daemon, empty string for using syslog) ["
PACKAGE_LOGFILE "]", 0 },
PACKAGE_LOGFILE "]"},
{"log", O_LOG, "AREAS:LEVEL", 0, "Only write log for matching AREA(S) below or equal to LEVEL"
" (alternative to --logareas/--logevel, may be used multiple times) [all:notice]", 0 },
" (alternative to --logareas/--logevel, may be used multiple times) [all:notice]"},
{"logareas", O_LOGARE, "AREAS", 0, "Only write log for matching AREA(S): main|network|bus|update|other"
"|all [all]", 0 },
"|all [all]"},
{"loglevel", O_LOGLEV, "LEVEL", 0, "Only write log below or equal to LEVEL: error|notice|info|debug"
" [notice]", 0 },
" [notice]"},
{nullptr, 0, nullptr, 0, "Raw logging options:", 6 },
{nullptr, 0, nullptr, 0, "Raw logging options:"},
{"lograwdata", O_RAW, "bytes", af_optional,
"Log messages or all received/sent bytes on the bus", 0 },
{"lograwdatafile", O_RAWFIL, "FILE", 0, "Write raw log to FILE [" PACKAGE_LOGFILE "]", 0 },
{"lograwdatasize", O_RAWSIZ, "SIZE", 0, "Make raw log file no larger than SIZE kB [100]", 0 },
"Log messages or all received/sent bytes on the bus"},
{"lograwdatafile", O_RAWFIL, "FILE", 0, "Write raw log to FILE [" PACKAGE_LOGFILE "]"},
{"lograwdatasize", O_RAWSIZ, "SIZE", 0, "Make raw log file no larger than SIZE kB [100]"},
{nullptr, 0, nullptr, 0, "Binary dump options:", 7 },
{"dump", 'D', nullptr, 0, "Enable binary dump of received bytes", 0 },
{"dumpfile", O_DMPFIL, "FILE", 0, "Dump received bytes to FILE [/tmp/" PACKAGE "_dump.bin]", 0 },
{"dumpsize", O_DMPSIZ, "SIZE", 0, "Make dump file no larger than SIZE kB [100]", 0 },
{"dumpflush", O_DMPFLU, nullptr, 0, "Flush each byte", 0 },
{nullptr, 0, nullptr, 0, "Binary dump options:"},
{"dump", 'D', nullptr, 0, "Enable binary dump of received bytes"},
{"dumpfile", O_DMPFIL, "FILE", 0, "Dump received bytes to FILE [/tmp/" PACKAGE "_dump.bin]"},
{"dumpsize", O_DMPSIZ, "SIZE", 0, "Make dump file no larger than SIZE kB [100]"},
{"dumpflush", O_DMPFLU, nullptr, 0, "Flush each byte"},
{nullptr, 0, nullptr, 0, nullptr, 0 },
{nullptr, 0, nullptr, 0, nullptr},
};
/**
+24 -24
View File
@@ -57,43 +57,43 @@ using std::dec;
/** the definition of the MQTT arguments. */
static const argDef g_mqtt_argDefs[] = {
{nullptr, 0, nullptr, 0, "MQTT options:", 1 },
{"mqtthost", O_HOST, "HOST", 0, "Connect to MQTT broker on HOST [localhost]", 0 },
{"mqttport", O_PORT, "PORT", 0, "Connect to MQTT broker on PORT (usually 1883), 0 to disable [0]", 0 },
{nullptr, 0, nullptr, 0, "MQTT options:"},
{"mqtthost", O_HOST, "HOST", 0, "Connect to MQTT broker on HOST [localhost]"},
{"mqttport", O_PORT, "PORT", 0, "Connect to MQTT broker on PORT (usually 1883), 0 to disable [0]"},
{"mqttclientid", O_CLID, "ID", 0, "Set client ID for connection to MQTT broker [" PACKAGE_NAME "_"
PACKAGE_VERSION "_<pid>]", 0 },
{"mqttuser", O_USER, "USER", 0, "Connect as USER to MQTT broker (no default)", 0 },
{"mqttpass", O_PASS, "PASSWORD", 0, "Use PASSWORD when connecting to MQTT broker (no default)", 0 },
PACKAGE_VERSION "_<pid>]"},
{"mqttuser", O_USER, "USER", 0, "Connect as USER to MQTT broker (no default)"},
{"mqttpass", O_PASS, "PASSWORD", 0, "Use PASSWORD when connecting to MQTT broker (no default)"},
{"mqtttopic", O_TOPI, "TOPIC", 0,
"Use MQTT TOPIC (prefix before /%circuit/%name or complete format) [ebusd]", 0 },
"Use MQTT TOPIC (prefix before /%circuit/%name or complete format) [ebusd]"},
{"mqttglobal", O_GTOP, "TOPIC", 0,
"Use TOPIC for global data (default is \"global/\" suffix to mqtttopic prefix)", 0 },
{"mqttretain", O_RETA, nullptr, 0, "Retain all topics instead of only selected global ones", 0 },
{"mqttqos", O_PQOS, "QOS", 0, "Set the QoS value for all topics (0-2) [0]", 0 },
{"mqttint", O_INTF, "FILE", 0, "Read MQTT integration settings from FILE (no default)", 0 },
{"mqttvar", O_IVAR, "NAME=VALUE[,...]", 0, "Add variable(s) to the read MQTT integration settings", 0 },
"Use TOPIC for global data (default is \"global/\" suffix to mqtttopic prefix)"},
{"mqttretain", O_RETA, nullptr, 0, "Retain all topics instead of only selected global ones"},
{"mqttqos", O_PQOS, "QOS", 0, "Set the QoS value for all topics (0-2) [0]"},
{"mqttint", O_INTF, "FILE", 0, "Read MQTT integration settings from FILE (no default)"},
{"mqttvar", O_IVAR, "NAME=VALUE[,...]", 0, "Add variable(s) to the read MQTT integration settings"},
{"mqttjson", O_JSON, "short", af_optional,
"Publish in JSON format instead of strings, optionally in short (value directly below field key)", 0 },
{"mqttverbose", O_VERB, nullptr, 0, "Publish all available attributes", 0 },
"Publish in JSON format instead of strings, optionally in short (value directly below field key)"},
{"mqttverbose", O_VERB, nullptr, 0, "Publish all available attributes"},
#if (LIBMOSQUITTO_VERSION_NUMBER >= 1003001)
{"mqttlog", O_LOGL, nullptr, 0, "Log library events", 0 },
{"mqttlog", O_LOGL, nullptr, 0, "Log library events"},
#endif
#if (LIBMOSQUITTO_VERSION_NUMBER >= 1004001)
{"mqttversion", O_VERS, "VERSION", 0, "Use protocol VERSION [3.1]", 0 },
{"mqttversion", O_VERS, "VERSION", 0, "Use protocol VERSION [3.1]"},
#endif
{"mqttignoreinvalid", O_IGIN, nullptr, 0,
"Ignore invalid parameters during init (e.g. for DNS not resolvable yet)", 0 },
{"mqttchanges", O_CHGS, nullptr, 0, "Whether to only publish changed messages instead of all received", 0 },
"Ignore invalid parameters during init (e.g. for DNS not resolvable yet)"},
{"mqttchanges", O_CHGS, nullptr, 0, "Whether to only publish changed messages instead of all received"},
#if (LIBMOSQUITTO_MAJOR >= 1)
{"mqttca", O_CAFI, "CA", 0, "Use CA file or dir (ending with '/') for MQTT TLS (no default)", 0 },
{"mqttcert", O_CERT, "CERTFILE", 0, "Use CERTFILE for MQTT TLS client certificate (no default)", 0 },
{"mqttkey", O_KEYF, "KEYFILE", 0, "Use KEYFILE for MQTT TLS client certificate (no default)", 0 },
{"mqttkeypass", O_KEPA, "PASSWORD", 0, "Use PASSWORD for the encrypted KEYFILE (no default)", 0 },
{"mqttinsecure", O_INSE, nullptr, 0, "Allow insecure TLS connection (e.g. using a self signed certificate)", 0 },
{"mqttca", O_CAFI, "CA", 0, "Use CA file or dir (ending with '/') for MQTT TLS (no default)"},
{"mqttcert", O_CERT, "CERTFILE", 0, "Use CERTFILE for MQTT TLS client certificate (no default)"},
{"mqttkey", O_KEYF, "KEYFILE", 0, "Use KEYFILE for MQTT TLS client certificate (no default)"},
{"mqttkeypass", O_KEPA, "PASSWORD", 0, "Use PASSWORD for the encrypted KEYFILE (no default)"},
{"mqttinsecure", O_INSE, nullptr, 0, "Allow insecure TLS connection (e.g. using a self signed certificate)"},
#endif
{nullptr, 0, nullptr, 0, nullptr, 0 },
{nullptr, 0, nullptr, 0, nullptr},
};
static const char* g_host = "localhost"; //!< host name of MQTT broker [localhost]
+3 -3
View File
@@ -75,13 +75,13 @@ void buildOpts(const argDef *argDefs, int &count, int &shortCharsCount, int &sho
}
}
static const argDef endArgDef = {nullptr, 0, nullptr, 0, nullptr, 0 };
static const argDef helpArgDef = {"help", '?', nullptr, 0, "Give this help list", 0 };
static const argDef endArgDef = {nullptr, 0, nullptr, 0, nullptr};
static const argDef helpArgDef = {"help", '?', nullptr, 0, "Give this help list"};
static const argDef helpArgDefs[] = {
helpArgDef,
endArgDef
};
static const argDef versionArgDef = {"version", 'V', nullptr, 0, "Print program version", 0 };
static const argDef versionArgDef = {"version", 'V', nullptr, 0, "Print program version"};
static const argDef versionArgDefs[] = {
versionArgDef,
endArgDef
-1
View File
@@ -37,7 +37,6 @@ typedef struct argDef {
const char* valueName; //!< the optional argument value name
int flags; //!< flags for the argument, bit combination of @a ArgFlag
const char* help; //!< help text (mandatory)
int unused; //!< currently unused (kept for compatibility to argp)
} argDef;
struct argParseOpt;
+2 -1
View File
@@ -1,5 +1,6 @@
AM_CXXFLAGS = -I$(top_srcdir)/src \
-isystem$(top_srcdir)
-isystem$(top_srcdir) \
-Wno-unused-parameter
bin_PROGRAMS = ebusctl \
ebuspicloader
+6 -6
View File
@@ -64,14 +64,14 @@ static struct options opt = {
/** the definition of the known program arguments. */
static const argDef argDefs[] = {
{nullptr, 0, nullptr, 0, "Options:", 1 },
{"server", 's', "HOST", 0, "Connect to " PACKAGE " on HOST (name or IP) [localhost]", 0 },
{"port", 'p', "PORT", 0, "Connect to " PACKAGE " on PORT [8888]", 0 },
{nullptr, 0, nullptr, 0, "Options:"},
{"server", 's', "HOST", 0, "Connect to " PACKAGE " on HOST (name or IP) [localhost]"},
{"port", 'p', "PORT", 0, "Connect to " PACKAGE " on PORT [8888]"},
{"timeout", 't', "SECS", 0, "Timeout for connecting to/receiving from " PACKAGE
", 0 for none [60]", 0 },
{"error", 'e', nullptr, 0, "Exit non-zero if the connection was fine but the response indicates non-success", 0},
", 0 for none [60]"},
{"error", 'e', nullptr, 0, "Exit non-zero if the connection was fine but the response indicates non-success"},
{nullptr, 0, nullptr, 0, nullptr, 0 },
{nullptr, 0, nullptr, 0, nullptr},
};
/**
+3 -3
View File
@@ -60,10 +60,10 @@ static struct options opt = {
/** the definition of the known program arguments. */
static const ebusd::argDef argDefs[] = {
{"device", 'd', "DEV", 0, "Write to DEV (serial device) [/dev/ttyUSB60]", 0 },
{"time", 't', "USEC", 0, "Delay each byte by USEC us [10000]", 0 },
{"device", 'd', "DEV", 0, "Write to DEV (serial device) [/dev/ttyUSB60]"},
{"time", 't', "USEC", 0, "Delay each byte by USEC us [10000]"},
{nullptr, 0, nullptr, 0, nullptr, 0 },
{nullptr, 0, nullptr, 0, nullptr},
};
/**
+19 -19
View File
@@ -43,29 +43,29 @@ using ebusd::socketConnect;
/** the definition of the known program arguments. */
static const ebusd::argDef argDefs[] = {
{nullptr, 0, nullptr, 0, "IP options:", 1 },
{"dhcp", 'd', nullptr, 0, "set dynamic IP address via DHCP (default)", 0 },
{"ip", 'i', "IP", 0, "set fix IP address (e.g. 192.168.0.10)", 0 },
{"mask", 'm', "MASK", 0, "set fix IP mask (e.g. 24)", 0 },
{"gateway", 'g', "GW", 0, "set fix IP gateway to GW (if necessary and other than net address + 1)", 0 },
{"macip", 'M', nullptr, 0, "set the MAC address suffix from the IP address", 0 },
{"macid", 'N', nullptr, 0, "set the MAC address suffix from internal ID (default)", 0 },
{nullptr, 0, nullptr, 0, "eBUS options:", 2 },
{nullptr, 0, nullptr, 0, "IP options:"},
{"dhcp", 'd', nullptr, 0, "set dynamic IP address via DHCP (default)"},
{"ip", 'i', "IP", 0, "set fix IP address (e.g. 192.168.0.10)"},
{"mask", 'm', "MASK", 0, "set fix IP mask (e.g. 24)"},
{"gateway", 'g', "GW", 0, "set fix IP gateway to GW (if necessary and other than net address + 1)"},
{"macip", 'M', nullptr, 0, "set the MAC address suffix from the IP address"},
{"macid", 'N', nullptr, 0, "set the MAC address suffix from internal ID (default)"},
{nullptr, 0, nullptr, 0, "eBUS options:"},
{"arbdel", 'a', "US", 0, "set arbitration delay to US microseconds (0-620 in steps of 10, default 200"
", since firmware 20211128)", 0 },
{nullptr, 0, nullptr, 0, "PIC options:", 3 },
{"pingon", 'p', nullptr, 0, "enable visual ping (default)", 0 },
{"pingoff", 'o', nullptr, 0, "disable visual ping", 0 },
", since firmware 20211128)"},
{nullptr, 0, nullptr, 0, "PIC options:"},
{"pingon", 'p', nullptr, 0, "enable visual ping (default)"},
{"pingoff", 'o', nullptr, 0, "disable visual ping"},
{"variant", -3, "VARIANT", 0, "set the VARIANT to U=USB/RPI (high-speed), W=WIFI, E=Ethernet,"
" N=non-enhanced USB/RPI/WIFI, F=non-enhanced Ethernet"
" (lowercase to allow hardware jumpers, default \"u\""
", since firmware 20221206)", 0 },
{"flash", 'f', "FILE", 0, "flash the FILE to the device", 0 },
{"reset", 'r', nullptr, 0, "reset the device at the end on success", 0 },
{nullptr, 0, nullptr, 0, "Tool options:", 9 },
{"verbose", 'v', nullptr, 0, "enable verbose output", 0 },
{"slow", 's', nullptr, 0, "low speed mode for transfer (115kBd instead of 921kBd)", 0 },
{nullptr, 0, nullptr, 0, nullptr, 0 },
", since firmware 20221206)"},
{"flash", 'f', "FILE", 0, "flash the FILE to the device"},
{"reset", 'r', nullptr, 0, "reset the device at the end on success"},
{nullptr, 0, nullptr, 0, "Tool options:"},
{"verbose", 'v', nullptr, 0, "enable verbose output"},
{"slow", 's', nullptr, 0, "low speed mode for transfer (115kBd instead of 921kBd)"},
{nullptr, 0, nullptr, 0, nullptr},
};
static bool verbose = false;