The branch, master has been updated
via d3af9b2c485fc05df1f89285d0bf2e4d88ddfd38 (commit)
from ca509570df19cef9bfecfeb4088563ddcb6f9f52 (commit)
- Log -----------------------------------------------------------------
commit d3af9b2c485fc05df1f89285d0bf2e4d88ddfd38
Author: Peter Schneider <pitpompej@xxxxxxxx>
Date: Tue Jan 10 11:09:11 2012 +0100
cpp-wrapper: when using get-string-and-reopen method without having set up
the usb-device the currently opened usb-device is retreived from the
usb-device-handle used in the ftdi context. this fixes the open methods of the
cpp wrapper that do not get an usb-device by parameter.
-----------------------------------------------------------------------
Summary of changes:
ftdipp/ftdi.cpp | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/ftdipp/ftdi.cpp b/ftdipp/ftdi.cpp
index 5e45dce..f1c1cef 100644
--- a/ftdipp/ftdi.cpp
+++ b/ftdipp/ftdi.cpp
@@ -316,6 +316,11 @@ int Context::get_strings()
int Context::get_strings_and_reopen()
{
+ if ( d->dev == 0 )
+ {
+ d->dev = libusb_get_device(d->ftdi->usb_dev);
+ }
+
// Get device strings (closes device)
int ret=get_strings();
if (ret < 0)
hooks/post-receive
--
A library to talk to FTDI chips
--
libftdi-git - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|