diff --git a/dupicolib/board_commands_interface.py b/dupicolib/board_commands_interface.py index bf63d6b..2b6a145 100644 --- a/dupicolib/board_commands_interface.py +++ b/dupicolib/board_commands_interface.py @@ -99,6 +99,21 @@ def detect_osc_pins(reads: int, ser: serial.Serial | None = None) -> int | None: int | None: A bitmask with bits set to 1 for pins that were detected as flipping """ raise NotImplementedError() + + @staticmethod + def cxfer_read(address_pins: list[int], data_pins: list[int], hi_pins: list[int], ser: serial.Serial | None = None) -> bytes | None: + """Uses the "Clever Transfer" mode on the dupico to read the content of an IC. + + Args: + address_pins (list[int]): List of the pins composing the address, in order, starting from A0, and already mapped on the dupico socket + data_pins (list[int]): List of the pins composing the data, in order, starting from D0, and already mapped on the dupico socket + hi_pins (list[int]): List of the pins that must be always set to a high logic level during the transfer. + ser (serial.Serial | None, optional): Serial port on which to send the commands. Defaults to None. + + Returns: + bytes | None: A bytes object containing the data read from the IC + """ + raise NotImplementedError() @classmethod def map_value_to_pins(cls, pins: list[int], value: int) -> int: diff --git a/pyproject.toml b/pyproject.toml index 0c387b8..2c55df6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "dupicolib" -version = "0.4.2" +version = "0.4.3" description = "Library to interface with the dupico hardware" authors = [ { name = "Fabio Battaglia", email = "hkzlabnet@gmail.com" }