FreeCalypso > hg > fc-usbser-tools
view fteeprom/filesearch.c @ 26:49239efbdcc8
rm fteeprom/test/fteeprom-prog-bad
When the magic command sequence for FT232R was added to libftdi-based
fteeprom-prog, a version without this magic sequence was preserved in
fteeprom-prog-bad. However, the new minilib version of fteeprom-prog
operates without this magic sequence by default (as appropriate for
FT2232D, FT2232H etc) and needs to be run with -r option to invoke
FT232R-specific mode with the necessary magic.
Anyone who needs fteeprom-prog-bad for study or experimentation
can find it in freecalypso-hwlab Hg repository where it was originally
developed.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 09 Sep 2023 16:06:56 +0000 |
parents | b2c891299e83 |
children |
line wrap: on
line source
/* * This module implements the function that searches for FTDI EEPROM config * files in a dedicated installation directory. It is based on the version * in fc-sim-tools that looks in the sim-scripts directory. */ #include <stdio.h> #include <string.h> #include <strings.h> static char ftdi_install_dir[] = "/opt/freecalypso/ftdi"; FILE * open_eeprom_config_file(req_filename) char *req_filename; { char pathbuf[256]; FILE *f; if (!index(req_filename, '/') && strlen(req_filename) < 128) { sprintf(pathbuf, "%s/%s", ftdi_install_dir, req_filename); f = fopen(pathbuf, "r"); if (f) return f; } f = fopen(req_filename, "r"); return f; }