National Instruments IEEE 1394 Automobile Accessories User Manual


 
Appendix A Register-Level Programming
NI-IMAQ for IEEE 1394 Cameras User Manual A-4 ni.com
register (0x480). Add the specified offset to the base
register—0xF0F00000 for most IEEE 1394 cameras.
0xF0F00000 + 0x480 = 0xF0F00480
Read the value into storage.
read quadlet (0xF0F00480) = <advanced_feature_inq>
where <advanced_feature_inq> = 0x800000.
Now, calculate the offset to the advanced feature offset. You need to
multiply the previous result by 4 to convert the quadlet offset value to byte
offset.
(0xF0F00000 + (<advanced feature offset> × 4) + 0x98) = newly
calculated offset
byte swap (1 << 17) = newly calculated register mask
write quadlet (0xF2F00098, 0x00002000)
Now the camera is set to the test pattern.
Caveats
This section discusses caveats to consider when programming registers
using the NI-IMAQ for IEEE 1394 Cameras software.
Endianess
Data that spans multiple bytes, such as a quadlet, may be written
left-to-right or right-to-left. The method with which data is written is called
endianness. Two types of endianness exist: big endian and little endian.
The IEEE 1394 bus transports data using the big endian method. However,
Windows and LabVIEW RT host machines accept little endian data. To
correct for this discrepancy, NI-IMAQ for IEEE 1394 Cameras byte-swaps
every quadlet that is read or written with low-level register primitives.