/* vxbKEAPI.h - KEAPI vxBus driver declarations */

/*
 * Copyright 2011 Kontron AG.
 */

/*
modification history
--------------------
01a,03may11,edv initial version
*/

#ifndef __INVXBKEAPIh
#define __INVXBKEAPIh

#include <vxWorks.h>
#include <hwif/vxbus/vxBus.h>
#include <private/semLibP.h>

#ifdef __cplusplus
extern "C" {
#endif

#define KEAPI_VXB_DRIVER_NAME "keapi"

struct keapiDriverControl
    {
    /* backward reference to the device instance */
    VXB_DEVICE_ID pInst;

    /* TODO */
    };

IMPORT SEMAPHORE    keapiGlobalLock; /* mutex sem for mutual-exclusion     */
IMPORT BOOL keapiLocalInitialized;

/******************************************************************************
*
* vxbKEAPIRegister - registers the driver
*
* This routine registers the KEAPI driver with the vxBus subsystem.
*
* RETURNS: N/A
*
* ERRNO: not set
*/
IMPORT void vxbKEAPIRegister (void);

/*******************************************************************************
*
* getKEAPIControl - get internal data of the KEAPI VxBus driver
*
* This routine returns internal data of the KEAPI VxBus driver
*
* RETURNS: pointer to internal data structure or NULL
*
* ERRNO: ENODEV
* 
*/
IMPORT struct keapiDriverControl *getKEAPIControl(void);

#ifdef __cplusplus
}
#endif

#endif /* __INVXBKEAPIh */

