Specifications

INTELLIGENT PLATFORM MANAGEMENT INTERFACE
7-20 PP 41x/03x
unsigned char abRequest [10];
unsigned char abResponse [10];
unsigned short int wStatus = E_OK;
/* Send Request */
abRequest [0] = NFC_SENSOR_EVENT_RQ << 2;
abRequest [1] = CMD_GET_SENS_RD; /* command */
abRequest [2] = bSensorId;
vBmcSmicSmsMessageWrite (abRequest, 3);
vBmcSmicSmsMessageRead (abResponse, &bLength);
if (abResponse [2] != COMPLETION_OK)
wStatus = E_COMPLETION;
else
{
psSensorReading->bData = abResponse [3];
psSensorReading->bStatus = abResponse [4];
}
return wStatus;
}
The following example shows how to read the CPU temperature and some voltage sensors:
/* read CPU temperature, sensor ID = 01h */
wStatus = wGetSensorReadingCmd (0x01, &sSensorReading);
if (wStatus == E_OK)
printf(“CPU temperature is %dC\n”, sSensorReading.bData);
/* read +12V Power Supply Voltage, sensor ID = 10h */
wStatus = wGetSensorReadingCmd (0x10, &sSensorReading);
if (wStatus == E_OK)
printf (“Power Supply +12V = %fV\n”, sSensorReading.bData * 0.0740);
/* read +5V Power Supply Voltage, sensor ID = 11h */
wStatus = wGetSensorReadingCmd (0x11, &sSensorReading);
if (wStatus == E_OK)
printf (“Power Supply +5V = %fV\n”, sSensorReading.bData * 0.0237);
/* read +3.3V Power Supply Voltage, sensor ID = 12h */
wStatus = wGetSensorReadingCmd (0x12, &sSensorReading);
if (wStatus == E_OK)
printf (“Power Supply +3.3V = %fV\n”,
sSensorReading.bData * 0.0190);
/* read CPU Power Supply Voltage, sensor ID = 15h */
wStatus = wGetSensorReadingCmd (0x15, &sSensorReading);
if (wStatus == E_OK)
printf (“Power Supply CPU = %fV\n”, sSensorReading.bData * 0.0096);