Performing simple accesses, Developing your own interrupt method – National Instruments 6508 PCI-DIO-96 User Manual
Page 51
Chapter 6
Programming
© National Instruments Corporation
6-5
PCI-DIO-96 User Manual
system. When you develop a driver using the toolkit, your driver
plug-in has access to all the information and support functions it needs
to control the device and respond to interrupts. When you use the
toolkit, your application is divided into two parts—a driver and an
interface to the driver. You use the driver to control the hardware and
the interface to control the driver. You can install the driver toolkit by
launching the NI-DAQ installer, choosing the alternate installations
option (see the installer for help), and dragging the toolkit icon to your
disk. Documentation for the toolkit is included in the toolkit.
Performing Simple Accesses
To perform simple input and output using your PCI board without using
the drivers included in NI-DAQ or writing your own drivers, you can
use the
Get_DAQ_Device_Info
call to do simple accesses with the
board. If you want to use interrupts, you must work directly with the
Macintosh Operating System (OS), and you could inadvertently corrupt
portions of NI-DAQ. Therefore, National Instruments recommends this
option only if you are not generating interrupts. If you need or want to
use interrupts, either use the driver toolkit mentioned earlier or develop
your own method.
Developing Your Own Interrupt Method
National Instruments does not support developing your own interrupt
method. To do this, consult the following documents:
•
Designing PCI Cards and Drivers for Power Macintosh Computers
•
Inside Macintosh: Devices
•
Inside Macintosh: Memory
•
Inside Macintosh: Operating System Utilities
•
Inside Macintosh: Processes
•
Inside Macintosh: Power PC System Software
Because NI-DAQ has not configured your board, you will need to
perform the following code sequence to activate the board. Using the
documents listed above, you must retrieve the
deviceNode
parameter
from the Name Registry.
#include<pci.h>
void
*configureCard(RegEntryIDPtr deviceNode);
void
*configureCard
(
RegEntryIDPtrdeviceNode