Hi Evan, On Tuesday, 6. December 2011 22:59:24 [email protected] wrote: > Perhaps something like: > > enum ftdi_interface > { > INTERFACE_ANY = 0, > > INTERFACE_A = 0x10, > INTERFACE_B = 0x20, > INTERFACE_C = 0x40, > INTERFACE_D = 0x80, > INTERFACE_A_OR_B = INTERFACE_A | INTERFACE_B, > INTERFACE_A_OR_C = INTERFACE_A | INTERFACE_C, > INTERFACE_A_OR_D = INTERFACE_A | INTERFACE_D, > INTERFACE_B_OR_C = INTERFACE_B | INTERFACE_C, > INTERFACE_B_OR_D = INTERFACE_B | INTERFACE_D, > INTERFACE_C_OR_D = INTERFACE_C | INTERFACE_D, > INTERFACE_A_OR_B_OR_C = INTERFACE_A | INTERFACE_B | > INTERFACE_C, > INTERFACE_A_OR_B_OR_D = INTERFACE_A | INTERFACE_B | > INTERFACE_D, > INTERFACE_A_OR_C_OR_D = INTERFACE_A | INTERFACE_C | > INTERFACE_D, > INTERFACE_B_OR_C_OR_D = INTERFACE_B | INTERFACE_C | > INTERFACE_D, > INTERFACE_A_OR_B_OR_C_OR_D = INTERFACE_A | INTERFACE_B | > INTERFACE_C | INTERFACE_D, > > > > > DEPRECATED_INTERFACE_A = 1, > DEPRECATED_INTERFACE_B = 2, > DEPRECATED_INTERFACE_C = 3, > DEPRECATED_INTERFACE_D = 4 > };
Ok. What would happen to INTERFACE_ANY, would it still default to INTERFACE_A? I'm not 100% sure the INTERFACE_A_OR_C stuff belongs in libftdi though I'm not fixed on this. Does anyone know how the official d2xx library handles this? > The code could be changed slightly to work with either > 'DEPRECATED_INTERFACE_x' or 'INTERFACE_x', so that there would be no > effect on existing code. > > Over time more apps will be rebuilt against the new header, and > eventually the deprecated interfaces could be removed. That might take ages ;) OTOH libftdi 1.x is the right time for (small) API breakage. Cheers, Thomas -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to [email protected]
