The branch, ftdi-eeprom-fix-bitflag-handling has been created
at 21cbf07029f382475cabcc157bb2fef339fff4d0 (commit)
- Log -----------------------------------------------------------------
commit 21cbf07029f382475cabcc157bb2fef339fff4d0
Author: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
Date: Thu May 14 22:38:37 2020 +0200
eeprom handling: Unify handling of boolean bit flags
Boolean bit flags should be zero or one in memory,
not the actual eeprom value FTDI assigned to them.
Example of the code change in ftdi_eeprom_build():
ftdi_eeprom_build():
- if (eeprom->suspend_dbus7 == SUSPEND_DBUS7_BIT)
+ if (eeprom->suspend_dbus7)
The changes should not break any backward compatibility
in ftdi_build_eeprom().
The function ftdi_decode_eeprom() will return slightly different values
for boolean fields, but callers should test using "if (flag_enabled)"
instead of "if (flag_enabled == specific_value)" anyway.
Test done: Decoded eeprom of a FT232 serial cable stayed the same.
$ diff -u dump-old.txt dump-new.txt
-> no change
-----------------------------------------------------------------------
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
|