Ftdi_Context

Langue: en

Autres versions - même langue

Version: 376652 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

Sommaire

NAME

Ftdi::Context -

FTDI device context. Represents single FTDI device context.

SYNOPSIS


#include <ftdi.hpp>

Classes


class Private

Public Types


enum Direction { Input, Output }
Direction flags for flush().
enum ModemCtl { Dtr, Rts }
Modem control flags.

Public Member Functions


Context ()
Constructor.
~Context ()
Destructor.
Eeprom * eeprom ()

const std::string & vendor ()
Device strings properties.
const std::string & description ()
Device strings properties.
const std::string & serial ()
Device strings properties.
bool is_open ()

int open (struct usb_device *dev=0)

int open (int vendor, int product)

int open (int vendor, int product, const std::string &description, const std::string &serial=std::string(), unsigned int index=0)

int open (const std::string &description)

int close ()

int reset ()

int flush (int mask=Input|Output)

int set_interface (enum ftdi_interface interface)

void set_usb_device (struct usb_dev_handle *dev)

int set_baud_rate (int baudrate)

int set_line_property (enum ftdi_bits_type bits, enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity)

int set_line_property (enum ftdi_bits_type bits, enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity, enum ftdi_break_type break_type)

int read (unsigned char *buf, int size)

