29 #ifndef __libftdi_hpp__
30 #define __libftdi_hpp__
34 #include <boost/shared_ptr.hpp>
76 const std::string&
vendor();
78 const std::string&
serial();
82 int open(
struct libusb_device *dev = 0);
85 int open(
const std::string& description);
102 int read(
unsigned char *buf,
int size);
103 int write(
unsigned char *buf,
int size);
128 int set_bitmode(
unsigned char bitmask,
unsigned char mode);
147 boost::shared_ptr<Private> d;
158 int init_defaults(
char *manufacturer,
char* product,
char * serial);
159 int chip_id(
unsigned int *chipid);
160 int build(
unsigned char *output);
162 int read(
unsigned char *eeprom);
163 int write(
unsigned char *eeprom);
164 int read_location(
int eeprom_addr,
unsigned short *eeprom_val);
170 boost::shared_ptr<Private> d;
196 const_iterator
begin()
const;
197 const_iterator
end()
const;
199 reverse_iterator
rbegin();
200 reverse_iterator
rend();
201 const_reverse_iterator
rbegin()
const;
202 const_reverse_iterator
rend()
const;
204 ListType::size_type
size()
const;
211 iterator
erase(iterator pos);
212 iterator
erase(iterator beg, iterator
end);
216 boost::shared_ptr<Private> d;
int set_modem_control(int mask=Dtr|Rts)
list of usb devices created by ftdi_usb_find_all()
int write(unsigned char *buf, int size)
FTDI device context. Represents single FTDI device context.
const std::string & description()
Device strings properties.
reverse_iterator rbegin()
void push_front(const Context &element)
int read(unsigned char *buf, int size)
Direction
Direction flags for flush().
ListType::iterator iterator
Iterator type for the container.
const std::string & vendor()
Device strings properties.
Main context structure for all libftdi functions.
int read_location(int eeprom_addr, unsigned short *eeprom_val)
std::list< Context > ListType
List type storing "Context" objects.
int get_usb_write_timeout() const
int flush(int mask=Input|Output)
int open(struct libusb_device *dev=0)
int set_latency(unsigned char latency)
const std::string & serial()
Device strings properties.
ModemCtl
Modem control flags.
int set_interface(enum ftdi_interface interface)
int set_read_chunk_size(unsigned int chunksize)
int get_usb_read_timeout() const
unsigned short poll_modem_status()
void set_usb_write_timeout(int usb_write_timeout)
int set_write_chunk_size(unsigned int chunksize)
ListType::reverse_iterator reverse_iterator
Reverse iterator type for the container.
void set_usb_read_timeout(int usb_read_timeout)
void push_back(const Context &element)
void set_usb_device(struct libusb_device_handle *dev)
List(struct ftdi_device_list *devlist=0)
int set_flow_control(int flowctrl)
iterator erase(iterator pos)
int build(unsigned char *output)
int chip_id(unsigned int *chipid)
int set_bitmode(unsigned char bitmask, unsigned char mode)
int set_error_char(unsigned char errorch, unsigned char enable)
int init_defaults(char *manufacturer, char *product, char *serial)
int set_line_property(enum ftdi_bits_type bits, enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity)
int get_strings_and_reopen()
ListType::const_iterator const_iterator
Const iterator type for the container.
struct ftdi_context * context()
int read(unsigned char *eeprom)
int set_baud_rate(int baudrate)
ListType::size_type size() const
int write(unsigned char *eeprom)
ListType::const_reverse_iterator const_reverse_iterator
Const reverse iterator type for the container.
static List * find_all(Context &context, int vendor, int product)
int set_event_char(unsigned char eventch, unsigned char enable)
int read_pins(unsigned char *pins)
void set_context(struct ftdi_context *context)
int write_location(int eeprom_addr, unsigned short eeprom_val)