2008/10/17, Rob Hamerling <[EMAIL PROTECTED]>:
>
> But after some datasheet reading I found out that different
> register name means in general also different functionality. So
> normalizing maybe not feasible.

Hi Rob,

I don't know the details of this specific issue, but in general
different registers mean different handling (which go beyond the the
register name).
Stef handled this by if-statements on the pic type (a constant!),
which give conditional compile. And the good thing of conditional
compile is that the compiler skips the part if it is not requires and
does not generate errors on non-existing registers.

To make this construct better maintainable, we could add a level of
indirection by  defining a 'version number' for a peripheral and
assign this (constant) based on the pic type.

Afaik there is no way to detect if a specific register name exists
(without generating an error if it does not), so determining the
version based on the register occurance is not possible for the
compiler. We could make this part of the include-generation. But this
gives an extra depency, makes it more complex to understand and puts
an additional burden on the maintainer of the conversion script.

Joep

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to