int write (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 ()

int write_chunk_size ()

int set_event_char (unsigned char eventch, unsigned char enable)

int set_error_char (unsigned char errorch, unsigned char enable)

int set_flow_control (int flowctrl)

int set_modem_control (int mask=Dtr|Rts)

int set_latency (unsigned char latency)

int set_dtr (bool state)

int set_rts (bool state)

unsigned short poll_modem_status ()

unsigned latency ()

int set_bitmode (unsigned char bitmask, unsigned char mode)

int set_bitmode (unsigned char bitmask, enum ftdi_mpsse_mode mode)

int DEPRECATED (bitbang_enable(unsigned char bitmask))

int bitbang_disable ()

int read_pins (unsigned char *pins)

char * error_string ()

Protected Member Functions


int get_strings ()

int get_strings_and_reopen ()

struct ftdi_context * context ()

void set_context (struct ftdi_context *context)

void set_usb_device (struct usb_device *dev)

Friends


class Eeprom

class List

Detailed Description

FTDI device context. Represents single FTDI device context.

Definition at line 47 of file ftdi.hpp.

Member Enumeration Documentation

enum Ftdi::Context::Direction

Direction flags for flush().

Enumerator:

Input
Output

Definition at line 56 of file ftdi.hpp.

enum Ftdi::Context::ModemCtl

Modem control flags.

Enumerator:

Dtr
Rts

Definition at line 64 of file ftdi.hpp.

Constructor & Destructor Documentation

Ftdi::Context::Context ()

Constructor.

Definition at line 61 of file ftdi.cpp.

Ftdi::Context::~Context ()

Destructor.

Definition at line 68 of file ftdi.cpp.

Member Function Documentation

Eeprom* Ftdi::Context::eeprom ()

const std::string & Ftdi::Context::vendor ()

Device strings properties.

Definition at line 337 of file ftdi.cpp.

const std::string & Ftdi::Context::description ()

Device strings properties.

Definition at line 344 of file ftdi.cpp.

const std::string & Ftdi::Context::serial ()

Device strings properties.

Definition at line 351 of file ftdi.cpp.

bool Ftdi::Context::is_open ()

Definition at line 72 of file ftdi.cpp.

int Ftdi::Context::open (struct usb_device * dev = 0)

Definition at line 117 of file ftdi.cpp.

int Ftdi::Context::open (int vendor, int product)

Definition at line 77 of file ftdi.cpp.

int Ftdi::Context::open (int vendor, int product, const std::string & description, const std::string & serial = std::string(), unsigned int index = 0)

Definition at line 88 of file ftdi.cpp.

int Ftdi::Context::open (const std::string & description)

Definition at line 107 of file ftdi.cpp.

int Ftdi::Context::close ()

Definition at line 128 of file ftdi.cpp.

int Ftdi::Context::reset ()

Definition at line 134 of file ftdi.cpp.

int Ftdi::Context::flush (int mask = Input|Output)

Definition at line 139 of file ftdi.cpp.

int Ftdi::Context::set_interface (enum ftdi_interface interface)

Definition at line 151 of file ftdi.cpp.

void Ftdi::Context::set_usb_device (struct usb_dev_handle * dev)

Definition at line 156 of file ftdi.cpp.

int Ftdi::Context::set_baud_rate (int baudrate)

Definition at line 162 of file ftdi.cpp.

int Ftdi::Context::set_line_property (enum ftdi_bits_type bits, enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity)

Definition at line 167 of file ftdi.cpp.

int Ftdi::Context::set_line_property (enum ftdi_bits_type bits, enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity, enum ftdi_break_type break_type)

Definition at line 172 of file ftdi.cpp.

int Ftdi::Context::read (unsigned char * buf, int size)

Definition at line 177 of file ftdi.cpp.

int Ftdi::Context::write (unsigned char * buf, int size)

Definition at line 196 of file ftdi.cpp.

int Ftdi::Context::set_read_chunk_size (unsigned int chunksize)

Definition at line 182 of file ftdi.cpp.

int Ftdi::Context::set_write_chunk_size (unsigned int chunksize)

Definition at line 201 of file ftdi.cpp.

int Ftdi::Context::read_chunk_size ()

Definition at line 187 of file ftdi.cpp.

int Ftdi::Context::write_chunk_size ()

Definition at line 206 of file ftdi.cpp.

int Ftdi::Context::set_event_char (unsigned char eventch, unsigned char enable)

Definition at line 261 of file ftdi.cpp.

int Ftdi::Context::set_error_char (unsigned char errorch, unsigned char enable)

Definition at line 266 of file ftdi.cpp.

int Ftdi::Context::set_flow_control (int flowctrl)

Definition at line 215 of file ftdi.cpp.

int Ftdi::Context::set_modem_control (int mask = Dtr|Rts)

Definition at line 220 of file ftdi.cpp.

int Ftdi::Context::set_latency (unsigned char latency)

Definition at line 242 of file ftdi.cpp.

int Ftdi::Context::set_dtr (bool state)

Definition at line 232 of file ftdi.cpp.

int Ftdi::Context::set_rts (bool state)

Definition at line 237 of file ftdi.cpp.

unsigned short Ftdi::Context::poll_modem_status ()

Definition at line 254 of file ftdi.cpp.

unsigned Ftdi::Context::latency ()

Definition at line 247 of file ftdi.cpp.

int Ftdi::Context::set_bitmode (unsigned char bitmask, unsigned char mode)

Definition at line 281 of file ftdi.cpp.

int Ftdi::Context::set_bitmode (unsigned char bitmask, enum ftdi_mpsse_mode mode)

Definition at line 286 of file ftdi.cpp.

int Ftdi::Context::DEPRECATED (bitbang_enable(unsigned char bitmask))

int Ftdi::Context::bitbang_disable ()

Definition at line 276 of file ftdi.cpp.

int Ftdi::Context::read_pins (unsigned char * pins)

Definition at line 291 of file ftdi.cpp.

char * Ftdi::Context::error_string ()

Definition at line 296 of file ftdi.cpp.

int Ftdi::Context::get_strings () [protected]

Definition at line 301 of file ftdi.cpp.

int Ftdi::Context::get_strings_and_reopen () [protected]

Definition at line 318 of file ftdi.cpp.

struct ftdi_context * Ftdi::Context::context () [read, protected]

Definition at line 367 of file ftdi.cpp.

void Ftdi::Context::set_context (struct ftdi_context * context) [protected]

Definition at line 356 of file ftdi.cpp.

void Ftdi::Context::set_usb_device (struct usb_device * dev) [protected]

Definition at line 362 of file ftdi.cpp.

friend class Eeprom [friend]

Definition at line 50 of file ftdi.hpp.

friend class List [friend]

Definition at line 51 of file ftdi.hpp.

Author

Generated automatically by Doxygen for libftdi from the source code.