Hi Joep,

Joep Suijs wrote:
> 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.
> 
> 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).

Microchip's intentions are not always obvious (to me).

> 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.

Stef's libs were for the old JAL. JalV2 is better, see below.


> 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. 

With 'if defined(<name>)' you can check if <name> is a known variable. 
This allows conditional compilation based on the existence of registers.

But this is not where I was looking for. I thought I could define an 
alias for the 'new' comparator registers to make them known as the old 
comparator registers (like I declare an alias PORTA for GPIO). But this 
should not be done for registers with a different functionality.

Regards, Rob.





-- 
Rob Hamerling, Vianen, NL (http://www.robh.nl/)

--~--~---------~--~----~------------~-------~--~----~
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