
Programming the Board | Initialization |
|
|
Installed features and options
The SPC_PCIFEATURES register informs you about the options, that are installed on the board. If you want to know about one option being installed or not, you need to read out the 32 bit value and mask the interesting bit.
Register | Value | Direction | Description | |
SPC_PCIFEATURES | 2120 | r | PCI feature register. Holds the installed features and options as a bitfield, so the return value must be | |
|
|
|
| masked with one of the masks below to get information about one certain feature. |
| PCIBIT_MULTI | 1 | Is set if the Option Multiple Recording / Multiple Replay is installed. | |
| PCIBIT_DIGITAL | 2 | Is set if the Option Digital Inputs / Digital Outputs is installed. | |
|
|
|
| |
| PCIBIT_GATE | 32 | Is set if the Option Gated Sampling / Gated Replay is installed. | |
|
|
|
| |
| PCIBIT_SYNC | 512 | Is set if the Option Synchronization is installed for that certain board, regardless what kind of synchronization you | |
|
|
| use. Boards without this option cannot be synchronized with other boards. | |
| PCIBIT_TIMESTAMP | 1024 | Is set if the Option Timestamp is installed. | |
| PCIBIT_STARHUB | 2048 | Is set on the board, that carrys the starhub | |
|
|
| 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 ma- nager. 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 |