*
* RETURNS: E_OK if it is OK, or error code
*
*/
unsigned short int wSetWatchdog
(
unsigned char bDontLog,
/* FALSE to log event */
unsigned short int wTimeoutInterval,
/* multiples of 100ms */
unsigned char bTimeoutAction,
unsigned char bPreTimeoutInterval,
/* multiples of 1s */
unsigned char bPreTimeoutInterrupt,
unsigned char bTimerUse,
unsigned char bTimerUseClearFlags
)
{
unsigned char abRequest [10];
unsigned char abResponse [10];
unsigned char bLength;
unsigned short int wStatus = E_OK;
abRequest [0] = NFC_APP_REQUEST << 2;
abRequest [1] = CMD_WATCHDOG_SET;
/* command */
abRequest [2] = ((bDontLog) ? 0x80 : 0) | bTimerUse & 0x07;
abRequest [3] = ((bPreTimeoutInterrupt & 0x07) << 4)
| (bTimeoutAction & 0x07);
abRequest [4] = bPreTimeoutInterval;
abRequest [5] = bTimerUseClearFlags;
abRequest [6] = (unsigned char ) (wTimeoutInterval & 0x00FF);
abRequest [7] = (unsigned char ) (wTimeoutInterval >> 8);
vBmcSmicSmsMessageWrite (abRequest, 8);
vBmcSmicSmsMessageRead (abResponse, &bLength);
if (abResponse [2] != COMPLETION_OK)
wStatus = E_COMPLETION;
}
/******************************************************************************
*
* wResetWatchdog
*
* This function starts / restarts the IPMI watchdog.
*
* RETURNS: E_OK if it is OK, or error code
*
*/
unsigned short int wResetWatchdog (void)
{
unsigned char abRequest [10];
unsigned char abResponse [10];
unsigned char bLength;
unsigned short int wStatus = E_OK;
abRequest [0] = NFC_APP_REQUEST << 2;
abRequest [1] = CMD_WATCHDOG_RESET; /* command */
vBmcSmicSmsMessageWrite (abRequest, 2);
vBmcSmicSmsMessageRead (abResponse, &bLength);
if (abResponse [2] != COMPLETION_OK)
wStatus = E_COMPLETION;
return wStatus;
}
PP 110/01x
7-17
Intelligent Platform Manager Interface
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com