Add support for -z option for reading operations. It allows to not request

current values from device, but only receive changes.
This commit is contained in:
Alexander Motin 2012-05-16 20:30:20 +00:00
parent cff79d9ed3
commit e39e854e27
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=235519
2 changed files with 7 additions and 6 deletions

View File

@ -182,11 +182,11 @@ usage(void)
fprintf(stderr,
"usage: %s -f device "
"[-l] [-n] [-r] [-t tablefile] [-v] [-x] name ...\n",
"[-l] [-n] [-r] [-t tablefile] [-v] [-x] [-z] name ...\n",
getprogname());
fprintf(stderr,
" %s -f device "
"[-l] [-n] [-r] [-t tablefile] [-v] [-x] -a\n",
"[-l] [-n] [-r] [-t tablefile] [-v] [-x] [-z] -a\n",
getprogname());
fprintf(stderr,
" %s -f device "
@ -304,7 +304,7 @@ dumpdata(int f, report_desc_t rd, int loop)
u_char *dbuf;
enum hid_kind kind;
kind = 0;
kind = zflag ? 3 : 0;
rid = -1;
use_rid = !!hid_get_report_id(f);
do {

View File

@ -47,6 +47,7 @@
.Op Fl l
.Op Fl v
.Op Fl x
.Op Fl z
.Fl a
.Nm
.Fl f Ar device
@ -55,6 +56,7 @@
.Op Fl n
.Op Fl v
.Op Fl x
.Op Fl z
.Ar item ...
.Nm
.Fl f Ar device
@ -99,9 +101,8 @@ Only 'output' and 'feature' kinds can be set with this option.
.It Fl x
Dump data in hexadecimal as well as decimal.
.It Fl z
Reset reports to zero before processing
.Fl w
arguments. If not specified, current values will be requested from device.
Reset reports to zero before processing other arguments.
If not specified, current values will be requested from device.
.El
.Sh SYNTAX
.Nm