Other Parts Discussed in Thread: PGA970
Hello,
Im using a PGA970 microcontroller and am programming it with C in CCS 10. My code is working so far but i decided to implement a debugmode . The theory seems very simple , if you write 1 to Debugmode when its defined it should compile "doSomething" if there is a 0 it shouldnt. But both configurations compile "doSomething" and run the code. Did I misunderstand something there or is my setup not capable of using #ifdef?
#define Debugmode 0 // For Debugging turn Debugmode ON //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- void main(void) { init(); while(1) { #ifdef Debugmode doSomething(); #endif } }
Regards,
Paul