// intrface.h
//
// Generated by C DriverWizard 3.2.0 (Build 2485)
// Requires DDK Only
// File created on 3/17/2006
//

/*
modification history
--------------------
 2006-02-07   Created							                           Dzk
*/


#define SCH311XDevice_CLASS_GUID \
 { 0xd49a8b51, 0x8356, 0x4420, { 0xa9, 0xe8, 0x9, 0xa7, 0x78, 0xc6, 0x2a, 0x24 } }

#define DEVICE_NAME		L"SCH311X"	//so device name for 1st unit will be L"\\\\.\\SCH311X0"

#ifndef __INTRFACE_H__
#define __INTRFACE_H__

#define FILE_DEVICE_SCH311X  0x8000

// Define Interface reference/dereference routines for
// Interfaces exported by IRP_MN_QUERY_INTERFACE

#define SCH311X_IOCTL(index) \
    CTL_CODE(FILE_DEVICE_SCH311X, index, METHOD_BUFFERED, FILE_READ_DATA)

#define SCH311X_HWM_IOCTL_GET_TEMP \
    CTL_CODE(FILE_DEVICE_SCH311X, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define SCH311X_HWM_IOCTL_GET_TEMP_LIMITS \
    CTL_CODE(FILE_DEVICE_SCH311X, 0x801, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define SCH311X_HWM_IOCTL_SET_TEMP_LIMITS \
    CTL_CODE(FILE_DEVICE_SCH311X, 0x802, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define SCH311X_HWM_IOCTL_GET_VOLT \
    CTL_CODE(FILE_DEVICE_SCH311X, 0x803, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define SCH311X_HWM_IOCTL_GET_VOLT_LIMITS \
    CTL_CODE(FILE_DEVICE_SCH311X, 0x804, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define SCH311X_HWM_IOCTL_SET_VOLT_LIMITS \
    CTL_CODE(FILE_DEVICE_SCH311X, 0x805, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define SCH311X_HWM_IOCTL_WAIT_ON_MASK \
    CTL_CODE(FILE_DEVICE_SCH311X, 0x806, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define SCH311X_HWM_IOCTL_GET_FAN_COUNT \
    CTL_CODE(FILE_DEVICE_SCH311X, 0x807, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define SCH311X_HWM_IOCTL_GET_FAN_CONFIG \
    CTL_CODE(FILE_DEVICE_SCH311X, 0x80a, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define SCH311X_HWM_IOCTL_SET_FAN_CONFIG \
    CTL_CODE(FILE_DEVICE_SCH311X, 0x80b, METHOD_BUFFERED, FILE_ANY_ACCESS)



/* temperature sensors */
#define SCH_TEMP_CPU	0			/* CPU temp. sensor */
#define SCH_TEMP_AMB	1			/* ambient temp. sensor */
#define SCH_TEMP_RMT	2			/* remote temp. sensor */

#define SCH_TEMP_SENSORS	3

/* voltage sensors */
#define SCH_VOLT_2_5		0	/* 2.5V voltage  */
#define SCH_VOLT_VCCP		1	/* Vccp voltage  */
#define SCH_VOLT_VCC		2	/* VCC voltage  */
#define SCH_VOLT_5			3	/* +5V voltage  */
#define SCH_VOLT_12			4	/* +12V voltage  */
#define SCH_VOLT_VTR		5	/* VTR voltage  */
#define SCH_VOLT_VBAT		6	/* Vbat voltage  */

#define SCH_VOLT_SENSORS	7

/* fan sensors */
#define SCH_FAN_1			0
#define SCH_FAN_2			1
#define SCH_FAN_3			2

#define SCH_FAN_SENSORS		3


/* events (interrupts, and interrupt masks) */
#define SCH_EVT_VOLT			(1<<0)	/* Group interrupt VOLT enbale bit */
#define SCH_EVT_VBAT			(1<<1)	/* VBAT int.*/
#define SCH_EVT_2V5				(1<<2)	/* 2.5V int.*/
#define SCH_EVT_VCCP			(1<<3)	/* Vccp int.*/
#define SCH_EVT_VTR				(1<<4)	/* VTR int.*/
#define SCH_EVT_5V				(1<<5)	/* 5V int. */
#define SCH_EVT_12V				(1<<6)	/* 12V int.*/
#define SCH_EVT_VCC				(1<<7)	/* VCC int. */

#define SCH_EVT_FAN				(1<<8)	/* Group interrupt TACH enbale bit */
#define SCH_EVT_FAN1			(1<<9)	/* FAN1 int.*/
#define SCH_EVT_FAN2			(1<<10)	/* FAN2 int.*/
#define SCH_EVT_FAN3			(1<<11)	/* FAN3 int.*/

#define SCH_EVT_TEMP			(1<<16)	/* Group interrupt TEMP enbale bit */
#define SCH_EVT_AMB				(1<<17)	/* ambient int. enable bit */
#define SCH_EVT_CPU				(1<<18)	/* CPU int. enable bit */
#define SCH_EVT_RMT				(1<<19)	/* remote int. enable bit */


/* Structure definitions */

struct SchTempSettings
{
	UCHAR sensor;	//sensor index (SCH_TEMP_CPU, SCH_TEMP_AMB or SCH_TEMP_RMT)
	UCHAR loTemp;	//temperature low limit
	UCHAR hiTemp;	//temp. high limit
};

struct SchVoltSettings
{
	UCHAR sensor;	//voltage sensor index (valid values are listed in "voltage sensors")
	ULONG loVoltage;	//voltage low limit (milivolts)
	ULONG hiVoltage;	//voltage high limit (milivolts)
};

struct SchFanSettings
{
	UCHAR sensor;	//fan index (SCH_FAN_1, SCH_FAN_2, or SCH_FAN_3
	USHORT limit;	//fan low count limit
};


#endif // __INTRFACE_H__


// EOF