By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,985 Members | 1,863 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,985 IT Pros & Developers. It's quick & easy.

error " macro names must be identifiers"

P: 1
code:
volatile*boolean*TurnDetected;**//*need*volatile *
for *Interrupts
volatile*boolean*up;]
const*int*PinCLK = 2;*** //*Generating*interrupts*us ing*CLK*signal
const*int*PinDT = 3;**** //*Reading*DT*signal
const*int*PinSW = 4;**** //*Reading*Push*Button*swit ch *

//*L9110*connections
#define*L9110_B_IA*10*//*Pin*D10***>*Motor*B*Input*A
#define*L9110_B_IB*11*//*Pin*D11***>*Motor*B*Input*B *

//*Motor*Speed*&*Direction
#define*MOTOR_B_PWM*L9110_B_IA*//*Motor*PWM*Speed
#define*MOTOR_B_DIR*L9110_B_IB //*Motor*Direction *

//*Interrupt*routine*runs*if*CLK*goes*from*HIGH*t o*LOW
void*isr*()*
Sep 20 '16 #1
Share this Question
Share on Google+
2 Replies


weaknessforcats
Expert Mod 5K+
P: 9,197
You can't use a keyword from the C/C++ language as an identifier.

The * is part of C/C++.
Sep 21 '16 #2

Expert 100+
P: 2,396
Presumably a lot of the asterisks in your code listing are actually spaces. I suppose you changed the spaces to asterisks to unambiguously indicate where the spaces are. That actually makes your code impossible to read. Please put back the spaces.

Please use CODE tags when you provide code listings.
Sep 21 '16 #3

Post your reply

Sign in to post your reply or Sign up for a free account.