Extract reusable device protocols, ports and logic analyzers from SETGUI

This commit is contained in:
2026-09-23 20:11:37 +03:00
parent 80ba17d77d
commit 795a1279b1
63 changed files with 10181 additions and 6 deletions

View File

@@ -0,0 +1,18 @@
"""Optional native SETProtocol backend, configured by SETPROTOCOL_LIBRARY."""
from __future__ import annotations
def _load():
try:
from protocan.native import NativeProtocol
return NativeProtocol()
except (ImportError, OSError, RuntimeError):
return None
SHARED_PROTOCOL = _load()
def get_shared_protocol():
"""Return SETProtocol, or None for source/test fallback builds."""
return SHARED_PROTOCOL