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);
103 int read(
unsigned char *buf,
int size);
104 int write(
const unsigned char *buf,
int size);
129 int set_bitmode(
unsigned char bitmask,
unsigned char mode);
148 boost::shared_ptr<Private> d;
159 int init_defaults(
char *manufacturer,
char* product,
char * serial);
160 int chip_id(
unsigned int *chipid);
161 int build(
unsigned char *output);
163 int read(
unsigned char *eeprom);
164 int write(
unsigned char *eeprom);
165 int read_location(
int eeprom_addr,
unsigned short *eeprom_val);
171 boost::shared_ptr<Private> d;
205 ListType::size_type
size()
const;
217 boost::shared_ptr<Private> d;
FTDI device context. Represents single FTDI device context.
const char * error_string()
int set_flow_control(int flowctrl)
int set_baud_rate(int baudrate)
const std::string & description()
Device strings properties.
int read(unsigned char *buf, int size)
int DEPRECATED() flush(int mask=Input|Output)
const std::string & serial()
Device strings properties.
void set_usb_device(struct libusb_device_handle *dev)
void set_usb_write_timeout(int usb_write_timeout)
int get_usb_read_timeout() const
int set_write_chunk_size(unsigned int chunksize)
int set_error_char(unsigned char errorch, unsigned char enable)
Direction
Direction flags for flush().
int set_latency(unsigned char latency)
int set_read_chunk_size(unsigned int chunksize)
int tcflush(int mask=Input|Output)
int open(struct libusb_device *dev=0)
int set_event_char(unsigned char eventch, unsigned char enable)
unsigned short poll_modem_status()
int set_interface(enum ftdi_interface interface)
int get_strings(bool vendor=true, bool description=true, bool serial=true)
int read_pins(unsigned char *pins)
void set_context(struct ftdi_context *context)
const std::string & vendor()
Device strings properties.
void set_usb_read_timeout(int usb_read_timeout)
int write(const unsigned char *buf, int size)
ModemCtl
Modem control flags.
int set_line_property(enum ftdi_bits_type bits, enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity)
int set_modem_control(int mask=Dtr|Rts)
int set_bitmode(unsigned char bitmask, unsigned char mode)
struct ftdi_context * context()
int get_strings_and_reopen(bool vendor=true, bool description=true, bool serial=true)
int get_usb_write_timeout() const
int read(unsigned char *eeprom)
int init_defaults(char *manufacturer, char *product, char *serial)
int write_location(int eeprom_addr, unsigned short eeprom_val)
int read_location(int eeprom_addr, unsigned short *eeprom_val)
int build(unsigned char *output)
int write(unsigned char *eeprom)
int chip_id(unsigned int *chipid)
std::list< Context > ListType
List type storing "Context" objects.
void push_back(const Context &element)
ListType::const_reverse_iterator const_reverse_iterator
Const reverse iterator type for the container.
ListType::iterator iterator
Iterator type for the container.
ListType::reverse_iterator reverse_iterator
Reverse iterator type for the container.
iterator erase(iterator pos)
reverse_iterator rbegin()
ListType::const_iterator const_iterator
Const iterator type for the container.
List(struct ftdi_device_list *devlist=0)
static List * find_all(Context &context, int vendor, int product)
void push_front(const Context &element)
ListType::size_type size() const
Main context structure for all libftdi functions.
list of usb devices created by ftdi_usb_find_all()