diff options
author | Willian Paixao <willian@ufpa.br> | 2021-12-05 19:16:34 +0100 |
---|---|---|
committer | Willian Paixao <willian@ufpa.br> | 2021-12-05 19:16:34 +0100 |
commit | ac2e205ae9f465c27297ea542c72e8cfe4966f8c (patch) | |
tree | 16e4d1268b2631ba7e17dcda8f366f070fbd7475 /tinyusb/examples/device/hid_generic_inout/hid_test.py | |
parent | bbd394a19aaa334a179c36cf2ed2a066f1bb312c (diff) | |
download | Sensor-Watch-ac2e205ae9f465c27297ea542c72e8cfe4966f8c.tar.gz Sensor-Watch-ac2e205ae9f465c27297ea542c72e8cfe4966f8c.tar.bz2 Sensor-Watch-ac2e205ae9f465c27297ea542c72e8cfe4966f8c.zip |
remove tinyusb directory
Diffstat (limited to 'tinyusb/examples/device/hid_generic_inout/hid_test.py')
-rwxr-xr-x | tinyusb/examples/device/hid_generic_inout/hid_test.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/tinyusb/examples/device/hid_generic_inout/hid_test.py b/tinyusb/examples/device/hid_generic_inout/hid_test.py deleted file mode 100755 index a42930fb..00000000 --- a/tinyusb/examples/device/hid_generic_inout/hid_test.py +++ /dev/null @@ -1,20 +0,0 @@ -# Install python3 HID package https://pypi.org/project/hid/ -import hid - -USB_VID = 0xcafe - -print("Openning HID device with VID = 0x%X" % USB_VID) - -for dict in hid.enumerate(USB_VID): - print(dict) - dev = hid.Device(dict['vendor_id'], dict['product_id']) - if dev: - while True: - # Get input from console and encode to UTF8 for array of chars. - # hid generic inout is single report therefore by HIDAPI requirement - # it must be preceeded with 0x00 as dummy reportID - str_out = b'\x00' - str_out += input("Send text to HID Device : ").encode('utf-8') - dev.write(str_out) - str_in = dev.read(64) - print("Received from HID Device:", str_in, '\n') |