pynq.lib.iic Module

The pynq.lib.iic module is a driver for interacting with the Xilinx Axi IIC IP Block.

class pynq.lib.iic.AxiIIC(description)[source]

Bases: DefaultIP

Driver for the AXI IIC controller

REPEAT_START = 1
bindto = ['xilinx.com:ip:axi_iic:2.1']
receive(address, data, length, option=0)[source]

Receive data from an attached IIC slave

Parameters:
  • address (int) – Address of the slave device

  • data (bytes-like) – Data to receive

  • length (int) – Number of bytes to receive

  • option (int) – Optionally REPEAT_START to keep hold of the bus between transactions

send(address, data, length, option=0)[source]

Send data to an attached IIC slave

Parameters:
  • address (int) – Address of the slave device

  • data (bytes-like) – Data to send

  • length (int) – Length of data

  • option (int) – Optionally REPEAT_START to keep hold of the bus between transactions

wait()[source]

Wait for the transaction to complete