X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=ftdipp%2Fftdi.hpp;h=dc035cc92bce45c62ab41602b11f42853299a545;hp=ec0e13dbb66de62a76d14e769ba474531d36e105;hb=06358114cd5be4e72058048fa9b82f8fc060ca26;hpb=2d790e377ad5f1c61b38436aa3d5a201c9184028 diff --git a/ftdipp/ftdi.hpp b/ftdipp/ftdi.hpp index ec0e13d..dc035cc 100644 --- a/ftdipp/ftdi.hpp +++ b/ftdipp/ftdi.hpp @@ -2,11 +2,11 @@ ftdi.hpp - C++ wrapper for libftdi ------------------- begin : Mon Oct 13 2008 - copyright : (C) 2008 by Marek Vavruša + copyright : (C) 2008-2017 by Marek Vavruša and libftdi developers email : opensource@intra2net.com and marek@vavrusa.com ***************************************************************************/ /* -Copyright (C) 2008 by Marek Vavruša +Copyright (C) 2008-2017 by Marek Vavruša and libftdi developers The software in this package is distributed under the GNU General Public License version 2 (with a special exception described below). @@ -93,6 +93,10 @@ public: int set_baud_rate(int baudrate); int set_line_property(enum ftdi_bits_type bits, enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity); int set_line_property(enum ftdi_bits_type bits, enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity, enum ftdi_break_type break_type); + int get_usb_read_timeout() const; + void set_usb_read_timeout(int usb_read_timeout); + int get_usb_write_timeout() const; + void set_usb_write_timeout(int usb_write_timeout); /* I/O */ int read(unsigned char *buf, int size); @@ -127,11 +131,11 @@ public: int read_pins(unsigned char *pins); /* Misc */ - char* error_string(); + const char* error_string(); protected: - int get_strings(); - int get_strings_and_reopen(); + int get_strings(bool vendor=true, bool description=true, bool serial=true); + int get_strings_and_reopen(bool vendor=true, bool description=true, bool serial=true); /* Properties */ struct ftdi_context* context(); @@ -174,7 +178,7 @@ public: List(struct ftdi_device_list* devlist = 0); ~List(); - static List* find_all(int vendor, int product); + static List* find_all(Context &context, int vendor, int product); /// List type storing "Context" objects typedef std::list ListType;