pyxcp 0.21.8__cp310-cp310-macosx_10_9_x86_64.whl → 0.21.9__cp310-cp310-macosx_10_9_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyxcp might be problematic. Click here for more details.
- pyxcp/__init__.py +2 -2
- pyxcp/transport/usb_transport.py +15 -0
- {pyxcp-0.21.8.dist-info → pyxcp-0.21.9.dist-info}/METADATA +1 -1
- {pyxcp-0.21.8.dist-info → pyxcp-0.21.9.dist-info}/RECORD +7 -7
- {pyxcp-0.21.8.dist-info → pyxcp-0.21.9.dist-info}/WHEEL +0 -0
- {pyxcp-0.21.8.dist-info → pyxcp-0.21.9.dist-info}/entry_points.txt +0 -0
- {pyxcp-0.21.8.dist-info → pyxcp-0.21.9.dist-info}/licenses/LICENSE +0 -0
pyxcp/__init__.py
CHANGED
|
@@ -24,5 +24,5 @@ from .transport import Eth
|
|
|
24
24
|
from .transport import SxI
|
|
25
25
|
from .transport import Usb
|
|
26
26
|
|
|
27
|
-
# if you update this manually, do not forget to update .bumpversion.cfg
|
|
28
|
-
__version__ = "0.21.
|
|
27
|
+
# if you update this manually, do not forget to update .bumpversion.cfg and pyproject.toml
|
|
28
|
+
__version__ = "0.21.9"
|
pyxcp/transport/usb_transport.py
CHANGED
|
@@ -8,6 +8,9 @@ from time import perf_counter
|
|
|
8
8
|
from time import sleep
|
|
9
9
|
from time import time
|
|
10
10
|
|
|
11
|
+
import usb.backend.libusb1 as libusb1
|
|
12
|
+
import usb.backend.libusb0 as libusb0
|
|
13
|
+
import usb.backend.openusb as openusb
|
|
11
14
|
import usb.core
|
|
12
15
|
import usb.util
|
|
13
16
|
|
|
@@ -29,6 +32,7 @@ class Usb(BaseTransport):
|
|
|
29
32
|
"reply_endpoint_number": (int, True, 1),
|
|
30
33
|
"vendor_id": (int, False, 0),
|
|
31
34
|
"product_id": (int, False, 0),
|
|
35
|
+
"library": (str, False, "") # absolute path to USB shared library
|
|
32
36
|
}
|
|
33
37
|
HEADER = struct.Struct("<2H")
|
|
34
38
|
HEADER_SIZE = HEADER.size
|
|
@@ -43,6 +47,7 @@ class Usb(BaseTransport):
|
|
|
43
47
|
self.interface_number = self.config.get("interface_number")
|
|
44
48
|
self.command_endpoint_number = self.config.get("command_endpoint_number")
|
|
45
49
|
self.reply_endpoint_number = self.config.get("reply_endpoint_number")
|
|
50
|
+
self.library = self.config.get("library")
|
|
46
51
|
self.device = None
|
|
47
52
|
|
|
48
53
|
self.status = 0
|
|
@@ -55,15 +60,25 @@ class Usb(BaseTransport):
|
|
|
55
60
|
self._packets = deque()
|
|
56
61
|
|
|
57
62
|
def connect(self):
|
|
63
|
+
if self.library:
|
|
64
|
+
for backend_provider in (libusb1, libusb0, openusb):
|
|
65
|
+
backend = backend_provider.get_backend(find_library=lambda x: self.library)
|
|
66
|
+
if backend:
|
|
67
|
+
break
|
|
68
|
+
else:
|
|
69
|
+
backend = None
|
|
70
|
+
|
|
58
71
|
if self.vendor_id and self.product_id:
|
|
59
72
|
kwargs = {
|
|
60
73
|
"find_all": True,
|
|
61
74
|
"idVendor": self.vendor_id,
|
|
62
75
|
"idProduct": self.product_id,
|
|
76
|
+
"backend": backend,
|
|
63
77
|
}
|
|
64
78
|
else:
|
|
65
79
|
kwargs = {
|
|
66
80
|
"find_all": True,
|
|
81
|
+
"backend": backend,
|
|
67
82
|
}
|
|
68
83
|
|
|
69
84
|
for device in usb.core.find(**kwargs):
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
rekorder.cpython-310-darwin.so,sha256=7Ih912yBRbCbrB0blKB_fTc9rUmUdlGXbhVixhSPMrs,319128
|
|
2
|
-
pyxcp-0.21.
|
|
3
|
-
pyxcp-0.21.
|
|
4
|
-
pyxcp-0.21.
|
|
5
|
-
pyxcp-0.21.
|
|
6
|
-
pyxcp-0.21.
|
|
2
|
+
pyxcp-0.21.9.dist-info/RECORD,,
|
|
3
|
+
pyxcp-0.21.9.dist-info/WHEEL,sha256=W_CW0Gh7cI8TCoi9PQ-JVYaEpiKOfbHXT3w-C6bufmg,106
|
|
4
|
+
pyxcp-0.21.9.dist-info/entry_points.txt,sha256=wL4Cgx0wIAbuEr93nPewLCL-6DCSunxxTkui-bibme8,219
|
|
5
|
+
pyxcp-0.21.9.dist-info/METADATA,sha256=9SEGwDGqBqsFd_2HpxNHjbV6C4I4iwgJx1XhjQmFtGE,3861
|
|
6
|
+
pyxcp-0.21.9.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
7
7
|
pyxcp/dllif.py,sha256=o7t_M_n6XwE63ng97DV8t8BJkGmFHtj7Esdhi7qH4DQ,3023
|
|
8
8
|
pyxcp/checksum.py,sha256=nsEosSKtU1b8L14sm9HyxvUNUMc07hnCR6oK_bH6-Ew,10837
|
|
9
9
|
pyxcp/asamkeydll.sh,sha256=iema12sub6qNE0xAuzwGtx0FmkdaaOKoXalhrtWVaa8,57
|
|
@@ -11,7 +11,7 @@ pyxcp/config.py,sha256=dJ5WfX4Stlz2bvUA-mO-ez6jruFi27C9r7TDj1Vkc4g,1423
|
|
|
11
11
|
pyxcp/asamkeydll.c,sha256=PnfD6UbMWz3cszGpJDHBrSPizjlg8RrV_nrCqC9xPOw,2862
|
|
12
12
|
pyxcp/constants.py,sha256=Ifs1cxpRoctEU0BKAo5yDXqBtTWpTNIKzcV8YbrgNCA,1258
|
|
13
13
|
pyxcp/cmdline.py,sha256=IvI946DR7CoCDutAaIrFTdTlCBSQ-ib_qlxBLWIK4dc,2117
|
|
14
|
-
pyxcp/__init__.py,sha256=
|
|
14
|
+
pyxcp/__init__.py,sha256=G1c0D5IBEmXIA1uot58ENy_8_SkGkWQFBrfXLJjKwNs,718
|
|
15
15
|
pyxcp/types.py,sha256=fwAH5XAOPAiHo4EW2JgR9P1GdNTTPGzDrPLGeNeWhjI,24006
|
|
16
16
|
pyxcp/logger.py,sha256=Zl9TolTcbvUjpRs8Chx8rK8TGHiHAq9-TC3fWQRnxgY,1924
|
|
17
17
|
pyxcp/timing.py,sha256=dK89nGWV1sUVCd5FVkNCTDjoyuP8qK4Ggo9GgFGe_s0,1670
|
|
@@ -22,7 +22,7 @@ pyxcp/asam/types.py,sha256=VHPeIfOAXMXV67kZsDXUtMaTLZEjXrdt1V7WrznsUpQ,2361
|
|
|
22
22
|
pyxcp/transport/eth.py,sha256=tUYC46wPPX6eYjWfNXrcmA38Uf3V7BBQMyI0QU9dX28,7702
|
|
23
23
|
pyxcp/transport/sxi.py,sha256=frPYgKBdS6xUF8ZKIc0InxucDl12W0PkQxs--LteyTE,2496
|
|
24
24
|
pyxcp/transport/__init__.py,sha256=Ip3jrH0gqXyA0JvK_r4kFV12raRZvummCczKAO7Xlb8,297
|
|
25
|
-
pyxcp/transport/usb_transport.py,sha256=
|
|
25
|
+
pyxcp/transport/usb_transport.py,sha256=aPXovvFJwMofIzFZTKhc0RHDwRPk6m0D4qDRbmDeYSA,7657
|
|
26
26
|
pyxcp/transport/can.py,sha256=snTFVHUz8wQsQUpYC2gFBMxZDyC8Dt-mbfB-w8Eokkw,12237
|
|
27
27
|
pyxcp/transport/base.py,sha256=L20LZ9-n8P-GwbKYScIyFAvQeyxX14fADIjJuqVpAg4,14368
|
|
28
28
|
pyxcp/transport/candriver/pc_serial.py,sha256=O10fcNFJw8v6NHH2Hm9zwSwwKQdAB7cRSOpKZ1ASgrI,689
|
|
File without changes
|
|
File without changes
|
|
File without changes
|