
70
(c) Spectrum Instrumentation GmbH
Gathering information from the card
Programming the Board
Used type of driver
This register holds the information about the driver that is actually used to access the board. Although the driver interface doesn’t differ be
-
tween Windows and Linux systems it may be of interest for a universal program to know on which platform it is working.
Driver version
This register holds information about the currently installed driver library. As the drivers are permanently improved and maintained and new
features are added user programs that rely on a new feature are requested to check the driver version whether this feature is installed.
The resulting 32 bit value for the driver version consists of the three version number parts shown in the table below:
Kernel Driver version
This register informs about the actually used kernel driver. Windows users can also get this information from the device manager. Please refer
to the „Driver Installation“ chapter. On Linux systems this information is also shown in the kernel message log at driver start time.
The resulting 32 bit value for the driver version consists of the three version number parts shown in the table below:
The following example demonstrates how to read out the kernel and library version and how to print them.
This small program will generate an output like this:
Custom modifications
Since all of the boards from Spectrum are modular boards, they consist of one base board and one piggy-back front-end module and even
-
tually of an extension module like the Star-Hub. Each of these three kinds of hardware has its own version register. Normally you do not need
this information but if you have a support question, please provide the revision together with it.
Table 20: Spectrum API: register driver type information and possible driver types
Register
Value
Direction
Description
SPC_GETDRVTYPE
1220
read
Gives information about what type of driver is actually used
DRVTYP_LINUX32
1
Linux 32bit driver is used
DRVTYP_WDM32
4
Windows WDM 32bit driver is used (XP/Vista/Windows 7/Windows 8/Windows 10).
DRVTYP_WDM64
5
Windows WDM 64bit driver is used by 64bit application (XP64/Vista/Windows 7/Windows 8/Windows 10).
DRVTYP_WOW64
6
Windows WDM 64bit driver is used by 32bit application (XP64/Vista/Windows 7/Windows 8/ Windows 10).
DRVTYP_LINUX64
7
Linux 64bit driver is used
Register
Value
Direction
Description
SPC_GETDRVVERSION
1200
read
Gives information about the driver library version
Driver Major Version
Driver Minor Version
Driver Build
8 Bit wide: bit 24 to bit 31
8 Bit wide, bit 16 to bit 23
16 Bit wide, bit 0 to bit 15
Register
Value
Direction
Description
SPC_GETKERNELVERSION
1210
read
Gives information about the kernel driver version.
Driver Major Version
Driver Minor Version
Driver Build
8 Bit wide: bit 24 to bit 31
8 Bit wide, bit 16 to bit 23
16 Bit wide, bit 0 to bit 15
spcm_dwGetParam_i32 (hDrv, SPC_GETDRVVERSION, &lLibVersion);
spcm_dwGetParam_i32 (hDrv, SPC_GETKERNELVERSION, &lKernelVersion);
printf("Kernel V %d.%d build %d\n”,lKernelVersion >> 24, (lKernelVersion >> 16) & 0xff, lKernelVersion & 0xffff);
printf("Library V %d.%d build %d\n”,lLibVersion >> 24, (lLibVersion >> 16) & 0xff, lLibVersion & 0xffff);
Kernel V 1.11 build 817
Library V 1.1 build 854
Table 21: Spectrum API: custom modification register and different bitmasks to split the register in various hardware parts
Register
Value
Direction
Description
SPCM_CUSTOMMOD
3130
read
Dedicated feature register used to mark special custom modifications of the base card and/or the
front-end module and/or the Star-Hub module. This is only used if the card has been specially
customized. Please refer to the extra documentation for the meaning of the custom modifications.
This register is supported for all M4i, M4x, M2p and digitizerNETBOX/generatorNETBOX based
upon these series.
SPCM_CUSTOMMOD_BASE_MASK
000000FFh
Mask for the custom modification of the base card.
SPCM_CUSTOMMOD_MODULE_MASK
0000FF00h
Mask for the custom modification of the front-end module(s).
SPCM_CUSTOMMOD_STARHUB_MASK
00FF0000h
Mask out custom modification of the Star-Hub module.
Summary of Contents for M2p.59 Series
Page 190: ......