[Icc-avr] #define problem
John Baraclough
j_baraclough at zetnet.co.uk
Mon Sep 24 16:48:18 PDT 2007
Hi Sylvain,
The compiler already defines a macro such as -DATmega8. The
definition is a direct copy of the string contained in the
'Project->Options->Device Configuration' list box. All you need to do is:
#ifdef ATmega8
#include <iom8v.h>
#endif
Don't forget that the macro is case sensitive and you must copy the
string exactly.
All the best for now,
John
At 00:21 25/09/2007, you wrote:
>Hi,
>
> Is there a way to do
>
>#define MEGATYPE "Mega8"
>
>#if (MEGATYPE == "Mega8")
> #include "iom8v.h"
>#endif
>
>Thanks for your time
>Sylvain Bissonnette
More information about the Icc-avr
mailing list