
16-02-2005, 15:39
|
 |
 |
Why did I come back?
AKA: Jamie Bliss
 FRC #4967 (That ONE Team)
Team Role: Mentor
|
|
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
|
|
|
Re: Syntax Error: externs, structs, and macros
Quote:
|
Originally Posted by Orborde
Code:
#define MOTOR(type,pwm,oi,pot,pot_min,pot_max,pot_center,p wm_min,pwm_max,pwm_change) {type, &pwm, &oi, pot, pot_min, pot_max, pot_center, pwm_min, pwm_max, pwm_change },
Might it be the marked bit?
|
Nope. That's just from the post. Try as I did, I couldn't get rid of it. But it doesn't exist in the file.
Quote:
|
Originally Posted by Dave Flowerday
I didn't spot anything wrong off-hand (other than the space noted by the previous poster, but I'm guessing that was a copy/paste problem?). Something you might try to narrow down the problem is pre-processing the C file to see how your macros worked out. There should be a cpp18.exe as part of the MCC18 package - this is the C preprocessor. Just run:
Code:
cpp18 {filename}.c -I{path to MCC18 include directory} > {filename}.pre
and it will spit the preprocessed file out to {filename}.pre. That might yield some clues.
|
Cool! Thanks! I'll try that! 
|