Skip to content

Commit 0a08d9c

Browse files
committed
updatev103
1 parent 62cb250 commit 0a08d9c

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

cricketlib/searchswitch.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,35 @@
1+
import sys
12
import serial
23
import serial.tools.list_ports
34
import time
45
import sys
56
import usb.util
67
from usb.backend import libusb1
78

9+
10+
811
VID_2101 = 0x040e
912
PID_2101 = 0xf413
1013

14+
path = sys.executable
15+
16+
path = path.replace("python.exe", "")
17+
18+
backend = None
19+
20+
if sys.platform == "win32":
21+
backend = usb.backend.libusb1.get_backend(find_library=lambda x: "" +
22+
path + "Lib\\site-packages\\libusb\\_platform\\_windows\\x64\\libusb-1.0.dll")
23+
24+
# Generator object
25+
# usb_devices = usb.core.find(find_all=True, backend=backend)
26+
usb_devices = usb.core.find(find_all=True, backend=backend)
27+
print("usb_device:", usb_devices)
28+
29+
# Here attached a list of Host controlloers, list of Hub,
30+
# List of periperals info with specific vid, pid.
31+
32+
1133
def version():
1234
return "Cricketlib v1.0.1"
1335

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
setup(
2525
name='cricketapi',
26-
version='1.0.2',
26+
version='1.0.3',
2727
description='API for MCCI Connection exercisers',
2828
author='MCCI Corporation',
2929
author_email='',

0 commit comments

Comments
 (0)