Ftdi::Context - Online Linux Manual PageSection : 3
Updated : 17 Sep 2010
Source : Version 0.18
Note : libftdi

NAMEFtdi::Context − FTDI device context. Represents single FTDI device context.

SYNOPSIS
#include <ftdi.hpp>

Classesclass Private

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

Public Member FunctionsContext ()
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 Functionsint 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)

Friendsclass Eeprom
class List

Detailed DescriptionFTDI device context. Represents single FTDI device context. Definition at line 47 of file ftdi.hpp.

Member Enumeration Documentation

enum Ftdi::Context::DirectionDirection flags for flush(). Enumerator: Input  Output  Definition at line 56 of file ftdi.hpp.

enum Ftdi::Context::ModemCtlModem control flags. Enumerator: Dtr  Rts  Definition at line 64 of file ftdi.hpp.

Constructor & Destructor Documentation

Ftdi::Context::Context ()Constructor. Definition at line 64 of file ftdi.cpp.

Ftdi::Context::~Context ()Destructor. Definition at line 71 of file ftdi.cpp.

Member Function Documentation

Eeprom* Ftdi::Context::eeprom ()

const std::string & Ftdi::Context::vendor ()Device strings properties. Definition at line 340 of file ftdi.cpp. Referenced by get_strings().

const std::string & Ftdi::Context::description ()Device strings properties. Definition at line 347 of file ftdi.cpp.

const std::string & Ftdi::Context::serial ()Device strings properties. Definition at line 354 of file ftdi.cpp. Referenced by get_strings().

bool Ftdi::Context::is_open ()Definition at line 75 of file ftdi.cpp.

int Ftdi::Context::open (struct usb_device * dev = 0)Definition at line 120 of file ftdi.cpp. References get_strings_and_reopen().

int Ftdi::Context::open (int vendor, int product)Definition at line 80 of file ftdi.cpp. References ftdi_usb_open(), and get_strings_and_reopen().

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 91 of file ftdi.cpp. References ftdi_usb_open_desc_index(), and get_strings_and_reopen().

int Ftdi::Context::open (const std::string & description)Definition at line 110 of file ftdi.cpp. References ftdi_usb_open_string(), and get_strings_and_reopen().

int Ftdi::Context::close ()Definition at line 131 of file ftdi.cpp. References ftdi_usb_close().

int Ftdi::Context::reset ()Definition at line 137 of file ftdi.cpp. References ftdi_usb_reset().

int Ftdi::Context::flush (int mask = Input|Output)Definition at line 142 of file ftdi.cpp. References ftdi_usb_purge_rx_buffer(), ftdi_usb_purge_tx_buffer(), Input, and Output.

int Ftdi::Context::set_interface (enum ftdi_interface interface)Definition at line 154 of file ftdi.cpp. References ftdi_set_interface().

void Ftdi::Context::set_usb_device (struct usb_dev_handle * dev)Definition at line 159 of file ftdi.cpp. References ftdi_set_usbdev(). Referenced by Ftdi::List::List().

int Ftdi::Context::set_baud_rate (int baudrate)Definition at line 165 of file ftdi.cpp. References ftdi_set_baudrate().

int Ftdi::Context::set_line_property (enum ftdi_bits_type bits, enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity)Definition at line 170 of file ftdi.cpp. References ftdi_set_line_property().

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 175 of file ftdi.cpp. References ftdi_set_line_property2().

int Ftdi::Context::read (unsigned char * buf, int size)Definition at line 180 of file ftdi.cpp. References ftdi_read_data().

int Ftdi::Context::write (unsigned char * buf, int size)Definition at line 199 of file ftdi.cpp. References ftdi_write_data().

int Ftdi::Context::set_read_chunk_size (unsigned int chunksize)Definition at line 185 of file ftdi.cpp. References ftdi_read_data_set_chunksize().

int Ftdi::Context::set_write_chunk_size (unsigned int chunksize)Definition at line 204 of file ftdi.cpp. References ftdi_write_data_set_chunksize().

int Ftdi::Context::read_chunk_size ()Definition at line 190 of file ftdi.cpp. References ftdi_read_data_get_chunksize().

int Ftdi::Context::write_chunk_size ()Definition at line 209 of file ftdi.cpp. References ftdi_write_data_get_chunksize().

int Ftdi::Context::set_event_char (unsigned char eventch, unsigned char enable)Definition at line 264 of file ftdi.cpp. References ftdi_set_event_char().

int Ftdi::Context::set_error_char (unsigned char errorch, unsigned char enable)Definition at line 269 of file ftdi.cpp. References ftdi_set_error_char().

int Ftdi::Context::set_flow_control (int flowctrl)Definition at line 218 of file ftdi.cpp. References ftdi_setflowctrl().

int Ftdi::Context::set_modem_control (int mask = Dtr|Rts)Definition at line 223 of file ftdi.cpp. References Dtr, ftdi_setdtr_rts(), and Rts.

int Ftdi::Context::set_latency (unsigned char latency)Definition at line 245 of file ftdi.cpp. References ftdi_set_latency_timer().

int Ftdi::Context::set_dtr (bool state)Definition at line 235 of file ftdi.cpp. References ftdi_setdtr().

int Ftdi::Context::set_rts (bool state)Definition at line 240 of file ftdi.cpp. References ftdi_setrts().

unsigned short Ftdi::Context::poll_modem_status ()Definition at line 257 of file ftdi.cpp. References ftdi_poll_modem_status().

unsigned Ftdi::Context::latency ()Definition at line 250 of file ftdi.cpp. References ftdi_get_latency_timer().

int Ftdi::Context::set_bitmode (unsigned char bitmask, unsigned char mode)Definition at line 284 of file ftdi.cpp.

int Ftdi::Context::set_bitmode (unsigned char bitmask, enum ftdi_mpsse_mode mode)Definition at line 289 of file ftdi.cpp. References ftdi_set_bitmode().

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

int Ftdi::Context::bitbang_disable ()Definition at line 279 of file ftdi.cpp. References ftdi_disable_bitbang().

int Ftdi::Context::read_pins (unsigned char * pins)Definition at line 294 of file ftdi.cpp. References ftdi_read_pins().

char * Ftdi::Context::error_string ()Definition at line 299 of file ftdi.cpp. References ftdi_get_error_string().

int Ftdi::Context::get_strings () [protected]Definition at line 304 of file ftdi.cpp. References ftdi_usb_get_strings(), serial(), and vendor(). Referenced by get_strings_and_reopen(), and Ftdi::List::List().

int Ftdi::Context::get_strings_and_reopen () [protected]Definition at line 321 of file ftdi.cpp. References ftdi_usb_open_dev(), and get_strings(). Referenced by open().

struct ftdi_context * Ftdi::Context::context () [read, protected]Definition at line 370 of file ftdi.cpp. Referenced by Ftdi::Eeprom::Eeprom().

void Ftdi::Context::set_context (struct ftdi_context * context) [protected]Definition at line 359 of file ftdi.cpp. References ftdi_free().

void Ftdi::Context::set_usb_device (struct usb_device * dev) [protected]Definition at line 365 of file ftdi.cpp.

Friends And Related Function Documentation

friend class Eeprom [friend]Definition at line 50 of file ftdi.hpp.

friend class List [friend]Definition at line 51 of file ftdi.hpp.

AuthorGenerated automatically by Doxygen for libftdi from the source code.
0
Johanes Gumabo
Data Size   :   60,263 byte
man-Ftdi_Context.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   6 / 167,148
Visitor ID   :     :  
Visitor IP   :   3.144.109.147   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.