ADLINK IMB-T10 User Manual

Page 64

Advertising
background image

52

WDT Sample Code

delete BIOSVersion;

BIOSVersion = NULL;

size = 0;

ShowError(bSuccess =

AsrLibGetPlatformName(NULL, &size)); TCHAR*

PlatformName = new TCHAR[size + 1];

ShowError(bSuccess =

AsrLibGetPlatformName(PlatformName, &size));

if (bSuccess)

_tprintf(_T("Platform [%s]\n"), PlatformName);

delete PlatformName;

PlatformName = NULL;

_tprintf(_T("Enable WDT timeout in 60

second...\n")); AsrLibWDSetConfig(60);

_tprintf(_T("Press any key to reset WDT\n"));

AsrLibWDTrigger();

_tprintf(_T("Press any key to disable WDT\n"));

system("PAUSE");

AsrLibWDDisable();

}

AsrLibDllUnInit();

return 0;

}

void DisplayError(int ErrorCode)

{

_tprintf(_T("(0x%04X) "), ErrorCode);

switch(ErrorCode)

{

case ERRLIB_SUCCESS :

_tprintf(_T("ERRLIB_SUCCESS\n"));

Advertising