X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=ftdi%2Fftdi.h;fp=ftdi%2Fftdi.h;h=b07c35771b828c969f7efba62eed7e3524346c73;hp=911bee01b4bd6f86da0805063dd0e12608fced7d;hb=b8aa7b35f8b9374c1c4957bab331cb984c313561;hpb=ed475f5524f52e9242c24cc7a2f03248f3552594 diff --git a/ftdi/ftdi.h b/ftdi/ftdi.h index 911bee0..b07c357 100644 --- a/ftdi/ftdi.h +++ b/ftdi/ftdi.h @@ -32,6 +32,28 @@ struct ftdi_context { char *error_str; }; +struct ftdi_eeprom { + int vendor_id; + int product_id; + + int self_powered; + int remote_wakeup; + int BM_type_chip; + + int in_is_isochronous; + int out_is_isochronous; + int suspend_pull_downs; + + int use_serial; + int change_usb_version; + int usb_version; + int max_power; + + char *manufacturer; + char *product; + char *serial; +}; + #ifdef __cplusplus extern "C" { #endif @@ -53,11 +75,15 @@ extern "C" { int ftdi_set_latency_timer(struct ftdi_context *ftdi, unsigned char latency); int ftdi_get_latency_timer(struct ftdi_context *ftdi, unsigned char *latency); + // init and build eeprom from ftdi_eeprom structure + void ftdi_eeprom_initdefaults(struct ftdi_eeprom *eeprom); + int ftdi_eeprom_build(struct ftdi_eeprom *eeprom, unsigned char *output); + // "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, char *eeprom); int ftdi_write_eeprom(struct ftdi_context *ftdi, char *eeprom); - int ftdi_erase(struct ftdi_context *ftdi); + int ftdi_erase_eeprom(struct ftdi_context *ftdi); #ifdef __cplusplus }