Anniyan_x
Member
Code:
1) #define DEBUG_PRINTS(x) {(rom const char)table[][20] = x; putrsUSART("x");}
2) #define DEBUG_PRINTS(x) putrsUSART( (const far rom char *)"\n\rx.\n\r" );
3) #define DEBUG_PRINTS(x) (rom const char *rom table2[] = {"x"}; putrsUSART("x");)
hi refering to the above codes, i planning to have a debug print on UART, by just making the debug print statement as a macro can can be used in any functions in any c files to print out any debug statements by just defining it as DEBUG_PRINTS(uart is ok); or DEBUG_PRINTS(TIMER IS RUNNING); . anyway i tried above 3 routine which didnt compile and have syntax error except for number 2 which prints only x although i put other character in it, i trully dont have any idea and just using trial and error way to find a working code..hope somebody can suggest on this.
Last edited: