oep-client-python 0.0.15__py3-none-any.whl → 0.0.17__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 CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "0.0.15"
5
+ __version__ = "0.0.17"
oep_client/endpoint.py CHANGED
@@ -518,7 +518,7 @@ class Endpoint:
518
518
  def _held(self, fn: int | None = None, pair: tuple[int, int] | None = None) -> set[int]:
519
519
  """Channels something holds (core §8.1): the plan, the slots' pairs, the live connections' pairs - except
520
520
  wire `fn`'s own connection on `pair` (attaching there again, or scanning through it)."""
521
- held = {a[2] for a in self.plan if a[0] not in self.captures} # a capture only listens
521
+ held = {a[2] for a in self.plan if not self._listens(a[0])} # a logic capture only listens
522
522
  held |= {p for s in self.slots.values() for p in s.pair if p != 0xFFFF and not (s.wire_fn == fn and s.pair == pair)}
523
523
  held |= {p for c in self.conns.values() for p in c.pair if p != 0xFFFF and not (c.fn == fn and c.pair == pair)}
524
524
  return held
@@ -799,14 +799,27 @@ class Endpoint:
799
799
  return m.COMPLETED, m.SUCCESS, b""
800
800
  return m.REJECTED, m.UNKNOWN_OPERATION, b""
801
801
 
802
+ def _listens(self, fn: int) -> bool:
803
+ """A logic capture only listens: it shares pins with anything (core §8.1). The analog does not: its pads go to
804
+ their analog function, cutting their digital input and output (oep-if-capture §1.2), as on this library's ESP32s."""
805
+ return fn in self.captures and not self.captures[fn].analog
806
+
802
807
  def _check_plan(self, got: list[tuple[int, int, int]]) -> None:
803
808
  """plan_apply's all-or-nothing check: the roles each fn has, and no pin another fn (or a slot) holds."""
804
809
  named = {fn for fn, _, _ in got}
805
- # a capture only listens: it shares pins with anything, and nothing is kept from a pin by it (core §8.1)
806
- kept = {a for a in self.plan if a[0] not in named and a[0] not in self.captures}
810
+ others = {a for a in self.plan if a[0] not in named}
811
+ kept = {a for a in others if not self._listens(a[0])}
807
812
  slot_pins = {p for s in self.slots.values() for p in s.pair if p != 0xFFFF}
808
813
  slot_pins |= {p for c in self.conns.values() for p in c.pair if p != 0xFFFF} # a live connection's pins too
814
+ analog = {fn for fn, cap in self.captures.items() if cap.analog}
809
815
  for fn, role, ch in got:
816
+ beside = [f for f, _, c in got if c == ch and f != fn] + [a[0] for a in others if a[2] == ch]
817
+ if fn in analog: # the analog shares its pin with nothing: another fn's plan, a slot, a connection
818
+ if role not in self._declared_roles(fn, ch) or beside or ch in slot_pins:
819
+ raise Reject(m.UNAVAILABLE)
820
+ continue
821
+ if any(f in analog for f in beside): # nor may anything come onto an analog pin
822
+ raise Reject(m.UNAVAILABLE)
810
823
  if fn in self.captures:
811
824
  if role not in self._declared_roles(fn, ch):
812
825
  raise Reject(m.UNAVAILABLE)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: oep-client-python
3
- Version: 0.0.15
3
+ Version: 0.0.17
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,4 +1,4 @@
1
- oep_client/__init__.py,sha256=zvm0p-O0Tj_srfItEl2MxajgC1E-8S4OVkof3AZxwSk,164
1
+ oep_client/__init__.py,sha256=eyvvNunbMdAbPy2V8fuoA6ihjB1jAMnjjlda5qwBhkA,164
2
2
  oep_client/__main__.py,sha256=qtVGdpAHULBtLY2SedabJf-uwDZZhMf_YmrbqRzM57U,14669
