libftdi1: ftdi.c File Reference

libftdi1 1.5

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Macros | Functions
ftdi.c File Reference
`#include <libusb.h>`
`#include <string.h>`
`#include <errno.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include "ftdi_i.h"`
`#include "ftdi.h"`
`#include "ftdi_version_i.h"`

Go to the source code of this file.

## Macros
#define | _FTDI_DISABLE_DEPRECATED
#define | ftdi_error_return(code, str)
#define | ftdi_error_return_free_device_list(code, str, devs)
#define | H_CLK 120000000
#define | C_CLK 48000000
#define | MAGIC 0x55aa

## Functions
int | ftdi_init (struct ftdi_context *ftdi)
struct ftdi_context * | ftdi_new (void)
int | ftdi_set_interface (struct ftdi_context *ftdi, enum ftdi_interface interface)
void | ftdi_deinit (struct ftdi_context *ftdi)
void | ftdi_free (struct ftdi_context *ftdi)
void | ftdi_set_usbdev (struct ftdi_context *ftdi, libusb_device_handle *usb)
struct ftdi_version_info | ftdi_get_library_version (void)
| Get libftdi library version. More...
int | ftdi_usb_find_all (struct ftdi_context *ftdi, struct ftdi_device_list **devlist, int vendor, int product)
void | ftdi_list_free (struct ftdi_device_list **devlist)
void | ftdi_list_free2 (struct ftdi_device_list *devlist)
int | ftdi_usb_get_strings (struct ftdi_context *ftdi, struct libusb_device *dev, char *manufacturer, int mnf_len, char *description, int desc_len, char *serial, int serial_len)
int | ftdi_usb_get_strings2 (struct ftdi_context *ftdi, struct libusb_device *dev, char *manufacturer, int mnf_len, char *description, int desc_len, char *serial, int serial_len)
int | ftdi_usb_open_dev (struct ftdi_context *ftdi, libusb_device *dev)
int | ftdi_usb_open (struct ftdi_context *ftdi, int vendor, int product)
int | ftdi_usb_open_desc (struct ftdi_context *ftdi, int vendor, int product, const char *description, const char *serial)
int | ftdi_usb_open_desc_index (struct ftdi_context *ftdi, int vendor, int product, const char *description, const char *serial, unsigned int index)
int | ftdi_usb_open_bus_addr (struct ftdi_context *ftdi, uint8_t bus, uint8_t addr)
int | ftdi_usb_open_string (struct ftdi_context *ftdi, const char *description)
int | ftdi_usb_reset (struct ftdi_context *ftdi)
int | ftdi_tciflush (struct ftdi_context *ftdi)
int | ftdi_usb_purge_rx_buffer (struct ftdi_context *ftdi)
int | ftdi_tcoflush (struct ftdi_context *ftdi)
int | ftdi_usb_purge_tx_buffer (struct ftdi_context *ftdi)
int | ftdi_tcioflush (struct ftdi_context *ftdi)
int | ftdi_usb_purge_buffers (struct ftdi_context *ftdi)
int | ftdi_usb_close (struct ftdi_context *ftdi)
int | convert_baudrate_UT_export (int baudrate, struct ftdi_context *ftdi, unsigned short *value, unsigned short *index)
| Wrapper function to export ftdi_convert_baudrate() to the unit test Do not use, it's only for the unit test framework. More...
int | ftdi_set_baudrate (struct ftdi_context *ftdi, int baudrate)
int | ftdi_set_line_property (struct ftdi_context *ftdi, enum ftdi_bits_type bits, enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity)
int | ftdi_set_line_property2 (struct ftdi_context *ftdi, enum ftdi_bits_type bits, enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity, enum ftdi_break_type break_type)
int | ftdi_write_data (struct ftdi_context *ftdi, const unsigned char *buf, int size)
struct ftdi_transfer_control * | ftdi_write_data_submit (struct ftdi_context *ftdi, unsigned char *buf, int size)
struct ftdi_transfer_control * | ftdi_read_data_submit (struct ftdi_context *ftdi, unsigned char *buf, int size)
int | ftdi_transfer_data_done (struct ftdi_transfer_control *tc)
void | ftdi_transfer_data_cancel (struct ftdi_transfer_control *tc, struct timeval *to)
int | ftdi_write_data_set_chunksize (struct ftdi_context *ftdi, unsigned int chunksize)
int | ftdi_write_data_get_chunksize (struct ftdi_context *ftdi, unsigned int *chunksize)
int | ftdi_read_data (struct ftdi_context *ftdi, unsigned char *buf, int size)
int | ftdi_read_data_set_chunksize (struct ftdi_context *ftdi, unsigned int chunksize)
int | ftdi_read_data_get_chunksize (struct ftdi_context *ftdi, unsigned int *chunksize)
int | ftdi_set_bitmode (struct ftdi_context *ftdi, unsigned char bitmask, unsigned char mode)
int | ftdi_disable_bitbang (struct ftdi_context *ftdi)
int | ftdi_read_pins (struct ftdi_context *ftdi, unsigned char *pins)
int | ftdi_set_latency_timer (struct ftdi_context *ftdi, unsigned char latency)
int | ftdi_get_latency_timer (struct ftdi_context *ftdi, unsigned char *latency)
int | ftdi_poll_modem_status (struct ftdi_context *ftdi, unsigned short *status)
int | ftdi_setflowctrl (struct ftdi_context *ftdi, int flowctrl)
int | ftdi_setflowctrl_xonxoff (struct ftdi_context *ftdi, unsigned char xon, unsigned char xoff)
int | ftdi_setdtr (struct ftdi_context *ftdi, int state)
int | ftdi_setrts (struct ftdi_context *ftdi, int state)
int | ftdi_setdtr_rts (struct ftdi_context *ftdi, int dtr, int rts)
int | ftdi_set_event_char (struct ftdi_context *ftdi, unsigned char eventch, unsigned char enable)
int | ftdi_set_error_char (struct ftdi_context *ftdi, unsigned char errorch, unsigned char enable)
int | ftdi_eeprom_initdefaults (struct ftdi_context *ftdi, char *manufacturer, char *product, char *serial)
int | ftdi_eeprom_set_strings (struct ftdi_context *ftdi, const char *manufacturer, const char *product, const char *serial)
int | ftdi_eeprom_get_strings (struct ftdi_context *ftdi, char *manufacturer, int mnf_len, char *product, int prod_len, char *serial, int serial_len)
void | set_ft232h_cbus (struct ftdi_eeprom *eeprom, unsigned char *output)
int | ftdi_eeprom_build (struct ftdi_context *ftdi)
int | ftdi_eeprom_decode (struct ftdi_context *ftdi, int verbose)
int | ftdi_get_eeprom_value (struct ftdi_context *ftdi, enum ftdi_eeprom_value value_name, int *value)
int | ftdi_set_eeprom_value (struct ftdi_context *ftdi, enum ftdi_eeprom_value value_name, int value)
int | ftdi_get_eeprom_buf (struct ftdi_context *ftdi, unsigned char *buf, int size)
int | ftdi_set_eeprom_buf (struct ftdi_context *ftdi, const unsigned char *buf, int size)
int | ftdi_set_eeprom_user_data (struct ftdi_context *ftdi, const char *buf, int size)
int | ftdi_read_eeprom_location (struct ftdi_context *ftdi, int eeprom_addr, unsigned short *eeprom_val)
int | ftdi_read_eeprom (struct ftdi_context *ftdi)
int | ftdi_read_chipid (struct ftdi_context *ftdi, unsigned int *chipid)
int | ftdi_write_eeprom_location (struct ftdi_context *ftdi, int eeprom_addr, unsigned short eeprom_val)
int | ftdi_write_eeprom (struct ftdi_context *ftdi)
int | ftdi_erase_eeprom (struct ftdi_context *ftdi)
const char * | ftdi_get_error_string (struct ftdi_context *ftdi)

## Macro Definition Documentation

#define H_CLK 120000000

#define C_CLK 48000000