spidr4.bitfield

spidr4.bitfield Module

class spidr4.bitfield.BitField(*vargs, **kwargs)[source]

A BitField is an abstraction to get/set bit-fields on a word. Its used as an super-class for a descriptior class describing a bitfield for a specific register or word.

For example the Timepix4 pixel configuration byte can be defined as follows:

class PixelConfig(BitField):

mask = Field(1, 7) tp_enable = Field(1, 6) power_enable = Field(1, 5) dac = Field(5, 0)

short_str()[source]
class spidr4.bitfield.Field(size, offset)[source]

Classes

BitField(*vargs, **kwargs)

A BitField is an abstraction to get/set bit-fields on a word.

Field(size, offset)

Class Inheritance Diagram

Inheritance diagram of spidr4.bitfield.BitField, spidr4.bitfield.Field