Is it possible to detect AVR type boards VS non-AVR boards?
In my code I have as follows to include watchdog and interrupts:
#include <avr/wdt.h> #include <avr/interrupt.h>
This is fine for the Uno, Nano or Mega 2560, however these libraries are not recognized when I compile for other boards such as the ESP8288 or ESP32. I would like to be able to add some conditional directives like this:
It would be a bit tedious to specify a list of Arduino boards with AVR_ATmega328P, AVR_ATmega2560, AVR_ATmega32U4 etc. Is there a higher level identifier to recognize the AVR prefix?