public class SmcUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
smcCall(int index,
IOKit.SMCKeyData inputStructure,
IOKit.SMCKeyData outputStructure)
Call SMC
|
static int |
smcClose()
Close connection to SMC
|
static float |
smcGetFpe2(String key,
int retries)
Get a value from SMC which is in FPE2 datatype.
|
static int |
smcGetKeyInfo(IOKit.SMCKeyData inputStructure,
IOKit.SMCKeyData outputStructure)
Get cached keyInfo if it exists, or generate new keyInfo
|
static long |
smcGetLong(String key,
int retries)
Get a 64-bit integer value from SMC
|
static double |
smcGetSp78(String key,
int retries)
Get a value from SMC which is in SP78 datatype (used for Temperature)
First bit is sign, next 7 bits are integer portion, last 8 bits are
fractional portion
|
static int |
smcOpen()
Open a connection to SMC
|
static int |
smcReadKey(String key,
IOKit.SMCVal val,
int retries)
Read a key from SMC
|
public static int smcOpen()
public static int smcClose()
public static double smcGetSp78(String key, int retries)
key - The key to retrieveretries - Number of times to retry the keypublic static long smcGetLong(String key, int retries)
key - The key to retrieveretries - Number of times to retry the keypublic static float smcGetFpe2(String key, int retries)
key - The key to retrieveretries - Number of times to retry the keypublic static int smcGetKeyInfo(IOKit.SMCKeyData inputStructure, IOKit.SMCKeyData outputStructure)
inputStructure - Key data inputoutputStructure - Key data outputpublic static int smcReadKey(String key, IOKit.SMCVal val, int retries)
key - Key to readval - Structure to receive the resultretries - Number of attempts to trypublic static int smcCall(int index,
IOKit.SMCKeyData inputStructure,
IOKit.SMCKeyData outputStructure)
index - Kernel indexinputStructure - Key data inputoutputStructure - Key data outputCopyright © 2010–2018 oshi. All rights reserved.