diff options
author | Andrew Duggan <andrew.duggan@gmail.com> | 2014-11-09 11:02:22 -0800 |
---|---|---|
committer | Andrew Duggan <aduggan@synaptics.com> | 2014-11-10 10:01:46 -0800 |
commit | f73fdc75d90be91b2b2e3e61ec8a066b129c8a49 (patch) | |
tree | e5d80082e380eb61235c19291b2f566bab30d970 /rmihidtool | |
parent | f6e278f677ae60c9db728059bc942bbeb9aec549 (diff) | |
download | rmi4utils-f73fdc75d90be91b2b2e3e61ec8a066b129c8a49.tar.gz |
Change GetReport to only read one report at a time and remove HIDDevice's attention report queue
Simplify GetReport and only have it read a single report and let the functions which call it decide
if they have gotten the data which they are looking for. Also, remove in the HIDDevice attention
report queue since reports are queued in the kernel so queueing in userspace is unnecessary.
Diffstat (limited to 'rmihidtool')
-rw-r--r-- | rmihidtool/main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rmihidtool/main.cpp b/rmihidtool/main.cpp index f8a1770..8fcb858 100644 --- a/rmihidtool/main.cpp +++ b/rmihidtool/main.cpp @@ -168,7 +168,9 @@ void interactive(RMIDevice * device, unsigned char *report) } } else if (input[0] == 'a') { unsigned int bytes = 256; - device->GetAttentionReport(NULL, NULL, report, &bytes); + device->GetAttentionReport(NULL, + RMI_INTERUPT_SOURCES_ALL_MASK, + report, &bytes); print_buffer(report, bytes); } else if (input[0] == 'q') { return; @@ -323,7 +325,9 @@ int main(int argc, char ** argv) report_attn = 1; while(report_attn) { unsigned int bytes = 256; - rc = device->GetAttentionReport(NULL, NULL, report, &bytes); + rc = device->GetAttentionReport(NULL, + RMI_INTERUPT_SOURCES_ALL_MASK, + report, &bytes); if (rc > 0) { print_buffer(report, bytes); fprintf(stdout, "\n"); |