B&B Electronics TPC-1261H Appendix C Watchdog Timer Program- ming on WinCE, DeviceIOControl

Page 68

Appendix C Watchdog Timer Program- ming on WinCE

There is a built-in watchdog timer in Windows CE 4.2 for TPC-1261H. You can access it through the WIN32 API. TPC-1261H 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 the watchdog timer. The introduction below includes DeviceIOControl, the definition of the parameter and an example.

C.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 );

TPC-1261H User Manual

58

Image 68
Contents TPC-1261H Copyright Acknowledgements This Manual Covers the Following ModelsProduct Warranty 1 year FCC Class a Technical Support and Assistance Safety Instructions Packing ListPage Contents Chapter Features in Windows XP Embedded Appendix D Accessory Kit Assembly Procedure Appendix G Fuse Specifications General Information Powerful Communication Capability IntroductionFanless Bright DisplaySpecifications SafetyLCD Specifications Touchscreen SpecificationsEnvironment Operating Temperature 0 ~ 50 C 32 ~ 122 F Backlight 2 Ccfl Backlight Life Time 50,000 hoursPanel Mounting PowerI/O Ports Arrangement Dimensions and Cutout Panel MountingDimensions Page System Setup Unpack the Package Install CompactFlash Memory Card Touchscreen Icon System Engine Mainboard Connectors & Jumper Settings Main Board Connectors Page Software Configuration VGA Driver Installation Device ManagerUpdate Driver Update Wizard-2 Update Wizard-4 Update Wizard-6 Advantech COM Driver Install 10 Pciicom Setup12 PCI Icom Installation 14 Update Driver 16 Update Driver 18 PCI-1602 Device Manager 19 PCI Serial port Device Manager 21 Update Driver 23 PCI-1602 Master Installation 25 PCI Serial Port Installation 27 PCI Serial Port Installation 29 PCI Serial Port Installation 31 Installation Complete Entertainment Encryption/Decryption Driver33 Install Wizard 35 Install Wizard Features Windows XP Embedded Features in Windows XP Embedded EWFHorm Advantech UtilitiesVersion Information Page Page Serial Port Settings Appendix a Serial Port Settings COM1/ COM2/ COM3 Connector DefinitionCOM4 Setting RS-232 RS-422 RS-485 Watchdog Timer Programming Appendix B Watchdog Timer Programming OverviewWatchdog Timer Programming Figure B.1 Watchdog timer programming procedureTable B.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 Watchdog Timer Programming on WinCE Lpvoid lpOutBuffer Appendix C Watchdog Timer Program- ming on WinCEDeviceIOControl Parameters How to Use the Control Code Ioctl WdtenableIoctlwdtgettimeout CTLCODEFILEDEVICEUNKNOWN,ID, METHODBUFFERED, Fileanyaccess ExamplesAppendixC Page Accessory Kit Assembly Procedure Appendix D Accessory Kit Assembly Procedure CompactFlash to IDE Transfer KitFigure D.3 CompactFlash Slot Figure D.6 Connect the CD-ROM via the IDE Cable HDD Kit Assembly Appendix E HDD Kit Assembly Ruggedized HDD KitFigure E.2 Required Parts Figure E.3 Opening the Top Figure E.5 Connectting the FPC with the HDD Figure E.7 Reverse side of the HDD holder Figure E.9 Mounting the cushions Figure E.11 Placing the HDD holder Internal HDD Kit Assembly Figure E.13 Fastening the HDD holderFigure E.15 Placing a screw into its rubber casing Figure E.17 Connecting the FPC cable Figure E.19 Laying in the HDD insulator Figure E.21 Re-fastening the cover Figure E.23 Fastening the PCI/104 bracket Touchscreen Installation Configuration Appendix F Touchscreen Installation & Configuration Driver InstallationFigure F.3 Install Wizard Uninstall the Driver Figure F.5 UninstallTouchscreen Calibration CalibrateFigure F.8 Standard Calibration Figure F.10 Advanced Calibration Figure F.11 Advanced Calibration Draw Figure F.13 DrawFigure F.14 Clear Screen OptionFigure F.15 Option Page Fuse Specifications Fuse Replacement Appendix G Fuse SpecificationsFuse Specifications