On Sat, Nov 13, 2010 at 05:33:56AM +0100, Carl-Daniel Hailfinger wrote:
On 12.11.2010 13:44, Joerg Mayer wrote:
On Fri, Nov 12, 2010 at 12:52:14PM +0100, Carl-Daniel Hailfinger wrote:
#if (defined TYPE_2232H and defined TYPE_4232H)
- if (ftdic->type != TYPE_2232H && ftdic->type != TYPE_4232H) {
msg_pdbg("FTDI chip type %d is not high-speed\n",
ftdic->type);
clock_5x = 0;
- }
#endif
That doesn't work because TYPE_2232H is an enum.
...
Any other ideas?
Just the normal stuff that cmake and configure do: Add a check outside the file, then #define a preprocessor variable, then guard the code with that variable. If there is real interest, I'd be willing to create the necessary cmake stuff for review - it may take up to two weeks because of travel and work for me to provide a first patch.
Ciao Joerg