X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=src%2Fftdi.h;h=d8b4001987e6f4100b2671fd7e39016b8bc78e37;hp=126c85a9c7a21600447f1e2f8e84f0c415d2ff04;hb=4c9e381219d807ff74556eb35cae1c90986242bc;hpb=474786c0caf97e4b573e7a785ce0421ed79769d3 diff --git a/src/ftdi.h b/src/ftdi.h index 126c85a..d8b4001 100644 --- a/src/ftdi.h +++ b/src/ftdi.h @@ -20,7 +20,7 @@ #include /// FTDI chip type -enum ftdi_chip_type { TYPE_AM=0, TYPE_BM=1, TYPE_2232C=2 }; +enum ftdi_chip_type { TYPE_AM=0, TYPE_BM=1, TYPE_2232C=2, TYPE_R=3 }; /// Parity mode for ftdi_set_line_property() enum ftdi_parity_type { NONE=0, ODD=1, EVEN=2, MARK=3, SPACE=4 }; /// Number of stop bits for ftdi_set_line_property() @@ -35,7 +35,9 @@ enum ftdi_mpsse_mode { BITMODE_MPSSE = 0x02, BITMODE_SYNCBB = 0x04, BITMODE_MCU = 0x08, - BITMODE_OPTO = 0x10 + // CPU-style fifo mode gets set via EEPROM + BITMODE_OPTO = 0x10, + BITMODE_CBUS = 0x20 }; /// Port interface for FT2232C @@ -246,6 +248,7 @@ extern "C" { int ftdi_read_data_get_chunksize(struct ftdi_context *ftdi, unsigned int *chunksize); int ftdi_write_data(struct ftdi_context *ftdi, unsigned char *buf, int size); + int ftdi_write_data_async(struct ftdi_context *ftdi, unsigned char *buf, int size); 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); @@ -264,6 +267,7 @@ extern "C" { // "eeprom" needs to be valid 128 byte eeprom (generated by the eeprom generator) // the checksum of the eeprom is valided int ftdi_read_eeprom(struct ftdi_context *ftdi, unsigned char *eeprom); + int ftdi_read_chipid(struct ftdi_context *ftdi, unsigned int *chipid); int ftdi_write_eeprom(struct ftdi_context *ftdi, unsigned char *eeprom); int ftdi_erase_eeprom(struct ftdi_context *ftdi);