*/
enum Direction
{
- Input,
- Output
+ Input = 0x2,
+ Output = 0x1,
};
/*! \brief Modem control flags.
*/
enum ModemCtl
{
- Dtr,
- Rts
+ Dtr = 0x2,
+ Rts = 0x1,
};
/* Constructor, Destructor */
/* 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();
/* 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);
*/
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();