Integrated Circuit Registers

A Class is available for organizing, reading, and writing registers as would be found in an integrated circuit.

class command.Register(name, address, read_write='R/W', is_config=True)[source]

A register of an integrated circuit to read or set The register is an address value pair and can be R or R/W

todo:
handle values that are sub-registers or expand over multiple registers (might be another class)
Parameters:
name : string

The name of the register, used as lookup key to the dictionary of registers

address : int

address value

read_write : string

‘R’ ‘R/W’, ‘W’

is_config : boolean

if True the register should have a constant value once written if False the chip may update the register (e.g. by ADC readings) and the value could change