
// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the KOMLED_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// KOMLED_API functions as being imported from a DLL, where as this DLL sees symbols
// defined with this macro as being exported.

//For detailed description of this API please see KomLedApi.chm help file.

/*
modification history
--------------------
 2008-01-18   Created							                           Dzk
*/


#ifdef __cplusplus
extern "C" {
#endif

#ifdef KOMLED_EXPORTS
#define KOMLED_API __declspec(dllexport)
#else
#define KOMLED_API __declspec(dllimport)
#endif

#include <windows.h>

//modes of operation:
#define KOMLED_MODE_OFF		0x00
#define KOMLED_MODE_ON		0x01
#define KOMLED_MODE_SYS		0x02	//system drives LED (watchdog / overheat)
#define KOMLED_MODE_BLINK		0x04	//slow blinking
#define KOMLED_MODE_BLINK_FAST	0x08	//fast blinking

//colors
#define KOMLED_COLOR_GREEN	0x01
#define KOMLED_COLOR_RED	0x02
#define KOMLED_COLOR_AMBER	0x04


//KomLed data types / structures:
#define MAX_LED_NAME	16	//max led name length

typedef struct KomLedInfo
{
	UCHAR	ledIdx;					//led index (zero-based)
	char	ledName[MAX_LED_NAME];	//led short description
	UCHAR	availModes;				//led available modes
	UCHAR	availColors;			//led available colors
	UCHAR	availStates;			//led available states (on,off,blink etc.)
}tKomLedInfo, *ptKomLedInfo;


//Library exports:
KOMLED_API DWORD KomLedGetNumOfLeds(UCHAR *pLeds);
KOMLED_API DWORD KomLedGetInfo(UCHAR led,ptKomLedInfo pInfo);
KOMLED_API DWORD KomLedGet(UCHAR led,ULONG *pMode,ULONG *pColor);
KOMLED_API DWORD KomLedSet(UCHAR led,ULONG mode,ULONG color);

KOMLED_API DWORD KomLedSetRestoreStatus(BOOL fRestore);
KOMLED_API DWORD KomLedGetRestoreStatus(BOOL* pfRestore);

#ifdef __cplusplus
}
#endif

//EOF