sys.imports External references

Discuss the Firewing language

sys.imports External references

Postby Jerry Messina » Fri Feb 22, 2013 10:40 am

Looking through the sources in the Library\sys.imports dir, I see some references in the file SysFirewing.bas such as
Code: Select all
public External sub PPSLock()

I can't find them defined anywhere. What are these, and how does the external linkage work?
Jerry Messina
 
Posts: 280
Joined: Thu Feb 14, 2013 10:16 am

Re: sys.imports External references

Postby majenko » Fri Feb 22, 2013 12:14 pm

They are (I think) in the internal Firewing object.

The PPSLock() and PPSUnlock() functions are used to enable / disable the Peripheral Pin Select functionality of the PIC24 MCU. This is used for remapping peripheral pins to specific physical pins. Locking the PPS system prevents accidental remapping of pins when you don't want it to happen.
majenko
 
Posts: 13
Joined: Thu Nov 08, 2012 8:44 pm

Re: sys.imports External references

Postby Jerry Messina » Fri Feb 22, 2013 12:38 pm

In this case (the PPS functions) I know what they do, but not where they're actually defined.

The others I can only guess at.
Jerry Messina
 
Posts: 280
Joined: Thu Feb 14, 2013 10:16 am

Re: sys.imports External references

Postby majenko » Fri Feb 22, 2013 12:46 pm

That's one for Dave then I'm afraid... I don't know the internals of the Firewing compiler :(
majenko
 
Posts: 13
Joined: Thu Nov 08, 2012 8:44 pm

Re: sys.imports External references

Postby David John Barker » Fri Feb 22, 2013 4:36 pm

You wont find the function implementations, as they are currently hard coded. Using "external" is not recommended, as the compiler currently has a narrow view of what commands it processes or lets through using "external". This may change in the future, but for now read "external" as compiler specific.
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm


Return to Language

Who is online

Users browsing this forum: No registered users and 1 guest

x