#ifndef SUPERIOFUNC_H
#define SUPERIOFUNC_H

#pragma pack(1)

#define DELAY_1MS 10000 //unit:100ns


#define SUPERIO_VENDER_WINBOND	0
#define SUPERIO_VENDER_ITE		1


enum SUPERIO_IO_TYPE
{
	read = 0,
	write,
	delay
};

typedef struct _SUPERIOPARAM
{
	BYTE	enterConfigValue1;
	BYTE	enterConfigValue2;
	BYTE	enterConfigValue3;
	BYTE	enterConfigValue4;
	BYTE	indexPort;
	BYTE	dataPort;
	BYTE	logicDeviceIndex;
	BYTE	logicDeviceData;
	BYTE	exitConfigValue;
	BYTE	registerAddress;
	ULONG	cmdDelay;

}SUPERIOPARAM, *PSUPERIOPARAM;

typedef struct _SUPERIOCMD
{
	ULONG	ioType; //0:Read 1:Write 2:Delay Only
	ULONG	portAddress;
	ULONG	portValue;
	ULONG	cmdDelay; //unit:us Ex. 1000 --> 1ms

}SUPERIOCMD, *PSUPERIOCMD;

UCHAR	WINAPI _SuperIoReadChar(ULONG superIoVendor, SUPERIOPARAM superIoParam);
 
void WINAPI _SuperIoWriteChar(ULONG superIoVendor, SUPERIOPARAM superIoParam, UCHAR data);

#pragma pack()

#endif