Skip to content

Commit e9ac544

Browse files
committed
Merge branch 'sam-analogInputToDigitalPin' of https://github.com/sandeepmistry/Arduino
2 parents 9795f2d + aabdb85 commit e9ac544

File tree

1 file changed

+1
-0
lines changed
  • hardware/arduino/sam/variants/arduino_due_x

1 file changed

+1
-0
lines changed

hardware/arduino/sam/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)