Hi,
Looking at Rob's wiki page and device files, it appears some PICs
(18f4480.jal, 18f448.jal, 18f4580.jal, 18f4585.jal, 18f458.jal, 18f4680.jal,
18f4682.jal, 18f4685.jal) have both a CCP1CON *and* ECCP1CON register.
If CCP1CON has precedence over ECCP1CON, then in pwm_hardware.jal, I can
create your alias as:
if(defined(CCP1CON) == true) then
include pwm_ccp1
elsif(defined(ECCP1CON)) == true then
var byte CCP1CON is ECCP1CON
include pwm_ccp1
end if
If not, that is, if ECCP1CON has precedence over CCP1CON, I can't create any
aliases ("ECCP1CON is CCP1CON") since it already exists. If precedence
depends on PICs, I need to parse datasheets :)
Cheers,
Seb
>
> That won't work, because the library itself uses CCPON1 rather than
> ECCPCON1, however, defining the alias can work
>
> if !defined(ECCPCON1) then
> var volatile byte CCP1CON is ECCP1CON
> end if
>
>
>
--
Sébastien Lelong
http://www.sirloon.net
http://sirbot.org
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---