Hi. I have a shared code between the esp32 and the host system. I was seeking a way of knowing when a code is being compiled for esp32, I know I could do somethine like
Code: Select all
#if defined(__linux__) || defined(__APPLE__)
#else
#endif
but as this code may be compiled also for windows and maybe BSD I would prefer to have something like "#if defined(__esp32__)" but I didn't found any documentation regarding this. Someone has done something similar or knows if esp-idf defines something like that?
Thank you very much