/*  keapiBSPCommon.h - KEAPI utils for Kontron MSMST board  */

/*
 * Copyright 2011 Kontron KGSC.
 */

/*
 modification history
 --------------------
 01d,07jul11,ivo update for MSMST
 01c,11may11,ivo update for nanoETXsp
 01b,28apr11,edv make to be configlette
 01a,18apr11,ivo initial version
*/

/*
DESCRIPTION:
    KEAPI BSP support for sensors at Kontron MSMST board.
    KEAPI v1.2.0.3 implementation. Initialization.
*/

#ifndef __INCkeapiBSPCommonh
#define __INCkeapiBSPCommonh

#include <../3rdparty/kontron/h/keapiVxW.h>
#include <vxCpuLib.h>
#include <vxBusLib.h>
#include <stdio.h>
#include <vxbTimerLib.h>			/* for vxUsDelay() */

#define KEAPI_VOLTAGE_SENSORS_UNSUPPORTED
#define KEAPI_FAN_UNSUPPORTED

#ifdef __cplusplus
extern "C" {
#endif

IMPORT KEAPI_RETVAL keapiImpGetCoreTemp(int core, KEAPI_PINT32 pTemp);

struct KEAPI_Libinfo {
	SEMAPHORE storageAccess;
	int watchdogValue;
};
	
#define CPLD_WATCHDOG_ADDR		0xa83
#define CPLD_WATCHDOG_MINUTE	0x80

IMPORT struct KEAPI_Libinfo *pKEAPIInfo;

#ifdef __cplusplus
}
#endif

#endif /* __INCkeapiBSPCommonh */


