PCI-208 / CPCI.208 manual
31.03.2004
Page 20 of 30
int16 SpcInitPCIBoards (int16* count, int16* PCIVersion)
count
adr of 16 bit integer
number of found PCI boards
PCIVersion
adr of 16 bit integer
found PCI version
return
16 bit integer
error code of function like listed below
Initialises all installed PCI boards. The board numbers will start with zero. The number of PCI boards will be given back in the value
Count
. All installation parameters will be read from the hardware.
Using Windows NT the boards are already installed in the registry. This function just gives back the values of the
kernel driver.
Linux initialises the boards while loading the kernel module. This function is not available under Linux.
int16 SpcInitBoard (int16 nr, int16 typ)
nr
16 bit integer
number of the board to be defined in range 0-15
typ
16 bit integer
type of the defined board listed in REGS.H
return
16 bit integer
error code of function like listed below
Defines a board for the driver. The driver supports up to 16 boards at the same time. For all ISA boards the type of installed board
must be defined before using the driver the first time. All other functions just use the board number to access the board. After
initialising the board all parameters will be set to default values.
Using Windows NT the board is already installed in the registry. This function will then just compare the board type with the already
installed one.
Linux initialises the boards while loading the kernel module. This function is not available under Linux.
int16 SpcSetParam (int16 nr, int32 reg, int32 value)
nr
16 bit integer
number of the board as defined by SpcInit...
reg
32 bit integer
register to be changed
value
32 bit integer
value for the register
return
16 bit integer
error code of function like listed below
Sets a register to a defined value or executes a command. The board must be initialised before. When using ISA boards, all installation
parameters must be set before (address, installed memory, ...). The allowed registers for the driver are listed in the board specific part of
the documentation.
When using Windows NT the installation parameters may not be changed, they are set in the registry using the
driver configuration utility.
int16 SpcGetParam (int16 nr, int32 reg, int32* value)
nr
16 bit integer
number of the board as defined by
SpcInit...
reg
32 bit integer
register to be read
value
adr of 32 bit integer
value from the register
return
16 bit integer
error code of function like listed below
Reads a register or a status information of the board. The board must be initialised before. When using ISA boards, the installation
address must be set before. The allowed registers for the driver are listed in the board specific part of the documentation.
int16 SpcSetData (int16 nr, int16 ch, int32 start, int32 len, dataptr data)
nr
16 bit integer
number of the board as defined by SpcInit...
ch
16 bit integer
channel to be written to
start
32 bit integer
startvalue to be written
len
32 bit integer
number of values to be written
data
huge ptr to data
data to be written
return
16 bit integer
error code of function like listed below
Writes data to the board for a specific channel. The board must be initialised before. When using ISA boards, all installation parameters
must be set before (address, installed memory, ...). The Start and Len parameter are implemented on all PCI boards. On ISA boards the
whole data will be written in one turn. The data must be in twos complement format (standard integer format).