]> git.sur5r.net Git - openocd/commitdiff
Fix jlink for Debian/Ubuntu (by Ben Dooks <ben-openocd@fluff.org>).
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 29 Apr 2009 02:18:50 +0000 (02:18 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 29 Apr 2009 02:18:50 +0000 (02:18 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1561 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/jlink.c

index 028a36cf3b0bba46a792e7922a107dd2bb79e859..6665c7e32005924abe59108739add4294d73a9e1 100644 (file)
@@ -886,12 +886,21 @@ static int usb_bulk_with_retries(
        }
        return rc;
 }
+
+static int wrap_usb_bulk_write(usb_dev_handle *dev, int ep,
+                              char *buff, int size, int timeout)
+{
+       /* usb_bulk_write() takes const char *buff */
+       return usb_bulk_write(dev, ep, buff, size, timeout);
+}
+
 static inline int usb_bulk_write_ex(usb_dev_handle *dev, int ep,
                char *bytes, int size, int timeout)
 {
-       return usb_bulk_with_retries(&usb_bulk_write,
+       return usb_bulk_with_retries(&wrap_usb_bulk_write,
                        dev, ep, bytes, size, timeout);
 }
+
 static inline int usb_bulk_read_ex(usb_dev_handle *dev, int ep,
                char *bytes, int size, int timeout)
 {