Programming the Board

 

Initialization

 

 

 

 

 

 

 

 

 

PCIBIT_STARHUB

2048

Is set on the board, that carrys the starhub piggy-back module. This flag is set in addition to the PCIBIT_SYNC flag

 

 

 

mentioned above. If on no synchronized board the starhub option is installed, the boards are synchronized with the

 

 

 

cascading option.

 

PCIBIT_XIO

8192

Is set if the Option Extra I/O is installed.

The following example demonstrates how to read out the information about one feature.

SpcGetParam (hDrv,

SPC_PCIFEATURES,

&lFeatures);

if (lFeatures & PCIBIT_DIGITAL)

 

printf("Option

digital inputs is installed on your board");

Used interrupt line

This register holds the information of the actual used interrupt line for the board. This information is sometimes more easy in geting the interrupt line of one specific board then using the hardware setups of your operating system.

Register

Value

Direction

Description

SPC_PCIINTERRUPT

2300

r

The used interrupt line of the board.

Used type of driver

This register holds the information about the driver that is actually used to access the board. Although most users will use the boards within a Windows system and most Windows users will use the WDM driver, it can be sometimes necessary of knowing the type of driver.

Register

Value

Direction

Description

SPC_GETDRVTYPE

1220

r

Gives information about what type of driver is actually used

 

DRVTYP_DOS

0

DOS driver is used

 

DRVTYP_LINUX

1

Linux driver is used

 

 

 

 

 

DRVTYP_VXD

2

Windows VXD driver is used (only Windows 95)

 

 

 

 

 

DRVTYP_NTLEGACY

3

Windows NT Legacy driver is used (only Windows NT)

 

DRVTYP_WDM

4

Windows WDM driver is used (only Windows 98/ME/2000/XP). This is the most common Windows driver.

Driver version

This register informs Windows users about the actual used driver DLL. This information can also be obtained from the device manager. Please refer to the „Driver Installation“ chapter. Linux users will get the revision of their kernel driver instead, because linux does not use any DLL.

Register

Value

Direction

Description

SPC_GETDRVVERSION

1200

r

Gives information about the driver DLL version

Kernel Driver version

This register informs OS independent about the actual used kernel driver. Windows users can also get this information from the device man- ager. Plese refer to the „Driver Installation“ chapter. Linux users can get the driver version by simply accessing the following register for the kernel driver.

Register

Value

Direction

Description

SPC_GETKERNELVERSION

1210

r

Gives information about the kernel driver version.

(c) Spectrum GmbH

39

Page 39
Image 39
Spectrum Brands MC.31XX Used interrupt line, Used type of driver, Programming the Board Initialization, Driver version