ESP8266/32 names

Hey everybody,

I am making a library and i did one section of code which runs if the board is... Now I have arduino mega because it was the only one i can find this type of name. Code:

#if defined(AVR_ATmega1280) || defined(AVR_ATmega2560)

//some code

#endif

In front of theese names (atmega 1280 and 2860) I need names for esp8266 and 32.
Anyone can help?

Thanks for help,
Tomas

For ESP8266, you can use the ESP8266 macro. For ESP32, you can use the ESP32 macro:

#if defined(ESP8266) || defined(ESP32)

Thanks it works!

You’re welcome. I’m glad if I was able to be of assistance. Enjoy!
Per

pert:
You're welcome. I'm glad if I was able to be of assistance. Enjoy!
Per

Ohh again you WTFF?