©
National Instruments Corporation
D-1
D
Watchdog Timer Programming
on WinCE (TPC-2012)
Windows CE includes a watchdog timer for the TPC-2012/TPC-2512. You
can access the timer through the WIN32 API. The TPC-2012/TPC-2512
includes a WDT driver, WDT1:, for enabling/disabling the watchdog timer.
You must open this driver before using the resources, and then use the
DeviceIOControl function to enable/disable the watchdog timer.
This appendix describes DeviceIOControl and it parameters. It also
includes a programming example.
DeviceIOControl
DeviceIOControl sends a control code directly to a specified device driver,
causing the corresponding device to perform the specified operation. The
function and its parameters are:
BOOL DeviceIoControl( HANDLE hDevice, DWORD
dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize,
LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD
lpBytesReturned, LPOVERLAPPED lpOverlapped );
Parameters
DeviceIOControl includes the following parameters:
•
hDevice
(in) Handle to the device that performs the operation. Call the
CreateFile function to obtain a device handle.