libftdi-git Archives

Subject: A library to talk to FTDI chips branch, master, updated. v1.4-38-g0f683bb

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Thu, 14 May 2020 21:18:15 +0200 (CEST)
The branch, master has been updated
       via  0f683bb574ff665aeabd1db8f1c0cc1cc8dc87b8 (commit)
      from  afd738fc27844d48d3dbe3677c224dd9ab3a1539 (commit)


- Log -----------------------------------------------------------------
commit 0f683bb574ff665aeabd1db8f1c0cc1cc8dc87b8
Author: Roman Lapin <lampus.lapin@xxxxxxxxx>
Date:   Sat May 9 23:13:58 2020 +0300

    ftdi_eeprom: Add device release number support
    
    In process of firmware repairing of some FTDI-chip based device I have
    found that I can't get binary identical EEPROM dumps from properly
    working device and ftdi_eeprom --build_eeprom command because of
    ftdi_eeprom does not support changing of device release number (byte
    with addr 0x06).
    
    [TJ: Keep old behavior if release_number is not set in the config file]

-----------------------------------------------------------------------

Summary of changes:
 ftdi_eeprom/main.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ftdi_eeprom/main.c b/ftdi_eeprom/main.c
index d72f61c..7ba8d89 100644
--- a/ftdi_eeprom/main.c
+++ b/ftdi_eeprom/main.c
@@ -223,6 +223,7 @@ int main(int argc, char *argv[])
     {
         CFG_INT("vendor_id", 0, 0),
         CFG_INT("product_id", 0, 0),
+        CFG_INT("release_number", -1, 0),
         CFG_BOOL("self_powered", cfg_true, 0),
         CFG_BOOL("remote_wakeup", cfg_true, 0),
         CFG_BOOL("in_is_isochronous", cfg_false, 0),
@@ -459,6 +460,10 @@ int main(int argc, char *argv[])
     eeprom_set_value(ftdi, VENDOR_ID, cfg_getint(cfg, "vendor_id"));
     eeprom_set_value(ftdi, PRODUCT_ID, cfg_getint(cfg, "product_id"));
 
+    if (cfg_getint(cfg, "release_number") != -1) {
+        eeprom_set_value(ftdi, RELEASE_NUMBER, cfg_getint(cfg, 
"release_number"));
+    }
+
     eeprom_set_value(ftdi, SELF_POWERED, cfg_getbool(cfg, "self_powered"));
     eeprom_set_value(ftdi, REMOTE_WAKEUP, cfg_getbool(cfg, "remote_wakeup"));
     eeprom_set_value(ftdi, MAX_POWER, cfg_getint(cfg, "max_power"));


hooks/post-receive
-- 
A library to talk to FTDI chips

--
libftdi-git - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread
  • A library to talk to FTDI chips branch, master, updated. v1.4-38-g0f683bb, libftdi-git <=