Ok so I am working on some embedded code to go on a msp430 launch pad, I was trying to toggle a pin high and I ran into an issue when I began trying to use one of the macros in the header file which was also in a specific namespace in the main.cpp file. I assumed I could use the same convention as say to call a function in that namespace for call a macro? The code would not compile until I declared using namespace, instead of msp430:: like I wanted since I have 3 different namespaces in the header file. is there not a way to do this without declaring the using namespace? I can do it with variables from a namespace as well so I don't see what I could not with a simple macro def.
expected unqualified-id before token
//section from the header file
#define P4DIR_m *((unsigned int volatile*)0x0224u)
#define P8OUT_m *((unsigned int volatile*)0x0262u)
#define P8DIR_m *((unsigned int volatile*)0x0264u)
#define P1DIR_m *((unsigned int volatile*)0x0204u)
#define LEDOUT_m *((unsigned int volatile*)0x0202u) //this line gives the error
//----------main.cpp
//code that called the macro orginally
msp430::LEDOUT_m |= 0x01; //this failed
//new code
using namespace msp430;
LEDOUT_m |= 0x01; // this worked but I don't want to do this as I have other namespaces