- HALT inserted if JVM could not be created
- ConnecteDevice in ReopenDevice git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@120 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
@@ -267,6 +267,7 @@ MODULE UsbBDI;
|
|||||||
IF bool = FALSE_ THEN
|
IF bool = FALSE_ THEN
|
||||||
Done := FALSE;
|
Done := FALSE;
|
||||||
Log.String("creating JVM failed"); Log.Ln;
|
Log.String("creating JVM failed"); Log.Ln;
|
||||||
|
HALT(77);
|
||||||
ELSE
|
ELSE
|
||||||
Done := TRUE;
|
Done := TRUE;
|
||||||
Log.String("JVM successfully created"); Log.Ln;
|
Log.String("JVM successfully created"); Log.Ln;
|
||||||
@@ -418,11 +419,11 @@ MODULE UsbBDI;
|
|||||||
(*
|
(*
|
||||||
CreateJVM("D:\work\USB\eclipse\mcdp\bin\");
|
CreateJVM("D:\work\USB\eclipse\mcdp\bin\");
|
||||||
*)
|
*)
|
||||||
IF ~Done THEN HALT(77) END;
|
IF ~Done THEN HALT(78) END;
|
||||||
jvmCreated := TRUE;
|
jvmCreated := TRUE;
|
||||||
END;
|
END;
|
||||||
BDI.USB_Device_open;
|
BDI.USB_Device_open;
|
||||||
IF ~Done THEN HALT(78) END;
|
IF ~Done THEN HALT(79) END;
|
||||||
deviceOpen := TRUE;
|
deviceOpen := TRUE;
|
||||||
END
|
END
|
||||||
END ConnectDevice;
|
END ConnectDevice;
|
||||||
@@ -435,6 +436,7 @@ MODULE UsbBDI;
|
|||||||
(* Close and reopen the device *)
|
(* Close and reopen the device *)
|
||||||
PROCEDURE ReopenDevice * ;
|
PROCEDURE ReopenDevice * ;
|
||||||
BEGIN
|
BEGIN
|
||||||
|
ConnectDevice;
|
||||||
USB_Device_close;
|
USB_Device_close;
|
||||||
USB_Device_open;
|
USB_Device_open;
|
||||||
IF Done THEN
|
IF Done THEN
|
||||||
|
|||||||
Reference in New Issue
Block a user