aboutsummaryrefslogtreecommitdiff
path: root/rmihidtool
diff options
context:
space:
mode:
authorAndrew Duggan <aduggan@synaptics.com>2015-05-06 18:18:06 -0700
committerAndrew Duggan <aduggan@synaptics.com>2015-05-06 18:21:48 -0700
commit2c24adb818ca0dfc83e93e2f5c80442495a15b19 (patch)
tree44295841e7dc226b1cc4f7edc098c8ec93988202 /rmihidtool
parent161c83c40b122099327e57f96b4cf52cadd13661 (diff)
downloadrmi4utils-2c24adb818ca0dfc83e93e2f5c80442495a15b19.tar.gz
Print protocol specific information about a device
Diffstat (limited to 'rmihidtool')
-rw-r--r--rmihidtool/main.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/rmihidtool/main.cpp b/rmihidtool/main.cpp
index 3d614f3..cf25a4b 100644
--- a/rmihidtool/main.cpp
+++ b/rmihidtool/main.cpp
@@ -34,7 +34,7 @@
#include "hiddevice.h"
-#define RMI4UPDATE_GETOPTS "hp:ir:w:foamb"
+#define RMI4UPDATE_GETOPTS "hp:ir:w:foambd"
enum rmihidtool_cmd {
RMIHIDTOOL_CMD_INTERACTIVE,
@@ -45,6 +45,7 @@
RMIHIDTOOL_CMD_ATTN,
RMIHIDTOOL_CMD_PRINT_FUNCTIONS,
RMIHIDTOOL_CMD_REBIND_DRIVER,
+ RMIHIDTOOL_CMD_PRINT_DEVICE_INFO,
};
static int report_attn = 0;
@@ -63,6 +64,7 @@ void print_help(const char *prog_name)
fprintf(stdout, "\t-a, --attention\t\t\t\tPrint attention reports until control + c\n");
fprintf(stdout, "\t-m, --print-functions\t\t\tPrint RMI4 functions for the device.\n");
fprintf(stdout, "\t-b, --rebind-driver\t\t\tRebind the driver to force an update of device properties.\n");
+ fprintf(stdout, "\t-d, --device-info\t\t\tPrint protocol specific information about the device.\n");
}
void print_cmd_usage()
@@ -210,6 +212,7 @@ int main(int argc, char ** argv)
{"attention", 0, NULL, 'a'},
{"print-functions", 0, NULL, 'm'},
{"rebind-driver", 0, NULL, 'b'},
+ {"device-info", 0, NULL, 'd'},
{0, 0, 0, 0},
};
enum rmihidtool_cmd cmd = RMIHIDTOOL_CMD_INTERACTIVE;
@@ -261,6 +264,9 @@ int main(int argc, char ** argv)
case 'b':
cmd = RMIHIDTOOL_CMD_REBIND_DRIVER;
break;
+ case 'd':
+ cmd = RMIHIDTOOL_CMD_PRINT_DEVICE_INFO;
+ break;
default:
print_help(argv[0]);
return 0;
@@ -344,6 +350,9 @@ int main(int argc, char ** argv)
case RMIHIDTOOL_CMD_REBIND_DRIVER:
device->RebindDriver();
break;
+ case RMIHIDTOOL_CMD_PRINT_DEVICE_INFO:
+ device->PrintDeviceInfo();
+ break;
case RMIHIDTOOL_CMD_INTERACTIVE:
default:
interactive(device, report);