- Linux MultiMedia Studio Computer Accessories User Manual

Mint v4 PC Programming Guide
46
MN1278 05.2001
This Chapter covers implementing an interface to NextMove PCI in under an operating system other than the
systems supported by the standard Baldor Motion Toolkit for example QNX, Linux etc.
A special version of the CNextMovePCI1 class has been written. This class (called CSimplePCI) provides all the
functions required except the actual hardware interface functions, which must be provided by the user.
5.1 How to Recognize the NextMove PCI.
To find the NextMove PCI, the computer’s PCI controller must be interrogated. The method for this will differ
between operating systems. Each PCI device can be recognized by its Vendor ID and Device ID. For a
NextMove PCI the following applies:
Vendor ID = 145F(Hex)
Device ID = 0001.
5.2 Host Accessible Hardware on NextMove PCI.
The are three blocks of hardware which can be accessed on NextMove PCI. One of these is mapped into both
memory and IO space, so it appears as if there are four blocks which can be accessed.
Block Size Map type Description
1 128 bytes Memory This is NextMove’s PCI chip (also referred to as the PLX chip.) It
controls the hardware reset and interrupt lines.
2 128 bytes I/O This is also the PCI controller chip, but mapped into IO space, not
memory.
3 16K Memory This is the Dual Port RAM.
4 32 bytes I/O This is currently unused.
Of these, the two memory mapped areas ( blocks 1 and 3 ) will be used. Blocks 2 and 4 are can be ignored. The
memory mapped addresses of blocks 1 and 3 should be read from the computers PCI controller. The memory
address of Block 1 must be stored for the functions PLXRead and PLXWrite and the address Block 3 is mapped
into must be stored for use with the functions getLong and setLongInternal.
5.3 The CSimplePCI class.
The CSimplePCI class splits the hardware access functions from the rest of the Mint Interface Library. To use
the class inherit from the CSimplePCI class and supply the virtual functions required (listed below). The easiest
way to do this is to modify the CMySimplePCI example.