diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2010-12-13 22:11:43 +0100 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2010-12-17 21:28:42 +0100 |
commit | 29202f7912d928c4d3f1162487d88f38be71ff49 (patch) | |
tree | 1a19802b0fc38c063584281ce0fc66defc3e245c | |
parent | e5719d611167de557d911cd584d3c04fe8cf63d4 (diff) | |
download | barebox-29202f7912d928c4d3f1162487d88f38be71ff49.tar.gz barebox-29202f7912d928c4d3f1162487d88f38be71ff49.tar.xz |
doc: add documentation for 'mw' command
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
-rw-r--r-- | Documentation/commands.dox | 2 | ||||
-rw-r--r-- | commands/mem.c | 20 |
2 files changed, 15 insertions, 7 deletions
diff --git a/Documentation/commands.dox b/Documentation/commands.dox index 881fc2cc..c9a786d1 100644 --- a/Documentation/commands.dox +++ b/Documentation/commands.dox @@ -74,7 +74,7 @@ available in @a Barebox: @li @subpage mkdir_command @li @subpage mount_command @li @subpage mtest -@li @subpage mw +@li @subpage mw_command @li @subpage mycdev @li @subpage nand_command @li @subpage nand_boot_test diff --git a/commands/mem.c b/commands/mem.c index 73bf9158..dc778d3e 100644 --- a/commands/mem.c +++ b/commands/mem.c @@ -289,12 +289,20 @@ static int do_mem_mw(struct command *cmdtp, int argc, char *argv[]) return errno; } -static const __maybe_unused char cmd_mw_help[] = -"Usage: mw [OPTIONS] <region> <value(s)>\n" -"Write value(s) to the specifies region.\n" -"options:\n" -" -b, -w, -l use byte, halfword, or word accesses\n" -" -d <file> write file (default /dev/mem)\n"; +BAREBOX_CMD_HELP_START(mw) +BAREBOX_CMD_HELP_USAGE("mw [OPTIONS] REGION VALUE(s)\n") +BAREBOX_CMD_HELP_SHORT("Write value(s) to the specified region.\n") +BAREBOX_CMD_HELP_OPT ("-b, -w, -l", "use byte, halfword or word accesses\n") +BAREBOX_CMD_HELP_OPT ("-d <file>", "write file (default: /dev/mem)\n") +BAREBOX_CMD_HELP_END + +/** + * @page mw_command + +\todo Add more documentation, especially an example and more info about <region> + + */ + BAREBOX_CMD_START(mw) .cmd = do_mem_mw, |