Skip to content

Commit ff4e274

Browse files
committed
Port analogInputToDigitalPin macro to SAM core
1 parent c1bdae7 commit ff4e274

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

variants/arduino_due_x/variant.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ extern "C"{
5858
#define PINS_COUNT (79u)
5959
#define NUM_DIGITAL_PINS (54u)
6060
#define NUM_ANALOG_INPUTS (12u)
61+
#define analogInputToDigitalPin(p) ((p < NUM_ANALOG_INPUTS) ? (p) + NUM_DIGITAL_PINS : -1)
6162

6263
#define digitalPinToPort(P) ( g_APinDescription[P].pPort )
6364
#define digitalPinToBitMask(P) ( g_APinDescription[P].ulPin )

0 commit comments

Comments
 (0)