X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=src%2Fftdi.h;h=60c682611ef52974d5fd14cf182033932f794b34;hp=179d3ca3076e329418c203ef6a958038f8ebf706;hb=40da63b1f8924d2c4d1e34d137dc7d12b5b1c643;hpb=9965050222905eecc664baf168f71a2b632cae2a diff --git a/src/ftdi.h b/src/ftdi.h index 179d3ca..60c6826 100644 --- a/src/ftdi.h +++ b/src/ftdi.h @@ -278,6 +278,29 @@ struct ftdi_eeprom int size; }; +/** + \brief Progress Info for streaming read +*/ +struct size_and_time +{ + uint64_t totalBytes; + struct timeval time; +}; + +typedef struct +{ + struct size_and_time first; + struct size_and_time prev; + struct size_and_time current; + double totalTime; + double totalRate; + double currentRate; +} FTDIProgressInfo; + +typedef int (FTDIStreamCallback)(uint8_t *buffer, int length, + FTDIProgressInfo *progress, void *userdata); + + #ifdef __cplusplus extern "C" {