4.1.8 - Raw Output/Input [U3 Datasheet]
There are two IOTypes used to write or read raw data. These can be used to make low-level function calls (Section 5) through the UD driver. The only time these generally might be used is to access some low-level device functionality not available in the UD driver.
LJ_ioRAW_OUT
LJ_ioRAW_IN
When using these IOTypes, channel # specifies the desired communication pipe. For the U3, 0 is the normal pipe while 1 is the streaming pipe. The number of bytes to write/read is specified in value (1-16384), and x1 is a pointer to a byte array for the data. When retrieving the result, the value returned is the number of bytes actually read/written.
Following is example pseudocode to write and read the low-level command ConfigTimerClock.
writeArray[10] = {0x05,0xF8,0x02,0x0A,0x00,0x00,0x00,0x00,0x00,0x00};
numBytesToWrite = 10;
numBytesToRead = 10;
//Raw Out. This command writes the bytes to the device.
eGetPtr(lngHandle, LJ_ioRAW_OUT, 0, &numBytesToWrite, writeArray);
//Raw In. This command reads the bytes from the device.
eGetPtr(lngHandle, LJ_ioRAW_IN, 0, &numBytesToRead, readArray);