Help: ICE_IOC_BP
Handles bit packing of 1,2,3,4,5,6,7 or 8 bit data
In BitPack mode, the IOC expects 1 clock and 1-8 data lines.
Data is packed little endian into consecutive bytes.
To run BP the IOC must be loaded with:
pic reset <card alias> "bp" from Midas
pic_loadfile (p, "*_bp", FLG_IOC); from C
The connector from LSB to MSB in BP mode is:
dat0, dat1 ... dat15 with BIT=0 flag (default)
dat15, dat14 ... dat0 with BIT=1 flag
Valid data bits are 0 to N-1 for N bit data.
The KEY_IOCALG byte register is used as follows:
reg.bits[2..0] number of valid bits (1-8) minus 1
Use pic_setkey(p,dmac,KEY_IOCALG,register,1); to set the word width.
Setting the BIGE flag reverses the bit order of the output byte.