+
+ /* BE ***VERY CAREFUL*** ABOUT MAKING CHANGES IN THIS AREA!!!!!!!!!!!
+ * The behavior of libusb is not completely consistent across Windows, Linux, and Mac OS X platforms. The actions taken
+ * in the following compiler conditionals may not agree with published documentation for libusb, but were found
+ * to be necessary through trials and tribulations. Even little tweaks can break one or more platforms, so if you do make changes
+ * test them carefully on all platforms before committing them!
+ */
+
+#if IS_WIN32 == 0
+
+ usb_reset(result->usb_handle);
+
+#if IS_DARWIN == 0
+
+ int timeout = 5;
+
+ /* reopen jlink after usb_reset
+ * on win32 this may take a second or two to re-enumerate */
+ while ((dev = find_jlink_device()) == NULL)