79
HANDLE m_hWDT=NULL;
TCHAR szClassName[60];
...
// assign the WDT driver name
wsprintf(szClassName, TEXT("WDT1:"));
// Open the WDT driver
m_hWDT = CreateFile(szClassName, GENERIC_READ | GENERIC_WRITE, 0,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if ( m_hWDT == INVALID_HANDLE_VALUE )
{
DebugMsg(CString("WDT driver fail"));
return;
}
...
DWORD dwTemp;
DWORD nPeriod=10000;
// Set the Watchdog Timer as 10 seconds (10000 mini-seconds)
DeviceIoControl(m_hWDT, IOCTL_SET_WDTPERIOD, &nPeriod, 4, NULL, 0, &dwTemp, NULL);
// Enable the Watchdog timer
DeviceIoControl(m_hWDT, IOCTL_ENABLE_WDT, NULL, NULL, NULL, 0, &dwTemp, NULL);
While (1)
{
// do your job here...
Sleep(8000);
DeviceIoControl(m_hWDT, IOCTL_ACCESS_WDT, NULL, NULL, NULL, 0, &dwTemp, NULL);
}
DeviceIoControl(m_hWDT, IOCTL_DISABLE_WDT, NULL, NULL, NULL, 0, NULL, NULL);
CloseHandle(m_hWDT);
Содержание SPC-57
Страница 1: ...SPC 57 5 7 STN LCD Smart Panel Computer with IntelR XscaleR CPU and Windows R CE NET Users Manual...
Страница 6: ...disclaims all responsibility for the accuracy of any statements contained herein...
Страница 15: ...1 7 Mounting...
Страница 16: ......
Страница 17: ...1 8 Dimension and cutout...
Страница 18: ...CHAPTER 2 Getting Start This chapter provides brief instructions for operating the SPC 57...
Страница 20: ...Vcc GND 4 Plug the male power connector into female power connector in SPC...
Страница 21: ......
Страница 28: ......
Страница 29: ......
Страница 30: ...Figure 3 1 The PCM 7230 for SPC 57 Block Diagram...
Страница 70: ...70 Step 2 Accept License Agreement and go next Figure 4 19 Step 3 Key in your information and go next...
Страница 72: ...72 Figure 4 22 Step 5 Tap Install button to install SDK Figure 4 23...
Страница 73: ...73 Install SDK Figure 4 24 Step6 Finish installing...
Страница 85: ...85...