Programming the Board
Gathering information from the card
(c) Spectrum GmbH
61
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:
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