Search the web
Sign In
New User? Sign Up
jallist · JAL mailing list
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
aliasinga pseudo variable   Message List  
Reply | Forward Message #26968 of 27404 |
Re: [jallist] Re: aliasinga pseudo variable


Hi Kyle,

[RobH]
>> I've tried it and is seems to work: declaring and using an alias for a
>> pseudo-variable. But just to make sure, is this 'legal'?

[Kyle]
> I'd never thought about it. I suppose there's no reason it shouldn't work.


Some background info for my question:

Some PICs (esp. in the baseline) have no memory mapped TRISIO register.
So it is not possible to declare (let's say for the 10F222) a var like:
var volatile bit pin_A0_direction at TRISIO : 0
to be able to use (in any library) a statement like:
pin_A0_direction = OUTPUT
To make this possible I declare a pseudo variable 'pin_A0_direction'
with the required statements (in Assembler).

So far so good, but now I want (in an ADC library) to access pin_AN0,
which is an alias of pin_A0 (for the 10F222, for others it may be a
different pin), and also to set its direction with the name
pin_AN0_direction. So I declare aliases like:
var volatile bit pin_AN0 is pin_A0
var volatile bit pin_AN0_direction is pin_A0_direction.
independent whether pin_A0 and pin_A0_direction are real or a pseudo
variables.

There are more situations where it is useful to declare an alias to a
pseudo variable. Hopefully you understand (better) the usefulness and
the importance for me to be reassured!

Regards, Rob.



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




Fri Jul 3, 2009 9:09 am

digithalys
Offline Offline
Send Email Send Email

Forward
Message #26968 of 27404 |
Expand Messages Author Sort by Date

Hi Kyle, I've tried it and is seems to work: declaring and using an alias for a pseudo-variable. But just to make sure, is this 'legal'? Regards, Rob. -- Rob...
Rob Hamerling
digithalys
Offline Send Email
Jul 1, 2009
8:59 am

Greetings, ... I'd never thought about it. I suppose there's no reason it shouldn't work. --kyle...
zmafoox
Offline Send Email
Jul 3, 2009
5:50 am

Hi Kyle, [RobH] ... [Kyle] ... Some background info for my question: Some PICs (esp. in the baseline) have no memory mapped TRISIO register. So it is not...
Rob Hamerling
digithalys
Offline Send Email
Jul 3, 2009
9:10 am

... IIRC in the old pre-Kyle Jal (which used only bank0 directly) tris always worked that way. -- Wouter van Ooijen --...
Wouter van Ooijen
wvooijen
Offline Send Email
Jul 3, 2009
12:15 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help