??? 06/08/10 00:41 Read: times |
#176494 - Conditional SFR Declaration? |
Hi,
In Keil C, how do I conditionally only declare a SFR in circumstances where it has not previously been declared? I tried the following, but it appears that previous declarations of the CKCON SFR are not recognised as a 'definition', hence the compiler flags a redefinition error: /* * Clock control register declaration (for when available and not previously declared). */ #ifndef CKCON sfr CKCON = 0x8F; #endif Any clues on how this might be achieved would be sincerely appreciated. Regards, Murray R. Van Luyn. |