3
3
  oep_client/arm.py,sha256=JLyUhLSPcmsk73schZcaJYoOKuHzrvnU8kPmfrEvVuo,12331
4
4
  oep_client/capture.py,sha256=Nmx9Oi9YzS_0HfeM3pDcGvqfHINSrifFqwNj9D7-D-U,25851
@@ -10,7 +10,7 @@ oep_client/console.py,sha256=YYcuc9Qxe3kihla8wynYbDaLVr7wBLEvswrM-cMK3Tk,6859
10
10
  oep_client/core.py,sha256=Cyyaknjipkg6tS76dZe5GMqjmOoQjlfeP0WFtMHkJNs,10403
11
11
  oep_client/decode.py,sha256=M-bRARrA2qGZLoJn0BdXeTb4WjL_2Hb2nk_g1IGXIw4,2382
12
12
  oep_client/dump.py,sha256=GAnmu2abuDmGmbWcbbEfC3EUuPp5Hady9vQVNcQ-724,6743
13
- oep_client/endpoint.py,sha256=aa9znMaedjEnMDNcGsV-4gxTZJSd6IxNyPpcJM2PEzk,87244
13
+ oep_client/endpoint.py,sha256=km-oC4patoXIh9YVjJhiEzK8AhzkhAA67YYpgK-h7ko,88117
14
14
  oep_client/esp32_targets.py,sha256=b8tNH-nb2KC-XgNfWg5l3TO0cyhZOF-gJajaVxNVSGQ,4988
15
15
  oep_client/fake.py,sha256=18zEHdvJzgEEqDZ2Dk2hcE_bct2UKGegc38FobmiYpM,18111
16
16
  oep_client/fake_capture.py,sha256=6BadaybnZ0jRDfxjnkLXttw65rkoPgsIY5FvAWKxMg8,22812
@@ -30,8 +30,8 @@ oep_client/rp2350.py,sha256=7OMyj270k3AY1e3-ljicPwOjf9jOlokbT6QNkA0b0yY,4227
30
30
  oep_client/target.py,sha256=R8BvYfFfYNhZF0MysJkNb8b69YgBlmeGXNX8ReZIe5k,1068
31
31
  oep_client/uiapduino.py,sha256=IEPG3LbZPksi8g3wmAf6T0CRWSfYKW1_qrH_GBVQdxY,6090
32
32
  oep_client/usb_stream.py,sha256=VJMCxsOlQCk005FcS92pqTh33fRSFBizoL__L0VbUMA,10242
33
- oep_client_python-0.0.15.dist-info/METADATA,sha256=VCoBb6lru7BAlrA8zkzlVKZ20kgjuy8gSSbKDjJ70-o,8590
34
- oep_client_python-0.0.15.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
35
- oep_client_python-0.0.15.dist-info/entry_points.txt,sha256=h6_8QX89Ww1ogALEGG5g4kspT3IOV6O51lwKqf5BWco,49
36
- oep_client_python-0.0.15.dist-info/licenses/LICENSE,sha256=ntlalztb3L1OaNAxmQdHlubu5fVhjMc9oRZi3PeQhXg,1076
37
- oep_client_python-0.0.15.dist-info/RECORD,,
33
+ oep_client_python-0.0.17.dist-info/METADATA,sha256=j1bbDsxnhlR7Lr02Q6hErSsfmMVz7XwQUx1UMXC2_Lw,8590
34
+ oep_client_python-0.0.17.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
35
+ oep_client_python-0.0.17.dist-info/entry_points.txt,sha256=h6_8QX89Ww1ogALEGG5g4kspT3IOV6O51lwKqf5BWco,49
36
+ oep_client_python-0.0.17.dist-info/licenses/LICENSE,sha256=ntlalztb3L1OaNAxmQdHlubu5fVhjMc9oRZi3PeQhXg,1076
37
+ oep_client_python-0.0.17.dist-info/RECORD,,