I'm writing a code which uses direct port manipulation. Since ports on Uno and Leonardo are different and I want to maintain compatibility, is this the correct way of doing it?
#if defined(AVR_ATmega32U4)
#define LEONARDO
#else
#define UNO
#endif