Example – Kontron KTLX800-pITX User Manual
Page 26
KTD-S0023-A
Page 23
JIDA32 Interface
KTLX800/pITX Software Guide
8.8.2
Program Language DELPHI
The demo program activates the watchdog (timeout = 30 seconds). The keyword '
var
' passes the argument
by reference.
Example:
unit mainU;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;
type
HJIDA = LongInt;
type
TForm1 = class (TForm)
Button1:
TButton;
procedure Button1Click (Sender: TObject);
private
{ Private-Deklarationen }
public
hJida:
HJIDA;
{ Public-Deklarationen }
end;
function JidaDllInitialize : Boolean {$IFDEF WIN32} stdcall {$ENDIF}; external 'JIDA.DLL';
function JidaDllUninitialize : Boolean {$IFDEF WIN32} stdcall {$ENDIF}; external 'JIDA.DLL';
function JidaDllIsAvailable : Boolean {$IFDEF WIN32} stdcall {$ENDIF}; external 'JIDA.DLL';
function JidaBoardOpen (pszClass:PChar; dwNum:LongInt; dwFlags:LongInt;
var
phJida:HJIDA) : Boolean
{$IFDEF WIN32} stdcall {$ENDIF}; external 'JIDA.DLL';
function JidaWDogSetConfig (hJida:HJIDA; dwType:LongInt; dwTimeout:LongInt; dwDelay:LongInt;
dwMode:LongInt) : Boolean {$IFDEF WIN32} stdcall {$ENDIF}; external 'JIDA.DLL';
var
Form1:
TForm1;
const
JIDA_BOARD_CLASS_CPU = 'CPU'#0;
JIDA_FLAGS_DEFAULT = 0;
JIDA_TIMEOUT_VALUE = 30000;
JIDA_DELAY_VALUE = 0;
// Delay not supported
JIDA_REBOOT_MODE = 0;
// NMI not supported
implementation
{$R *.dfm}