??? 06/12/10 03:09 Read: times |
#176608 - Still no luck... Responding to: ???'s previous message |
Hi,
I'm still faced with the question of how to make sections of code visible to the compiler, conditional on the prior declaration of SFRs. My problem is this: I make repeated references to the CKCON clock control SFR register in my code, so as to enable support for the X2 CPU clock operating mode. In my module's documentation I tell users how to install their own X2 CPU clock mode compatible, controller SFR register declaration header file, so that CKCON will be declared and the X2 mode code will compile. Now I find that some controllers add a second clock control register called CKCON1, and that they inconveniently rename the original CKCON clock control register as CKCON0. The minute a register declaration header file for one of these controllers is substituted, my code breaks and I get the usual e-mail bombing. One solution to the issue may simply be to add a long-winded set of instructions on how to deal with the occurence in my software manual. What I might prefer, however, is a method to selectively reference the variously named clock control register, depending on how it is named and declared in whatever SFR register definition header file may be in use. Any valuable thoughts, anyone? Regards, Murray R. Van Luyn. |