Ftdi::Context Class Reference
FTDI device context. Represents single FTDI device context.
More...
#include <ftdi.hpp>
List of all members.
|
Public Types |
enum | Direction { Input,
Output
} |
| Direction flags for flush(). More...
|
enum | ModemCtl { Dtr,
Rts
} |
| Modem control flags. More...
|
Public Member Functions |
| Context () |
| Constructor.
|
| ~Context () |
| Destructor.
|
Eeprom * | eeprom () |
const std::string & | vendor () |
const std::string & | description () |
const std::string & | serial () |
bool | is_open () |
int | open (struct usb_device *dev=0) |
int | open (int vendor, int product, const std::string &description=std::string(), const std::string &serial=std::string()) |
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 | bitbang_enable (unsigned char bitmask) |
int | bitbang_disable () |
int | read_pins (unsigned char *pins) |
char * | error_string () |
Protected Member Functions |
int | get_strings () |
struct ftdi_context * | context () |
void | set_context (struct ftdi_context *context) |
void | set_usb_device (struct usb_device *dev) |
Friends |
class | Eeprom |
class | List |
Classes |
class | Private |
Detailed Description
FTDI device context. Represents single FTDI device context.
Definition at line 47 of file ftdi.hpp.
Member Enumeration Documentation
Modem control flags.
- Enumerator:
-
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 |
( |
|
) |
|
const std::string & Ftdi::Context::description |
( |
|
) |
|
const std::string & Ftdi::Context::serial |
( |
|
) |
|
bool Ftdi::Context::is_open |
( |
|
) |
|
int Ftdi::Context::open |
( |
struct usb_device * |
dev = 0 |
) |
|
int Ftdi::Context::open |
( |
int |
vendor, |
|
|
int |
product, |
|
|
const std::string & |
description = std::string() , |
|
|
const std::string & |
serial = std::string() | |
|
) |
| | |
int Ftdi::Context::close |
( |
|
) |
|
int Ftdi::Context::reset |
( |
|
) |
|
int Ftdi::Context::flush |
( |
int |
mask = Input|Output |
) |
|
int Ftdi::Context::set_baud_rate |
( |
int |
baudrate |
) |
|
int Ftdi::Context::read |
( |
unsigned char * |
buf, |
|
|
int |
size | |
|
) |
| | |
int Ftdi::Context::write |
( |
unsigned char * |
buf, |
|
|
int |
size | |
|
) |
| | |
int Ftdi::Context::set_read_chunk_size |
( |
unsigned int |
chunksize |
) |
|
int Ftdi::Context::set_write_chunk_size |
( |
unsigned int |
chunksize |
) |
|
int Ftdi::Context::read_chunk_size |
( |
|
) |
|
int Ftdi::Context::write_chunk_size |
( |
|
) |
|
int Ftdi::Context::set_event_char |
( |
unsigned char |
eventch, |
|
|
unsigned char |
enable | |
|
) |
| | |
int Ftdi::Context::set_error_char |
( |
unsigned char |
errorch, |
|
|
unsigned char |
enable | |
|
) |
| | |
int Ftdi::Context::set_flow_control |
( |
int |
flowctrl |
) |
|
int Ftdi::Context::set_modem_control |
( |
int |
mask = Dtr|Rts |
) |
|
int Ftdi::Context::set_latency |
( |
unsigned char |
latency |
) |
|
int Ftdi::Context::set_dtr |
( |
bool |
state |
) |
|
int Ftdi::Context::set_rts |
( |
bool |
state |
) |
|
unsigned short Ftdi::Context::poll_modem_status |
( |
|
) |
|
unsigned Ftdi::Context::latency |
( |
|
) |
|
int Ftdi::Context::set_bitmode |
( |
unsigned char |
bitmask, |
|
|
unsigned char |
mode | |
|
) |
| | |
int Ftdi::Context::bitbang_enable |
( |
unsigned char |
bitmask |
) |
|
int Ftdi::Context::bitbang_disable |
( |
|
) |
|
int Ftdi::Context::read_pins |
( |
unsigned char * |
pins |
) |
|
char * Ftdi::Context::error_string |
( |
|
) |
|
int Ftdi::Context::get_strings |
( |
|
) |
[protected] |
struct ftdi_context * Ftdi::Context::context |
( |
|
) |
[read, protected] |
void Ftdi::Context::set_context |
( |
struct ftdi_context * |
context |
) |
[protected] |
void Ftdi::Context::set_usb_device |
( |
struct usb_device * |
dev |
) |
[protected] |
Friends And Related Function Documentation
friend class List [friend] |
The documentation for this class was generated from the following files: