libftdi1 1.5
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
 
const 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 271 of file ftdi.h.

Member Data Documentation

◆ usb_ctx

struct libusb_context* ftdi_context::usb_ctx

◆ usb_dev

struct libusb_device_handle* ftdi_context::usb_dev

◆ usb_read_timeout

int ftdi_context::usb_read_timeout

◆ usb_write_timeout

int ftdi_context::usb_write_timeout

◆ type

enum ftdi_chip_type ftdi_context::type

◆ baudrate

int ftdi_context::baudrate

baudrate

Definition at line 287 of file ftdi.h.

Referenced by ftdi_init().

◆ bitbang_enabled

unsigned char ftdi_context::bitbang_enabled

bitbang mode state

Definition at line 289 of file ftdi.h.

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

◆ readbuffer

unsigned char* ftdi_context::readbuffer

pointer to read buffer for ftdi_read_data

Definition at line 291 of file ftdi.h.

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

◆ readbuffer_offset

unsigned int ftdi_context::readbuffer_offset

◆ readbuffer_remaining

unsigned int ftdi_context::readbuffer_remaining

number of remaining data in internal read buffer

Definition at line 295 of file ftdi.h.

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

◆ readbuffer_chunksize

unsigned int ftdi_context::readbuffer_chunksize

read buffer chunk size

Definition at line 297 of file ftdi.h.

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

◆ writebuffer_chunksize

unsigned int ftdi_context::writebuffer_chunksize

write buffer chunk size

Definition at line 299 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().

◆ max_packet_size

unsigned int ftdi_context::max_packet_size

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

Definition at line 301 of file ftdi.h.

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

◆ interface

int ftdi_context::interface

FT2232C interface number: 0 or 1

Definition at line 305 of file ftdi.h.

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

◆ index

int ftdi_context::index

◆ in_ep

int ftdi_context::in_ep

FT2232C end points: 1 or 2

Definition at line 310 of file ftdi.h.

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

◆ out_ep

int ftdi_context::out_ep

Definition at line 311 of file ftdi.h.

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

◆ bitbang_mode

unsigned char ftdi_context::bitbang_mode

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

Definition at line 314 of file ftdi.h.

Referenced by ftdi_init(), and ftdi_set_bitmode().

◆ eeprom

struct ftdi_eeprom* ftdi_context::eeprom

◆ error_str

const char* ftdi_context::error_str

String representation of last error

Definition at line 320 of file ftdi.h.

Referenced by ftdi_get_error_string(), and ftdi_init().

◆ module_detach_mode

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 323 of file ftdi.h.

Referenced by ftdi_init(), and ftdi_usb_open_dev().


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