5.3_9112_Initial

@ Description

A PCI-9112 card is initialized according to the card number. Becaus e the PCI-9112 is PCI bus architecture and meets the plug and play design, the IRQ and base_address (pass-through address) are assigned by system BIOS directly. Every PCI-9112 card has to be initialized by this function before calling other functions.

Note : Because configuration of PCI-9112 is handled by the system, there is no jumpers or DMA selection on the PCI boards that

need to be set up by the users.

uSyntax

Visual C++ (Windows-95)

int W_9112_Initial (int card_number, int *base_address, int *irq_no)

Visual Basic (Windows-95)

W_9112_Initial (ByVal card_number As Long, base_address As Long, irq_no As Long) As Integer

C/C++ (DOS)

int _9112_Initial (int card_number, int *base_address, int *irq_no)

u Argument

card_number : the card number to be initialized, only four

cards can be

initialized, the card number must be CARD_1, CARD_2,

CARD_3, or CARD_4.

 

base_address : the I/O port base address of the card, it is

asigned by system

BIOS.

 

irq_no: system will give an available interrupt number to this card automatically.

uReturn Code

ERR_NoError,ERR_InvalidBoardNumber

ERR_PCIBiosNotExist, ERR_PCICardNotExist

ERR_PCIIrqNotExist

uExample

#include "9112.h" main()

{

int

errCode;

int

baseAddr1, irqNo1;

int

baseAddr2, irqNo2;

errCode = _9112_Initial( CARD_1, &baseAddr1, &irqNo1); if ( errCode != ERR_NoError )

C/C++ Library 41