Data Formats

 

Two basic data formats are used by the driver.

Channel Number

The individual output to be affected by functions such as pipx40_setChannelState is specified by a channel number.

For any sub-unit type other than a matrix, this unity-based number directly specifies the affected output channel.

For a matrix sub-unit, the channel number of a crosspoint is determined by folding on the row-axis. For example, in a matrix of dimensions 8 rows x 12 columns, channel number 13 represents the crosspoint (row 2, column 1):

 

Note: matrix operation

More straightforward matrix operation using row/column co-ordinates is provided by pipx40_setCrosspointState and associated functions.

Pattern Array

Functions affecting all of a sub-unit's outputs such as pipx40_setChannelPattern utilise a one-dimensional data array (or vector) of 32-bit longwords. In the array, each bit represents the state of one output channel: '0' for OFF, '1' for ON.

The least significant bit of the base element of the array corresponds to channel 1. More significant bits correspond to higher-numbered channels.

 

For a matrix sub-unit, bit assignments follow the same method as that used to determine channel numbers. Hence for the matrix example above:

 

Element 0 bit 0 = row 1 column 1

Element 0 bit 11 = row 1 column 12

Element 0 bit 12 = row 2 column 1

Element 2 bit 31 = row 8 column 12

 

Identical formatting is employed by all of the pattern-based functions:

pipx40_setChannelPattern

pipx40_getChannelPattern

pipx40_setMaskPattern

pipx40_getMaskPattern

pipx40_readInputPattern