The branch, master has been updated
via 6f9f969dc7e359296e562ee9731081cefaf06b20 (commit)
from 96d337a16b723d792f6ab5f40b7aa43120ac4782 (commit)
- Log -----------------------------------------------------------------
commit 6f9f969dc7e359296e562ee9731081cefaf06b20
Author: Rolf Fiedler <derRolf@xxxxxxxxxxxxxx>
Date: Mon Jun 6 17:31:40 2016 +0200
ftdi_eeprom: Fix flashing FT245R
When we were trying to program FT245R, they were always flashed as FT232R.
The attached patch fixes the missing call to type2bit for TYPE_R.
-----------------------------------------------------------------------
Summary of changes:
src/ftdi.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/ftdi.c b/src/ftdi.c
index 529b99e..f5d263c 100644
--- a/src/ftdi.c
+++ b/src/ftdi.c
@@ -2646,6 +2646,15 @@ static unsigned char type2bit(unsigned char type, enum
ftdi_chip_type chip)
default: return 0;
}
}
+ case TYPE_R:
+ {
+ switch (type)
+ {
+ case CHANNEL_IS_UART : return 0;
+ case CHANNEL_IS_FIFO : return 0x01;
+ default: return 0;
+ }
+ }
case TYPE_230X: /* FT230X is only UART */
default: return 0;
}
@@ -2938,6 +2947,7 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi)
output[0x14] = eeprom->chip;
break;
case TYPE_R:
+ output[0x00] = type2bit(eeprom->channel_a_type, TYPE_R);
if (eeprom->high_current == HIGH_CURRENT_DRIVE_R)
output[0x00] |= HIGH_CURRENT_DRIVE_R;
if (eeprom->external_oscillator)
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
|