cli: Add new `config' CLI for status/config registers
Add a new CLI mode to query and update status and configuration
registers of SPI NOR chips. Programmer initialization and chip
initialization works the same as with the classic CLI (`-p' and
`-c' options). There are two commands `get' and `set' where the
former is implied if no command is given. For a start, only the
`quad-enable' bit can be accessed (for chips that advertise it
in the database).
The `--temporary' option allows to use a volatile write status
register command if the flash chip supports it. So changes made
with this option will not be written to flash and are lost when
the chip is reset.
For instance, the quad-enable bit can then be queried like this
$ flashprog config get -p ch341a_spi quad-enable
or written with
$ flashprog config set -p ch341a_spi quad-enable 1
or
$ flashprog config set -p ch341a_spi --temporary quad-enable 1
Change-Id: I6b9d26c67e6ad65be5df367d2db7942bb98f27ac
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/195
diff --git a/flashprog.8.tmpl b/flashprog.8.tmpl
index 54daef1..d9a59f9 100644
--- a/flashprog.8.tmpl
+++ b/flashprog.8.tmpl
@@ -46,11 +46,12 @@
.SH SYNOPSIS
Flashprog supports multiple command modes:
.sp
-.B flashprog \fR([\fBprog\fR])
+.B flashprog \fR([\fBprog\fR]|\fBconfig\fR|\fBcfg\fR)
.sp
With
.B prog
-being the default and described in this manual.
+being the default and described in this manual. For the other commands, see
+.MR flashprog-config 8 .
.sp
.B flashprog \fR[\fB\-h\fR|\fB\-R\fR|\fB\-L\fR|\fB\-z\fR|
\fB\-p\fR <programmername>[:<parameters>] [\fB\-c\fR <chipname>]
@@ -1735,3 +1736,6 @@
.MTOB "uwe@hermann-uwe.de" "Uwe Hermann" ,
Carl-Daniel Hailfinger, Stefan Tauner and others.
It is licensed under the terms of the GNU GPL (version 2 or later).
+
+.SH SEE ALSO
+.MR flashprog-config 8