X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=ftdipp%2Fftdi.cpp;h=0382fa4d161009f1190a328ddeb723f1d79146be;hp=e2755d8268652aa0fb07930774fee93d5365ab7c;hb=fec556672a91df346f79ab3727b556ace25dff0d;hpb=9330b1205d8889de6586606228bfb5774491315b diff --git a/ftdipp/ftdi.cpp b/ftdipp/ftdi.cpp index e2755d8..0382fa4 100644 --- a/ftdipp/ftdi.cpp +++ b/ftdipp/ftdi.cpp @@ -2,11 +2,11 @@ ftdi.cpp - C++ wraper for libftdi ------------------- begin : Mon Oct 13 2008 - copyright : (C) 2008 by Marek Vavruša + copyright : (C) 2008-2013 by Marek Vavruša / libftdi developers email : opensource@intra2net.com and marek@vavrusa.com ***************************************************************************/ /* -Copyright (C) 2008 by Marek Vavruša +Copyright (C) 2008-2013 by Marek Vavruša / libftdi developers The software in this package is distributed under the GNU General Public License version 2 (with a special exception described below). @@ -26,6 +26,7 @@ in accordance with section (3) of the GNU General Public License. This exception does not invalidate any other reasons why a work based on this file might be covered by the GNU General Public License. */ +#include #include "ftdi.hpp" #include "ftdi_i.h" #include "ftdi.h" @@ -619,13 +620,10 @@ List::iterator List::erase(iterator beg, iterator end) return d->list.erase(beg, end); } -List* List::find_all(int vendor, int product) +List* List::find_all(Context &context, int vendor, int product) { struct ftdi_device_list* dlist = 0; - struct ftdi_context ftdi; - ftdi_init(&ftdi); - ftdi_usb_find_all(&ftdi, &dlist, vendor, product); - ftdi_deinit(&ftdi); + ftdi_usb_find_all(context.context(), &dlist, vendor, product); return new List(dlist); }