#ifndef _APPLESMUMONITOR_H
#define _APPLESMUMONITOR_H
#include <IOKit/IOService.h>
class AppleSMUMonitor : public IOService
{
OSDeclareDefaultStructors(AppleSMUMonitor)
protected:
enum DeviceType {
kUnknown = 0,
kTemperatureSensor = 1,
kRPMFan = 2,
kPWMFan = 3,
kBATT_sensor = 4,
};
enum FanCommand {
kSetTarget = 0,
kGetCurrent = 1,
kGetTarget = 2,
kCommandShift = 8,
};
IOService *fProvider;
const OSSymbol *fSMUGetSensor;
const OSSymbol *fSMUGetControl;
const OSSymbol *fSMUSetControl;
const OSSymbol *fGetSensorValue;
const OSSymbol *fGetCurrentValue;
const OSSymbol *fGetTargetValue;
const OSSymbol *fSetTargetValue;
UInt32 fCommand;
DeviceType fType;
public:
IOReturn callPlatformFunction(const OSSymbol *functionName,
bool waitForFunction,
void *param1, void *param2,
void *param3, void *param4);
bool start(IOService *provider);
};
#endif // _APPLESMUMONITOR_H