Hello recently needed the 16MA option for pins on ft4232h or ft2232h
neither worked so I added this patch and it did. I used the ft232h
group0 branch as base. Also I had sent in a patch to add 4233h
support (except for eeprom stuff) A long while back, It took a while
for a response do to people are busy (totally get it) and I
resubmitted it back then but still dont see it anywhere in repo. Just
curious if it was wrong or needed work etc.
diff --git a/ftdi_eeprom/main.c b/ftdi_eeprom/main.c
index fc427db..86a6922 100644
--- a/ftdi_eeprom/main.c
+++ b/ftdi_eeprom/main.c
@@ -79,6 +79,7 @@ static int parse_group0_drive(cfg_t *cfg, cfg_opt_t
*opt, const char *value, voi
if (!(strcasecmp(options[i], value)))
{
*(int *)result = i;
+ printf("group0 drive %s value %s result %s \n",
cfg_opt_name(opt), value, result);
return 0;
}
}
@@ -466,7 +467,7 @@ int main(int argc, char *argv[])
if (filename != NULL && strlen(filename) > 0)
{
FILE *fp = fopen (filename, "wb");
-
+
if(fp)
{
fwrite(eeprom_buf, 1, my_eeprom_size, fp);
@@ -549,6 +550,28 @@ int main(int argc, char *argv[])
eeprom_set_value(ftdi, GROUP1_SLEW, cfg_getbool(cfg,
"group1_slew"));
eeprom_set_value(ftdi, GROUP1_SCHMITT, cfg_getbool(cfg,
"group1_schmitt"));
}
+ else if (ftdi->type == TYPE_4232H)
+ {
+ if (cfg_getint(cfg, "group0_drive") != -1)
+ eeprom_set_value(ftdi, GROUP0_DRIVE, cfg_getint(cfg,
"group0_drive"));
+ eeprom_set_value(ftdi, GROUP0_SLEW, cfg_getbool(cfg,
"group0_slew"));
+ eeprom_set_value(ftdi, GROUP0_SCHMITT, cfg_getbool(cfg,
"group0_schmitt"));
+ if (cfg_getint(cfg, "group1_drive") != -1)
+ eeprom_set_value(ftdi, GROUP1_DRIVE, cfg_getint(cfg,
"group1_drive"));
+ eeprom_set_value(ftdi, GROUP1_SLEW, cfg_getbool(cfg,
"group1_slew"));
+ eeprom_set_value(ftdi, GROUP1_SCHMITT, cfg_getbool(cfg,
"group1_schmitt"));
+ }
+ else if (ftdi->type == TYPE_2232H)
+ {
+ if (cfg_getint(cfg, "group0_drive") != -1)
+ eeprom_set_value(ftdi, GROUP0_DRIVE, cfg_getint(cfg,
"group0_drive"));
+ eeprom_set_value(ftdi, GROUP0_SLEW, cfg_getbool(cfg,
"group0_slew"));
+ eeprom_set_value(ftdi, GROUP0_SCHMITT, cfg_getbool(cfg,
"group0_schmitt"));
+ if (cfg_getint(cfg, "group1_drive") != -1)
+ eeprom_set_value(ftdi, GROUP1_DRIVE, cfg_getint(cfg,
"group1_drive"));
+ eeprom_set_value(ftdi, GROUP1_SLEW, cfg_getbool(cfg,
"group1_slew"));
+ eeprom_set_value(ftdi, GROUP1_SCHMITT, cfg_getbool(cfg,
"group1_schmitt"));
+ }
else if (ftdi->type == TYPE_230X)
{
if (cfg_getint(cfg, "cbusx0") != -1)
On Thu, Nov 24, 2022, 6:00 PM benjamin maddocks <[email protected]> wrote:
> Ha! You sound like a very lucky man to have the skills amd job to do
> kernel related stuff at work! I envy you my friend. Take care, hopefully
> someday ill get around to figuring out the eeprom settings, but sadly
> havent even touched that board in weeks maybe months.
>
> On Thu, 24 Nov 2022, 5:20 pm Thomas Jarosch, <[email protected]>
> wrote:
>
>> Hi Benjamin,
>>
>> You wrote on Fri, Nov 18, 2022 at 04:32:46AM -0500:
>> > Never got a response so thought id resend this just in case.
>>
>> thanks for the ping.
>>
>> I'll process the libftdi patches in December, we are in the middle of
>> a major linux kernel upgrade at work and funny business popped up here
>> and there.
>>
>> Cheers,
>> Thomas
>>
>> --
>> libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
>> To unsubscribe send a mail to [email protected]
>>
>>
>>
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [email protected]