Skip to content

Commit

Permalink
bump version, begin defining the cxfer read command
Browse files Browse the repository at this point in the history
  • Loading branch information
hkzlab committed Sep 1, 2024
1 parent fdaf760 commit 5406509
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions dupicolib/board_commands_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down

0 comments on commit 5406509

Please sign in to comment.