DscInitBoard

Universal Driver Documentation
Initializes and sets the hardware configuration for the given board. This function must be called once for each board before any other function call to that board.

NOTE: The Athena data acquisition circuit is identical to the data acquisition implementation in the Prometheus CPU board. Version 5.8 of the Universal Driver supports the Athena via its support for the Prometheus DAQ. Athena customers should initialize the Universal Driver for the board using the board constant DSC_PROM. DSCUD 5.9 will include direct support for the Athena, so customers using 5.9 or later can initialize the board using the DSC_ATHENA constant instead.

Table of contents

Function Definition

BYTE dscInitBoard(BYTE boardtype, DSCCB* dsccb, DSCB* board);

Function Parameters

NameDescription
boardtypeThe type of board to initialize; should be one of the valid board types listed in the Board Macros table.
dsccbThe hardware settings used to configure the given board

Return Value

The handle of the initialized board to be used in subsequent Universal Driver function calls

Usage Example

    ERRPARAMS errparams;
    DSCCB dsccb;
    DSCB dscb;

    memset(&dsccb, 0, sizeof(DSCCB));
    dsccb.base_address = 0x300;
    dsccb.int_level = 7;

    if ((result = dscInitBoard(DSC_DMM32, &dsccb, &dscb)) != DE_NONE)
    {
        dscGetLastError(&errparams);
        fprintf(stderr, "dscInitBoard failed: %s (%s)\n", 
                dscGetErrorString(result), errparams.errstring);
        return result;
    }


This page was last modified 22:08, 2 Feb 2005.
Copyright (c) 2004 Diamond Systems. All Rights Reserved.