Appendix a - watchdog timer, A.1 sample code, Appendix a, watchdog timer – ADLINK NuPRO-A40H User Manual
Page 85: Prese, A appendix: watchdog timer, Sample code
Watchdog Timer
71
NuPRO-A40H
Appendix A - Watchdog Timer
To use the Watchdog Timer on the NuPRO-A40H, first download
the WDT driver from the product page on the ADLINK website:
Install the driver by extracting the appropriate version for your
Windows operating system (32 or 64-bit), and copying it to the fol-
lowing location: C:\Windows\System32\drivers.
A sample program for configuring the NuPRO-A40H’s watchdog
timer is shown below.
A.1 Sample Code
#include <stdlib.h>
#include <float.h>
#include "Sema.h"
#include "SemaLog.h"
#include "ErrorCodes.h"
#include "Debug.h"
#include "Conv.h"
#include "dmi_info.h"
#include "Version.h"
#ifdef WIN32
#include <windows.h>
#else
#include <string.h>
#include <unistd.h>
#include <ctype.h>
#endif
typedef struct
{
bool SetWatchdog;// Set/Reset/Disable watchdog?
word Watchdog;// Num of seconds for wdt to trigger
}tCmdLineArgs;
tCmdLineArgs CmdLineArgs;
char*
ExeName;