Aardvark#

class Aardvark(serial_number: str | None = None)[source]#

Bases: I2CDriverBase

Total Phase Aardvark I2C/SPI host adapter. Connection params captured in __init__; USB opens on open().

serial_number (e.g. "2239-764425"); None lets pyaardvark pick the first available adapter.

Methods

close

Close the adapter handle.

open

Open the adapter (typically a USB host adapter) and prepare it for transactions.

read

Read length bytes from the 7-bit address (master read transaction).

set_bitrate

Set the master clock rate in kHz.

set_power_enable

Enable or disable target-power output on the adapter (where supported).

set_pullups

Enable or disable the adapter's internal bus pull-ups (typical: ~10 kΩ to VCC).

write

Write data to the 7-bit address (master write transaction).

write_read

Write data then immediately read read_len bytes from address using a repeated START.