Hi Yegor,
You wrote on Mon, Apr 13, 2020 at 11:32:47PM +0200:
> I think the decoding of boolean bit fields all need to be changed
> to "!!(bit test)", so the in memory value will truely be one or zero.
>
> Then we can apply changes like this everywhere:
>
> - if ( eeprom->high_current_b == HIGH_CURRENT_DRIVE)
> + if (eeprom->high_current_b)
> output[0x01] |= HIGH_CURRENT_DRIVE;
I've bit the bullet and fixed all eeprom boolean bit fields on the branch
origin/ftdi-eeprom-fix-bitflag-handling
@Yegor: I would appreciate it if you could review it.
I triple reviewed it on my side not to break anything,
but may be I missed something *fingers crossed*
Additionally I've seen that the handling of the VCP driver field
for TYPE_R chips was not inverted properly, see the extra commit.
A colleague recently recommended a new code diff tool to me called "delta":
https://github.com/dandavison/delta
Here's how I run it:
git diff origin/master..origin/ftdi-eeprom-fix-bitflag-handling \
|delta --dark --keep-plus-minus-markers
It makes reading subtle code changes more obvious to me.
Cheers,
Tom
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|