libftdi1  1.3
Public Attributes | List of all members
ftdi_context Struct Reference

Main context structure for all libftdi functions. More...

#include <ftdi.h>

Public Attributes

struct libusb_context * usb_ctx
 
struct libusb_device_handle * usb_dev
 
int usb_read_timeout
 
int usb_write_timeout
 
enum ftdi_chip_type type
 
int baudrate
 
unsigned char bitbang_enabled
 
unsigned char * readbuffer
 
unsigned int readbuffer_offset
 
unsigned int readbuffer_remaining
 
unsigned int readbuffer_chunksize
 
unsigned int writebuffer_chunksize
 
unsigned int max_packet_size
 
int interface
 
int index
 
int in_ep
 
int out_ep
 
unsigned char bitbang_mode
 
struct ftdi_eepromeeprom
 
char * error_str
 
enum ftdi_module_detach_mode module_detach_mode
 

Detailed Description

Main context structure for all libftdi functions.

Do not access directly if possible.

Definition at line 219 of file ftdi.h.

Member Data Documentation

struct libusb_context* ftdi_context::usb_ctx
struct libusb_device_handle* ftdi_context::usb_dev
int ftdi_context::usb_read_timeout
int ftdi_context::usb_write_timeout
enum ftdi_chip_type ftdi_context::type
int ftdi_context::baudrate

baudrate

Definition at line 235 of file ftdi.h.

Referenced by ftdi_init(), and ftdi_set_baudrate().

unsigned char ftdi_context::bitbang_enabled

bitbang mode state

Definition at line 237 of file ftdi.h.

Referenced by ftdi_disable_bitbang(), ftdi_init(), ftdi_set_baudrate(), and ftdi_set_bitmode().

unsigned char* ftdi_context::readbuffer

pointer to read buffer for ftdi_read_data

Definition at line 239 of file ftdi.h.

Referenced by ftdi_deinit(), ftdi_init(), ftdi_read_data(), ftdi_read_data_set_chunksize(), and ftdi_read_data_submit().

unsigned int ftdi_context::readbuffer_offset
unsigned int ftdi_context::readbuffer_remaining

number of remaining data in internal read buffer

Definition at line 243 of file ftdi.h.

Referenced by ftdi_init(), ftdi_read_data(), ftdi_read_data_set_chunksize(), ftdi_read_data_submit(), ftdi_usb_purge_rx_buffer(), and ftdi_usb_reset().

unsigned int ftdi_context::readbuffer_chunksize

read buffer chunk size

Definition at line 245 of file ftdi.h.

Referenced by ftdi_read_data(), ftdi_read_data_get_chunksize(), ftdi_read_data_set_chunksize(), and ftdi_read_data_submit().

unsigned int ftdi_context::writebuffer_chunksize

write buffer chunk size

Definition at line 247 of file ftdi.h.

Referenced by ftdi_init(), ftdi_write_data(), ftdi_write_data_get_chunksize(), ftdi_write_data_set_chunksize(), and ftdi_write_data_submit().

unsigned int ftdi_context::max_packet_size

maximum packet size. Needed for filtering modem status bytes every n packets.

Definition at line 249 of file ftdi.h.

Referenced by ftdi_init(), ftdi_read_data(), ftdi_readstream(), and ftdi_usb_open_dev().

int ftdi_context::interface

FT2232C interface number: 0 or 1

Definition at line 253 of file ftdi.h.

Referenced by ftdi_set_interface(), ftdi_usb_close(), and ftdi_usb_open_dev().

int ftdi_context::index
int ftdi_context::in_ep

FT2232C end points: 1 or 2

Definition at line 258 of file ftdi.h.

Referenced by ftdi_set_interface(), ftdi_write_data(), and ftdi_write_data_submit().

int ftdi_context::out_ep

Definition at line 259 of file ftdi.h.

Referenced by ftdi_read_data(), ftdi_read_data_submit(), ftdi_readstream(), and ftdi_set_interface().

unsigned char ftdi_context::bitbang_mode

Bitbang mode. 1: (default) Normal bitbang mode, 2: FT2232C SPI bitbang mode

Definition at line 262 of file ftdi.h.

Referenced by ftdi_init(), and ftdi_set_bitmode().

struct ftdi_eeprom* ftdi_context::eeprom
char* ftdi_context::error_str

String representation of last error

Definition at line 268 of file ftdi.h.

Referenced by ftdi_get_error_string(), and ftdi_init().

enum ftdi_module_detach_mode ftdi_context::module_detach_mode

Defines behavior in case a kernel module is already attached to the device

Definition at line 271 of file ftdi.h.

Referenced by ftdi_init(), and ftdi_usb_open_dev().


The documentation for this struct was generated from the following file: