Intel TPC-1070 user manual Appendix B Watchdog Timer on WinCE, DeviceIOControl

Page 56

Appendix B Watchdog Timer on WinCE

There is a built-in Watchdog timer on Windows CE 5.0 for TPC-1070. You can access it through WIN32 API. TPC-1070 provides a WDT driver to allow users to enable/disable the Watchdog timer. The driver name is “WDT1:”. Programmers must open this driver before using the resources. Then programmers can use DeviceIOControl functions to enable/disable Watchdog timer. The introduction below includes the DeviceIOControl, the definition of the parameter and an example.

B.1 DeviceIOControl

This function sends a control code directly to a specified device driver, causing the corresponding device to perform the specified operation.

BOOL DeviceIoControl(

HANDLE hDevice,

DWORD dwIoControlCode,

LPVOID lpInBuffer,

DWORD nInBufferSize,

LPVOID lpOutBuffer,

DWORD nOutBufferSize,

LPDWORD lpBytesReturned,

LPOVERLAPPED lpOverlapped );

Parameters:

hDevice

[in] Handle to the device that is to perform the operation. Call the Create- File function to obtain a device handle.

dwIoControlCode

[in] Specifies the control code for the operation. This value identifies the specific operation to be performed and the type of device on which the operation is to be performed. No specific values are defined for the dwIo- ControlCode parameter. However, the writer of a custom device driver can define IOCTL_XXXX control codes, per the CTL_CODE macro. These

TPC-1070 User Manual

44

Image 56
Contents TPC-1070 Copyright Acknowledgements Product Warranty 2 years Declaration of Conformity FCC Class a Technical Support and AssistanceSafety Instructions Wichtige Sicherheishinweise Vii Viii Contents Appendix Serial Port Settings Appendix G Xii General Information Specifications IntroductionSafety RJ-45 Ethernet portCompact Flash Slot TypeII PCI-104 EnvironmentLCD Specifications Touchscreen Specifications PowerI/O Port Arrangement I/O port arrangementPanel Mounting Panel MountingDimensions & Cutout DimensionsSystem Setup Install CompactFlash memory card Power receptor and button pin assignments Touchscreen Calibration System Engine Main Board Connector and Jumper Setting List Main Board ConnectorSoftware Configuration Path \TPC-1070H\Driver\LAN\ Available for the OS’s below Utilities & DriversPath \TPC-1070H\Driver\VGA\ Available for the OS’s below Advantech COM Driver Advantech COM Driver Installation Click Next to continue installation Click uninstall icon to remove ?PCI Serial Port Page Found New Hardware and Click Next to continue installation Click Finish the Advantech PCI Serial Port to continue Page Found New Hardware and Click Next to continue installation Watchdog Timer WDT Driver Installation Installing the TPC-1070 Watchdog Timer Driver Click Next to proceed Page Page Page How to Use the TPC-1070 Watchdog Timer Page Page Windows XP Embedded EWF HormAdvantech Utilities Version InformationOSLock and OSUnLock Serial Port Settings COM4 Setting Appendix a Serial Port SettingsCOM1/ COM3 Connector Definition RS422-MASTER Page Watchdog Timer on WinCE Appendix B Watchdog Timer on WinCE DeviceIOControlAppendixB How to Use the Control Code Ioctl WdtenableIoctlwdtgettimeout CTLCODEFILEDEVICEUNKNOWN,ID, METHODBUFFERED, Fileanyaccess ExamplesAppendixB Page Watchdog Timer Programming Appendix C Watchdog Timer Programming OverviewWatchdog Timer Programming Figure C.1 Watchdog timer programming procedureTable C.1 Watchdog Timer Registers Enable watchdog timer and set 10 sec. as timeout interval Example ProgramsEnable watchdog timer and set 5 minutes as timeout interval Enable watchdog timer to be reset by mouse Enable watchdog timer to be reset by keyboard Generate a time-out signal without timer counting Page Accessory Kit Assembly Appendix D Accessory Kit Assembly CompactFlash to IDE Transfer KitFigure D.3 CompactFlash Slot USB Driver Installation Notice Figure D.6 Connect the CD-ROM via the IDE CableHDD Kit Assembly Appendix E HDD Kit Assembly Figure E.1 Removing the Rear HDD CoverTouchscreen Installation Configuration Appendix F Touchscreen Installation & Configuration Driver InstallationFigure F.3 Install License Agreement Uninstall the Driver Figure F.5 UninstallTouchscreen Calibration CalibrateFigure F.8 Standard Calibration Figure F.10 Standard Calibration Figure F.11 Advanced Calibration Figure F.13 Plot Calibration Data DrawFigure F.14 Draw Option Figure F.16 OptionPage Fuse Specifications Fuse Replacement Appendix G Fuse SpecificationsFuse Specifications