On Sunday, 26. September 2010 12:57:27 Uwe Bonnes wrote:
> For the EEPROM side, what about simple enumerating the available options
> in the public header, move struct ftdi_eeprom to a private header and
> have functions
> int res = Get_EEPROM_Value(struct ftdi_context *, char * Option, int *
> value); int res = Set_EEPROM_Value(struct ftdi_context *, char * Option,
> const int value); value);
>
> The Option string is compared against the available options, if no match
> is found, an error returned and else the value fetched or set.
Either that or just use an enum with fixed numbers to catch typos at compile
time. We could even rename single values later on and the ABI will still be
stable.
> A similar thing could be done with user settable options in ftdi_context
> and with ftdi_context opaque we should have a stable ABI.
>
> Any thoughts
Could work. I'm just not sure if the effort is worth the increased
API usage complication. Also we need to check if this would
work for all configuration values.
Thomas
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|