Skip to content

Commit d44eee2

Browse files
committed
Merge branch 'sam-analogInputToDigitalPin' of https://github.com/sandeepmistry/Arduino
2 parents 82cf546 + ff4e274 commit d44eee2

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)