summaryrefslogtreecommitdiffstats
path: root/commands/dfu.c
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2010-07-11 13:38:45 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-11-01 16:23:08 +0100
commit916abc68fc5b6ce8095154a4602ea99cc7c274b8 (patch)
treef5149f49c32f97449a96d4a8cb6031fdc5ff21aa /commands/dfu.c
parent82b23ea679719dea90f0c8b21d6f94cd8a1e0433 (diff)
downloadbarebox-916abc68fc5b6ce8095154a4602ea99cc7c274b8.tar.gz
barebox-916abc68fc5b6ce8095154a4602ea99cc7c274b8.tar.xz
doc: add documentation for 'dfu'
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'commands/dfu.c')
-rw-r--r--commands/dfu.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/commands/dfu.c b/commands/dfu.c
index 66fd6eaa62..385fd89d41 100644
--- a/commands/dfu.c
+++ b/commands/dfu.c
@@ -162,16 +162,24 @@ out:
return 1;
}
-static const __maybe_unused char cmd_dfu_help[] =
-"Usage: dfu [OPTION]... description\n"
-"start dfu firmware update\n"
-" -m <str> Manufacturer string (barebox)\n"
-" -p <str> product string (" CONFIG_BOARDINFO ")\n"
-" -V <id> vendor id\n"
-" -P <id> product id\n"
-"description has the form\n"
-"device1(name1)[sr],device2(name2)[sr]\n"
-"where s is for save mode and r for read back of firmware\n";
+BAREBOX_CMD_HELP_START(dfu)
+BAREBOX_CMD_HELP_USAGE("dfu [OPTIONS] <description>\n")
+BAREBOX_CMD_HELP_SHORT("Start firmware update with the Device Firmware Update (DFU) protocol.\n")
+BAREBOX_CMD_HELP_OPT ("-m <str>", "Manufacturer string (barebox)\n")
+BAREBOX_CMD_HELP_OPT ("-p <str>", "product string (" CONFIG_BOARDINFO ")\n")
+BAREBOX_CMD_HELP_OPT ("-V <id>", "vendor id\n")
+BAREBOX_CMD_HELP_OPT ("-P <id>", "product id\n")
+BAREBOX_CMD_HELP_END
+
+/**
+ * @page dfu_command
+\<description> has the following form:
+device1(name1)[sr],device2(name2)[sr]
+'s' means 'safe mode' (download the complete image before flashing) and
+'r' that readback of the firmware is allowed.
+
+\todo Add example, how to use dfu from a Linux or Windows host.
+ */
BAREBOX_CMD_START(dfu)
.cmd = do_dfu,