oep-client-python 0.0.6__py3-none-any.whl → 0.0.7__py3-none-any.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.
- oep_client/__init__.py +1 -1
- oep_client/capture.py +7 -5
- oep_client/interfaces.py +3 -4
- oep_client/registry.py +2 -2
- {oep_client_python-0.0.6.dist-info → oep_client_python-0.0.7.dist-info}/METADATA +1 -1
- {oep_client_python-0.0.6.dist-info → oep_client_python-0.0.7.dist-info}/RECORD +9 -9
- {oep_client_python-0.0.6.dist-info → oep_client_python-0.0.7.dist-info}/WHEEL +0 -0
- {oep_client_python-0.0.6.dist-info → oep_client_python-0.0.7.dist-info}/entry_points.txt +0 -0
- {oep_client_python-0.0.6.dist-info → oep_client_python-0.0.7.dist-info}/licenses/LICENSE +0 -0
oep_client/__init__.py
CHANGED
oep_client/capture.py
CHANGED
|
@@ -347,18 +347,20 @@ class LogicCapture(Interface):
|
|
|
347
347
|
return [(data[(i * c.width + bit0) >> 3] >> ((i * c.width + bit0) & 7)) & 1 for i in range(n)]
|
|
348
348
|
|
|
349
349
|
def to_sr(self, path: str, data: bytes, samples: int, names: list[str] | None = None) -> None:
|
|
350
|
-
"""A sigrok session file:
|
|
350
|
+
"""A sigrok session file: bit k of each sample = channel k, one byte per sample up to 8 channels, two (little
|
|
351
|
+
endian, sigrok's unitsize 2) up to 16."""
|
|
351
352
|
c = self.config
|
|
352
353
|
n_ch = len(c.positions)
|
|
353
|
-
if n_ch
|
|
354
|
-
|
|
354
|
+
unit = 1 if n_ch <= 8 else 2
|
|
355
|
+
if n_ch > 16:
|
|
356
|
+
raise ValueError("to_sr writes up to 16 channels")
|
|
355
357
|
names = names or [f"D{k}" for k in range(n_ch)]
|
|
356
358
|
chans = [self.channel(data, k, samples) for k in range(n_ch)]
|
|
357
|
-
out =
|
|
359
|
+
out = b"".join(sum(chans[k][i] << k for k in range(n_ch)).to_bytes(unit, "little") for i in range(samples))
|
|
358
360
|
rate = c.rate.numerator // c.rate.denominator
|
|
359
361
|
meta = ["[global]", "sigrok version=0.5.2", "", "[device 1]", "capturefile=logic-1",
|
|
360
362
|
f"total probes={n_ch}", f"samplerate={rate} Hz", "total analog=0"]
|
|
361
|
-
meta += [f"probe{k + 1}={nm}" for k, nm in enumerate(names)] + ["unitsize=
|
|
363
|
+
meta += [f"probe{k + 1}={nm}" for k, nm in enumerate(names)] + [f"unitsize={unit}", ""]
|
|
362
364
|
with zipfile.ZipFile(path, "w") as z:
|
|
363
365
|
z.writestr("version", "2")
|
|
364
366
|
z.writestr("metadata", "\n".join(meta))
|
oep_client/interfaces.py
CHANGED
|
@@ -71,15 +71,14 @@ KNOWN: dict[str, Known] = {
|
|
|
71
71
|
0x46: ("label", _label), 0x47: ("resets on open", lambda v: "yes"),
|
|
72
72
|
0x49: ("transport", _transport), 0x4A: ("OEP VID:PID", lambda v: "yes" if v[:1] == b"\x01" else "no")}),
|
|
73
73
|
"oep.wire.rvswd": Known("scan, attach, detach over RVSWD (attach returns a connection)",
|
|
74
|
-
roles={1: "SWDIO", 2: "SWCLK"}, tags={0x40: ("max connections", lambda v: str(v[0]))}),
|
|
74
|
+
roles={1: "SWDIO", 2: "SWCLK", 3: "reset"}, tags={0x40: ("max connections", lambda v: str(v[0]))}),
|
|
75
75
|
"oep.wire.swio": Known("scan, attach, detach over SWIO, one wire (attach returns a connection)",
|
|
76
|
-
roles={1: "SWIO"}, tags={0x40: ("max connections", lambda v: str(v[0]))}),
|
|
76
|
+
roles={1: "SWIO", 3: "reset"}, tags={0x40: ("max connections", lambda v: str(v[0]))}),
|
|
77
77
|
"oep.wire.swd": Known("scan, attach, detach over ARM SWD", roles={1: "SWDIO", 2: "SWCLK"},
|
|
78
78
|
tags={0x40: ("max connections", lambda v: str(v[0]))}),
|
|
79
79
|
"oep.target.riscv-dm": Known(
|
|
80
80
|
"RISC-V Debug Module over DMI: step lists, block read/write, run until halt, halt/resume",
|
|
81
|
-
features={0: "block read/write", 1: "run until halt", 2: "reset", 3: "step"},
|
|
82
|
-
tags={0x40: ("clobbers", lambda v: ", ".join(f"0x{r:04x}" for r in struct.unpack(f"<{len(v) // 2}H", v)))}),
|
|
81
|
+
features={0: "block read/write", 1: "run until halt", 2: "reset", 3: "step"}),
|
|
83
82
|
"oep.target.arm-adi": Known("ARM Debug Interface: DP/AP transfer lists, block transfers"),
|
|
84
83
|
"oep.target.console": Known(
|
|
85
84
|
"console streams on a debug connection (position-addressed, marks)",
|
oep_client/registry.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from types import SimpleNamespace as _NS
|
|
4
4
|
|
|
5
|
-
REGISTRY_HASH = "
|
|
5
|
+
REGISTRY_HASH = "dd6d527421bb6206"
|
|
6
6
|
SCHEMA = 1
|
|
7
7
|
PROTOCOL_REVISION = 1
|
|
8
8
|
CONFIRM_REQUEST_MAGIC = 'OEP?'
|
|
@@ -34,7 +34,7 @@ WIRE_SWD = _NS(name="oep.wire.swd", revision=1, op={"scan": 0x01, "attach": 0x02
|
|
|
34
34
|
closed_tail={}, tlv={"describe": {"max_connections": 0x40}, "detach": {"force": 0x01}, "attach": {"max_speed": 0x01, "targetsel": 0x02, "pins": 0x03}}, event={}, enum={"connection_users": {"host_session": 0x01, "slot": 0x02}, "pin_role": {"swdio": 0x01, "swclk": 0x02}}, own={})
|
|
35
35
|
INTERFACES["oep.wire.swd"] = WIRE_SWD
|
|
36
36
|
TARGET_RISCV_DM = _NS(name="oep.target.riscv-dm", revision=1, op={"dmi": 0x01, "halt": 0x02, "resume": 0x03, "reset": 0x04, "read_block": 0x05, "write_block": 0x06, "run": 0x07, "step": 0x08}, lock_free={},
|
|
37
|
-
closed_tail={}, tlv={"describe": {
|
|
37
|
+
closed_tail={}, tlv={"describe": {}, "reset": {"method": 0x01}}, event={}, enum={"dmi_step": {"write": 0x01, "read": 0x02, "poll_reads": 0x03, "wait_us": 0x04, "poll_us": 0x05}, "reset_mode": {"run": 0x00, "run_verified": 0x01, "halt_at_reset": 0x02}, "reset_method": {"probe_default": 0x00, "ndmreset": 0x01, "system_reset": 0x02}}, own={})
|
|
38
38
|
INTERFACES["oep.target.riscv-dm"] = TARGET_RISCV_DM
|
|
39
39
|
TARGET_ARM_ADI = _NS(name="oep.target.arm-adi", revision=1, op={"transfer": 0x01, "read_block": 0x02, "write_block": 0x03}, lock_free={},
|
|
40
40
|
closed_tail={}, tlv={}, event={}, enum={}, own={})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: oep-client-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Summary: Open Embedded Probe (OEP) v1 host: serial / USB / TCP transports, the session rules, the standard interfaces, and a fake probe
|
|
5
5
|
Project-URL: Homepage, https://github.com/Open-Embedded-Probe/oep-client-python
|
|
6
6
|
Project-URL: Repository, https://github.com/Open-Embedded-Probe/oep-client-python
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
oep_client/__init__.py,sha256=
|
|
1
|
+
oep_client/__init__.py,sha256=Eo4zAyMLP7Kn4ZVfKG_wGeLWVvEnMO3lQdewP4ORx6k,163
|
|
2
2
|
oep_client/__main__.py,sha256=qtVGdpAHULBtLY2SedabJf-uwDZZhMf_YmrbqRzM57U,14669
|
|
3
3
|
oep_client/arm.py,sha256=JLyUhLSPcmsk73schZcaJYoOKuHzrvnU8kPmfrEvVuo,12331
|
|
4
|
-
oep_client/capture.py,sha256=
|
|
4
|
+
oep_client/capture.py,sha256=hs8mQU1gE1P67GOivxw2C2Ur8wimWqCdhtk1nqGN71Q,18092
|
|
5
5
|
oep_client/catalog.py,sha256=EqAQnSgHFxGbCO2GQ_Ee-uheJKbBBUUpL1-0qHfNMXU,6574
|
|
6
6
|
oep_client/ch32_flash.py,sha256=Fc-6jEj15cQtMSKmfC5dmDetMXJ8hAdAuJ9d9odwrsA,12651
|
|
7
7
|
oep_client/cobs.py,sha256=hqddQI_X7rsBvBvcP_MBE3bXPyB13-Azjqp_9JfdQ1g,2288
|
|
@@ -19,18 +19,18 @@ oep_client/fixture.py,sha256=653hCD-Iz0Lfs8dT4Hdg3QyubbbOGs1_xjq_3nb8foU,5564
|
|
|
19
19
|
oep_client/frames.py,sha256=xjgjnXmXUqNJZ5m0h91r4Cy48WoVK1mEMW4gRg-mlMI,3991
|
|
20
20
|
oep_client/hid_stream.py,sha256=99Dsm4Io1keukuETG_UNqjBGiVYZZeb__Pv4ytaKg9k,10695
|
|
21
21
|
oep_client/host.py,sha256=Y5oqE-pw5Ja9cG1dzdy8svIEgR4Kqhki0wuyrpP_xH8,15563
|
|
22
|
-
oep_client/interfaces.py,sha256=
|
|
22
|
+
oep_client/interfaces.py,sha256=TNvof5blyLjO1Mc0OentKcMVBD_5e4riRG18UgEh2ZE,5380
|
|
23
23
|
oep_client/link.py,sha256=J9VtBWfTgNoIgUQuj8SsH9hHesQM2uEN545IoxKVS8E,19406
|
|
24
24
|
oep_client/message.py,sha256=MEM1UT6KFM7AsT56jvBLt_FJK_6SJ7O_nGAiipW0_zo,9912
|
|
25
25
|
oep_client/names.py,sha256=ztCZFWs__aR-a5G14TnJP-Q4YfLhbyrzvOVOMJuG93k,3653
|
|
26
|
-
oep_client/registry.py,sha256=
|
|
26
|
+
oep_client/registry.py,sha256=uO9Ilx_pPPhLD-17TosgXH9QfI11DymYNIR-EacaZOw,9984
|
|
27
27
|
oep_client/riscv.py,sha256=PNeo_HXlq08b4h083olOOrGxqejD6ggQ7QzVqkIHEMA,22621
|
|
28
28
|
oep_client/rp2350.py,sha256=7OMyj270k3AY1e3-ljicPwOjf9jOlokbT6QNkA0b0yY,4227
|
|
29
29
|
oep_client/target.py,sha256=R8BvYfFfYNhZF0MysJkNb8b69YgBlmeGXNX8ReZIe5k,1068
|
|
30
30
|
oep_client/uiapduino.py,sha256=IEPG3LbZPksi8g3wmAf6T0CRWSfYKW1_qrH_GBVQdxY,6090
|
|
31
31
|
oep_client/usb_stream.py,sha256=VJMCxsOlQCk005FcS92pqTh33fRSFBizoL__L0VbUMA,10242
|
|
32
|
-
oep_client_python-0.0.
|
|
33
|
-
oep_client_python-0.0.
|
|
34
|
-
oep_client_python-0.0.
|
|
35
|
-
oep_client_python-0.0.
|
|
36
|
-
oep_client_python-0.0.
|
|
32
|
+
oep_client_python-0.0.7.dist-info/METADATA,sha256=Shg-dYEbV4747Sl1HZlRz-AxoIdVQ2Z9LzszmjCTdnY,7368
|
|
33
|
+
oep_client_python-0.0.7.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
34
|
+
oep_client_python-0.0.7.dist-info/entry_points.txt,sha256=h6_8QX89Ww1ogALEGG5g4kspT3IOV6O51lwKqf5BWco,49
|
|
35
|
+
oep_client_python-0.0.7.dist-info/licenses/LICENSE,sha256=ntlalztb3L1OaNAxmQdHlubu5fVhjMc9oRZi3PeQhXg,1076
|
|
36
|
+
oep_client_python-0.0.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|