I'm using v2.7.3 on a Nano. This is the code:
Code: Select all
#define HEARTBEAT_PIN 12 // Heartbeat LED pin.
#define GPIO_FUNCTION(p) (PIN_ ## p ## _GPIO)
...
Pins[HEARTBEAT_PIN].function( GPIO_FUNCTION( HEARTBEAT_PIN ) );
Why doesn't the 'p' in the macro get replaced with the number 12?