X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=ftdipp%2Fftdi.hpp;h=2289a84cbda8107e48c50824a599dd90af9bb66f;hp=6a7f8939d14a0aaf7262754f9e598c46f689307c;hb=26537a2dec68c3be9d597ae903dc0ffde7d1a599;hpb=7964636842a44bcfad9416b90483770f7cb172fa diff --git a/ftdipp/ftdi.hpp b/ftdipp/ftdi.hpp index 6a7f893..2289a84 100644 --- a/ftdipp/ftdi.hpp +++ b/ftdipp/ftdi.hpp @@ -55,16 +55,16 @@ public: */ enum Direction { - Input, - Output + Input = 0x2, + Output = 0x1, }; /*! \brief Modem control flags. */ enum ModemCtl { - Dtr, - Rts + Dtr = 0x2, + Rts = 0x1, }; /* Constructor, Destructor */ @@ -100,7 +100,7 @@ public: /* I/O */ int read(unsigned char *buf, int size); - int write(unsigned char *buf, int size); + int write(const unsigned char *buf, int size); int set_read_chunk_size(unsigned int chunksize); int set_write_chunk_size(unsigned int chunksize); int read_chunk_size(); @@ -108,7 +108,7 @@ public: /* Async IO TODO: should wrap? - int writeAsync(unsigned char *buf, int size); + int writeAsync(const unsigned char *buf, int size); void asyncComplete(int wait_for_more); */ @@ -134,8 +134,8 @@ public: 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();