I have been searching through the internet for an example on how to use the #ifdef command. I am confident I don't fully understand how it works. From what I have read, #ifdef just checks to see if is defined. But I wish to check to see what it is defined as. For my application, I am constantly going from an 800x480 screen and a 320x240 screen. All I simply want to do is change the #define SCREEN so that way I am not going through the code and updating values nor am I having to make dual codes. I can make all changes to single sketch. So basically, what is the correct way to do the following? I am pretty sure it is obvious what it is I am trying to do, it is just not correct of course.
#define SCREEN ITDB32S
#ifdef SCREEN
if (SCREEN == ITDB50) {
#define n 25
#define X_c 745
#define Y_c 457
#define X_t 80
#define Y_t 48
}
else {
#define n 10
#define X_c 298
#define Y_c 226
#define X_t 32
#define Y_t 24
}
#endif