Intel TPC-1070 user manual Examples, CTLCODEFILEDEVICEUNKNOWN,ID, METHODBUFFERED, Fileanyaccess

Page 60

B.3 Examples

#define WDT_CODE(ID)

CTL_CODE(FILE_DEVICE_UNKNOWN,ID, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define IOCTL_WDT_ENABLE WDT_CODE (0x900) #define IOCTL_WDT_DISABLE WDT_CODE(0x901) #define IOCTL_WDT_STROBE WDT_CODE(0x902)

#define IOCTL_WDT_GET_TIMEOUT WDT_CODE(0x903) #define IOCTL_WDT_SET_TIMEOUT WDT_CODE(0x904) #define IOCTL_WDT_REBOOT WDT_CODE(0x905)

//for compatibility reasons, you can define IOCTL as below:

//#define IOCTL_WDT_ENABLE 0x1001

//#define IOCTL_WDT_DISABLE 0x1002

//#define IOCTL_WDT_STROBE 0x1003

//#define IOCTL_WDT_GETTIMEOUT 0x1004

//#define IOCTL_WDT_SETTIMEOUT 0x1005

//#define IOCTL_WDT_REBOOT 0x1006

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 nIndex=2;

TPC-1070 User Manual

48

Image 60
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 Utilities & Drivers Path \TPC-1070H\Driver\VGA\ Available for the OS’s belowPath \TPC-1070H\Driver\LAN\ 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 Appendix a Serial Port Settings COM1/ COM3 Connector DefinitionCOM4 Setting 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 Appendix G Fuse Specifications Fuse SpecificationsFuse Replacement