|
Page 1 of 1
|
[ 4 posts ] |
|
Question about RobotCIntrinsics.c
| Author |
Message |
|
RoboDesigners
Novice
Joined: Sat Jul 10, 2010 3:06 pm Posts: 86 Location: Roanoke, VA
|
 Question about RobotCIntrinsics.c
I was browsing through the file RobotCIntrinsics.c, and noticed that it contains intrinsics for the NXT (starting ~line 680). As I was operating in ROBOTC for Cortex/PIC, I was wondering why the intrinsics file contains this section.
Is there a particular reason, or is this an artifact of ROBOTC?
//Andrew
_________________Check out my website! www.RoboDesigners.comVRC Team 2190 Twitter: @RoboDesigners
|
| Wed Mar 07, 2012 7:36 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2862 Location: Rotterdam, The Netherlands
|
 Re: Question about RobotCIntrinsics.c
No, if you look carefully you will see that sections are demarked with precompile pragmas that will compile certain parts into your program, depending on which platform you're currently using. Some sections apply to multiple platforms, others just to one.
- Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Sat Mar 10, 2012 2:50 pm |
|
 |
|
RoboDesigners
Novice
Joined: Sat Jul 10, 2010 3:06 pm Posts: 86 Location: Roanoke, VA
|
 Re: Question about RobotCIntrinsics.c
Ok. That makes more sense... //Andrew
_________________Check out my website! www.RoboDesigners.comVRC Team 2190 Twitter: @RoboDesigners
|
| Sat Mar 10, 2012 9:31 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2862 Location: Rotterdam, The Netherlands
|
 Re: Question about RobotCIntrinsics.c
I use a similar technique in my driver suite. All of my drivers that can potentially be used with a Sensor MUX have the code for it. However, it's not until you include a very specific driver file (the one for the actual SMUX itself) that this code becomes compiled into your program. That saves space and it saves me the hassle of having to maintain many different driver files that share quite a lot of common code.
- Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Sun Mar 11, 2012 2:57 am |
|
|
|
Page 1 of 1
|
[ 4 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|