Skip to content

Commit 071a248

Browse files
committed
examples: print-hidraw: show report descriptor as hex bytes
Signed-off-by: Filipe Laíns <lains@riseup.net>
1 parent f7faf05 commit 071a248

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/print-hidraw.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@
1616
print(f'Physical Name: {d.phys}')
1717
print(f'Unique Name: {d.uniq or "None"}')
1818
print(f'Report Descriptor Size: {d.report_descriptor_size}')
19-
print(f'Report Descriptor: {d.report_descriptor}')
19+
print('Report Descriptor: {}'.format(
20+
' '.join(f'{byte:02x}' for byte in d.report_descriptor)
21+
))

0 commit comments

Comments
 (0)