User manual
41 TPC-31/61 User Manual
Appendix A Watchdog Timer Programming
lpOverlapped
[in] Ignored; set to NULL.
Return Values
Nonzero indicates success. Zero indicates failure. To get extended error infor-
mation, call GetLastError.
A.2 How to Use the Control Code
There are 6 control codes for the operation codes in the WDT driver.
A.2.1 IOCTL _WDT_ENABLE:
Enables the Watchdog timer on your application. By default, if the Watchdog timer is
enabled, the WDT driver will automatically trigger itself after the specified period and
your application does not need to trig?ger the Watchdog timer in this situation.
lpInBuffer : unused.
nInBufferSize: unused.
lpOutBuffer: unused.
nOutBufferSize: unused.
A.2.2 IOCTL _WDT_DISABLE:
Disables the Watchdog time on your application.
lpInBuffer : unused.
nInBufferSize: unused.
lpOutBuffer: unused.
nOutBufferSize: unused.
A.2.3 IOCTL_WDT_STROBE:
Triggers the Watchdog. If your application uses IOCTL_WDT_ENABLE to enable the
Watchdog first and then sends IOCTL_WDT_REBOOT to the WDT driver, your appli-
cation must trigger the Watchdog once during the Watchdog timer period. If your
application has not triggered at the specified period, the device will reboot automati-
cally.
lpInBuffer: unused. nInBufferSize: unused.
lpOutBuffer: unused. nOutBufferSize: unused.
A.2.4 IOCTL_WDT_GETTIMEOUT:
Gets the Watchdog time setting.
lpInBuffer: unused.
nInBufferSize: unused.
lpOutBuffer: The DWORD pointer to your Watchdog time setting. The Watchdog time
setting is just a number. 0 means 2 seconds, 1 means 5 seconds, 2 means 10 sec-
onds, 3 means 15 seconds, 4 means 30 seconds, others means 40 seconds. The
default setting is 5 seconds.
nOutBufferSize: unused.










