Sitelet https://github.com/geistec/usb4java-examples/commit/8644267c4e443eabc25e5c0b45a2ffae4e9f4ae6
Skip to content

Commit 8644267

Browse files
committed
Simplify demo even more
1 parent 3a2b696 commit 8644267

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

‎src/main/java/org/usb4java/examples/MissileLauncher.java‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,6 @@ public static void main(String[] args)
197197
// Detach kernel driver from interface 0 and 1. This can fail if
198198
// kernel is not attached to the device or operating system
199199
// doesn't support this operation. These cases are ignored here.
200-
result = LibUsb.detachKernelDriver(handle, 0);
201-
if (result != LibUsb.SUCCESS &&
202-
result != LibUsb.ERROR_NOT_SUPPORTED &&
203-
result != LibUsb.ERROR_NOT_FOUND)
204-
{
205-
throw new LibUsbException("Unable to detach kernel driver",
206-
result);
207-
}
208200
result = LibUsb.detachKernelDriver(handle, 1);
209201
if (result != LibUsb.SUCCESS &&
210202
result != LibUsb.ERROR_NOT_SUPPORTED &&
@@ -214,11 +206,6 @@ public static void main(String[] args)
214206
result);
215207
}
216208

217-
// Set configuration
218-
result = LibUsb.setConfiguration(handle, 1);
219-
if (result != LibUsb.SUCCESS)
220-
throw new LibUsbException("Unable to set configuration", result);
221-
222209
// Claim interface
223210
result = LibUsb.claimInterface(handle, 1);
224211
if (result != LibUsb.SUCCESS)

0 commit comments

Comments
 (0)