Skip to content

Commit 1bb3cd0

Browse files
committed
Added libusb get_path bindings
1 parent b458870 commit 1bb3cd0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ package main
77
88
#include <dfu.h>
99
#include <dfu_util.h>
10+
// This is missing from dfu_util.h
11+
char *get_path(libusb_device *dev);
1012
1113
// Defined in main.c
1214
const char *libusbOpen();
@@ -56,3 +58,7 @@ func (d *DFUDiscovery) StartSync(eventCB discovery.EventCallback, errorCB discov
5658
}
5759
return nil
5860
}
61+
62+
func getPath(dev *C.struct_libusb_device) string {
63+
return C.GoString(C.get_path(dev))
64+
}

0 commit comments

Comments
 (0)