X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=ftdipp%2Fftdi.cpp;h=d9b6fbf229b097e64dd5f60cc85fcfcd8876aefe;hp=167325a413452fc2d91ab4bff3049b0bc85d101f;hb=dcd7e8a307f75474afb23bd5da7048db91faeaa1;hpb=b25d91651338fdf323bcfae5f66d47fec69819f7 diff --git a/ftdipp/ftdi.cpp b/ftdipp/ftdi.cpp index 167325a..d9b6fbf 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-2013 by Marek Vavruša / libftdi developers + copyright : (C) 2008-2014 by Marek Vavruša / libftdi developers email : opensource@intra2net.com and marek@vavrusa.com ***************************************************************************/ /* -Copyright (C) 2008-2013 by Marek Vavruša / libftdi developers +Copyright (C) 2008-2014 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" @@ -179,6 +180,26 @@ int Context::set_line_property(enum ftdi_bits_type bits, enum ftdi_stopbits_type return ftdi_set_line_property2(d->ftdi, bits, sbit, parity, break_type); } +int Context::get_usb_read_timeout() const +{ + return d->ftdi->usb_read_timeout; +} + +void Context::set_usb_read_timeout(int usb_read_timeout) +{ + d->ftdi->usb_read_timeout = usb_read_timeout; +} + +int Context::get_usb_write_timeout() const +{ + return d->ftdi->usb_write_timeout; +} + +void Context::set_usb_write_timeout(int usb_write_timeout) +{ + d->ftdi->usb_write_timeout = usb_write_timeout; +} + int Context::read(unsigned char *buf, int size) { return ftdi_read_data(d->ftdi, buf, size);