??? 05/19/06 08:36 Read: times |
#116606 - Thanks Responding to: ???'s previous message |
Thanks Erik,
why not a "header file converter". That would be a lot harder than this header file. What to convert from and how about unsupported vs. extra functionality? Besides the user would have to perform actions to get started and learn the converter tool. I want to keep it as simple as possible. #ifdef #if are not 'helpers', they are 'unavoidable nuisances', the more you have, the more unreadable your code becomes. True if used (excessively) inside the code, but I think in this case the use is exactly what it was meant for. SFR16 is the death of many efforts. E.g. for the PCA the sequence of writing high and low is critically important, how do you propose handling that for requirements that vary (some A/Ds require the opposite?. It's even worse as this is sometimes true within one mcu for different registers (f.e. F120 MAC0B vs. DAC0). Unfortunately I have no solution for that yet. Also, some compilers require SFR16 to be to adjecent SFRs, I believe yours do not. SDCC does not require the addresses to be adjacent, but requires all addresses are given. This is what I called a fulladdr in the macros for SFRxxE (extended). The 'normal' SFR16 macro calculates the fulladdr from the one addr it is given. |