User`s guide
Adding Interrupt Support
- PreHookFunction
Prototype:
int __cdecl your_company_name_ boardPreHook(xpcPCIDevice *pciI nfo);
- PostHookFunction
Prototype:
void __cdecl your_compan y_name_boardPostHook(xpcPCIDevice *pciInfo);
- StartFunction
Prototype:
void __cdecl your_compan y_name_boardStart(xpcPCIDevice *pciInfo);
- StopFunction
Prototype:
void __cdecl your_compan y_name_boardStop(xpcPCIDevice *pciInfo);
If any of these four functions does not need to exist, set the corresponding
board structure entry to 'NULL' to prevent calls to that function in that
context.
Note The differences between hook functions fo r PCI and ISA devices are:
- PCI devices — A hook function for a PCI dev ice has all fields of the
xpcPCIDevice structure filled in except the VirtAddress field. To get
the virtual address for a physical mem ory, in the
Start function, call
the
xpcReserveMemoryRegion function and save the resulting virtual
address in the
VirtAddress field of the x pcP CIDevice structure. A
pointer to the same instance of this structure is p as sed to all four
functions. This action makes data, such as virtual addresses, available
to all functions.
- ISA devices — A hook function for an ISA device has the base I/O
address ente red i n the f irst ph ysical address. No other fields in the
xpcPCIDevice structure are filled in.
5-13