libftdi1 1.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Members

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_eeprom * | eeprom
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 197 of file ftdi.h.

## Member Data Documentation

struct libusb_context* ftdi_context::usb_ctx

libusb's context

Definition at line 201 of file ftdi.h.

Referenced by ftdi_deinit(), ftdi_init(), ftdi_readstream(), ftdi_transfer_data_done(), ftdi_usb_find_all(), ftdi_usb_open_desc_index(), and ftdi_usb_open_string().

struct libusb_device_handle* ftdi_context::usb_dev

libusb's usb_dev_handle

Definition at line 203 of file ftdi.h.

Referenced by ftdi_disable_bitbang(), ftdi_eeprom_initdefaults(), ftdi_erase_eeprom(), ftdi_get_latency_timer(), ftdi_init(), ftdi_poll_modem_status(), ftdi_read_chipid(), ftdi_read_data(), ftdi_read_data_submit(), ftdi_read_eeprom(), ftdi_read_eeprom_location(), ftdi_read_pins(), ftdi_readstream(), ftdi_set_baudrate(), ftdi_set_bitmode(), ftdi_set_error_char(), ftdi_set_event_char(), ftdi_set_interface(), ftdi_set_latency_timer(), ftdi_set_line_property2(), ftdi_set_usbdev(), ftdi_setdtr(), ftdi_setdtr_rts(), ftdi_setflowctrl(), ftdi_setrts(), ftdi_usb_close(), ftdi_usb_get_strings(), ftdi_usb_open_desc_index(), ftdi_usb_open_dev(), ftdi_usb_purge_buffers(), ftdi_usb_purge_rx_buffer(), ftdi_usb_purge_tx_buffer(), ftdi_usb_reset(), ftdi_write_data(), ftdi_write_data_submit(), ftdi_write_eeprom(), and ftdi_write_eeprom_location().

int ftdi_context::usb_read_timeout

usb read timeout

Definition at line 205 of file ftdi.h.

Referenced by ftdi_get_latency_timer(), ftdi_init(), ftdi_poll_modem_status(), ftdi_read_chipid(), ftdi_read_data(), ftdi_read_data_submit(), ftdi_read_eeprom(), ftdi_read_eeprom_location(), ftdi_read_pins(), and ftdi_readstream().

int ftdi_context::usb_write_timeout

usb write timeout

Definition at line 207 of file ftdi.h.

Referenced by ftdi_disable_bitbang(), ftdi_erase_eeprom(), ftdi_init(), ftdi_set_baudrate(), ftdi_set_bitmode(), ftdi_set_error_char(), ftdi_set_event_char(), ftdi_set_latency_timer(), ftdi_set_line_property2(), ftdi_setdtr(), ftdi_setdtr_rts(), ftdi_setflowctrl(), ftdi_setrts(), ftdi_usb_purge_rx_buffer(), ftdi_usb_purge_tx_buffer(), ftdi_usb_reset(), ftdi_write_data(), ftdi_write_data_submit(), ftdi_write_eeprom(), and ftdi_write_eeprom_location().

enum ftdi_chip_type ftdi_context::type

FTDI chip type

Definition at line 211 of file ftdi.h.

Referenced by ftdi_eeprom_build(), ftdi_eeprom_decode(), ftdi_eeprom_initdefaults(), ftdi_erase_eeprom(), ftdi_init(), ftdi_read_eeprom(), ftdi_readstream(), ftdi_usb_open_dev(), and ftdi_write_eeprom_location().

int ftdi_context::baudrate

baudrate

Definition at line 213 of file ftdi.h.

Referenced by ftdi_init(), and ftdi_set_baudrate().

unsigned char ftdi_context::bitbang_enabled

bitbang mode state

Definition at line 215 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 217 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

read buffer offset

Definition at line 219 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_remaining

number of remaining data in internal read buffer

Definition at line 221 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 223 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 225 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 227 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 231 of file ftdi.h.

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

int ftdi_context::index

FT2232C index number: 1 or 2

Definition at line 233 of file ftdi.h.

Referenced by ftdi_disable_bitbang(), ftdi_get_latency_timer(), ftdi_poll_modem_status(), ftdi_read_pins(), ftdi_set_bitmode(), ftdi_set_error_char(), ftdi_set_event_char(), ftdi_set_interface(), ftdi_set_latency_timer(), ftdi_set_line_property2(), ftdi_setdtr(), ftdi_setdtr_rts(), ftdi_setflowctrl(), ftdi_setrts(), ftdi_usb_purge_rx_buffer(), ftdi_usb_purge_tx_buffer(), and ftdi_usb_reset().

int ftdi_context::in_ep

FT2232C end points: 1 or 2

Definition at line 236 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 237 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 240 of file ftdi.h.

Referenced by ftdi_init(), and ftdi_set_bitmode().

struct ftdi_eeprom* ftdi_context::eeprom

Decoded eeprom structure

Definition at line 243 of file ftdi.h.

Referenced by ftdi_deinit(), ftdi_eeprom_build(), ftdi_eeprom_decode(), ftdi_eeprom_initdefaults(), ftdi_erase_eeprom(), ftdi_get_eeprom_buf(), ftdi_get_eeprom_value(), ftdi_init(), ftdi_read_eeprom(), ftdi_set_eeprom_buf(), ftdi_set_eeprom_value(), and ftdi_write_eeprom().

char* ftdi_context::error_str

String representation of last error

Definition at line 246 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 249 of file ftdi.h.

Referenced by ftdi_init(), and ftdi_usb_open_dev().

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

- ftdi.h