-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbzh_dell_smm_io_drv_fun.h
57 lines (40 loc) · 1.45 KB
/
bzh_dell_smm_io_drv_fun.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// SOURCE: https://github.com/424778940z/dell-fan-utility
#ifndef BZH_DELL_SMM_IO_DRV_FUN_H
#define BZH_DELL_SMM_IO_DRV_FUN_H
#ifdef __cplusplus
extern "C"
{
#endif
#include "bzh_dell_smm_io_codes.h"
#include "bzh_dell_smm_io_drv_opt.h"
// Define the various device type values. Note that values used by Microsoft
// Corporation are in the range 0-32767, and 32768-65535 are reserved for use
// by customers.
#define FILE_DEVICE_BZH_DELL_SMM 0x0000B424
// Macro definition for defining IOCTL and FSCTL function control codes.
// Note that function codes 0-2047 are reserved for Microsoft Corporation,
// and 2048-4095 are reserved for customers.
#define BZH_DELL_SMM_IOCTL_KEY 0xB42
// Define our own private IOCTL
#define IOCTL_BZH_DELL_SMM_RWREG CTL_CODE(FILE_DEVICE_BZH_DELL_SMM, \
BZH_DELL_SMM_IOCTL_KEY, \
METHOD_BUFFERED, \
FILE_ANY_ACCESS)
typedef unsigned char UCHAR;
typedef unsigned short USHORT;
typedef unsigned long ULONG;
typedef struct {
unsigned long cmd; // = cmd
unsigned long data; // = data
unsigned long stat1; // = 0
unsigned long stat2; // = 0
} SMBIOS_PKG;
extern SMBIOS_PKG smm_pkg;
void display_error(ULONG errorcode);
ULONG _stdcall dell_smm_io(ULONG cmd, ULONG data);
ULONG dell_smm_io_set_fan_lv(ULONG fan_no, ULONG lv);
ULONG dell_smm_io_get_fan_rpm(ULONG fan_no);
#ifdef __cplusplus
}
#endif
#endif // BZH_DELL_SMM_IO_DRV_FUN_H