File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ extern "C"
57
57
#define NUM_DIGITAL_PINS (14u)
58
58
#define NUM_ANALOG_INPUTS (6u)
59
59
#define NUM_ANALOG_OUTPUTS (1u)
60
+ #define analogInputToDigitalPin (p ) ((p < NUM_ANALOG_INPUTS) ? (p) + NUM_DIGITAL_PINS : -1)
60
61
61
62
#define digitalPinToPort (P ) ( &(PORT->Group[g_APinDescription[P].ulPort]) )
62
63
#define digitalPinToBitMask (P ) ( 1 << g_APinDescription[P].ulPin )
Original file line number Diff line number Diff line change 40
40
#define NUM_DIGITAL_PINS (15u)
41
41
#define NUM_ANALOG_INPUTS (7u)
42
42
#define NUM_ANALOG_OUTPUTS (1u)
43
+ #define analogInputToDigitalPin (p ) ((p < NUM_ANALOG_INPUTS) ? (p) + NUM_DIGITAL_PINS : -1)
43
44
44
45
// Low-level pin register query macros
45
46
// -----------------------------------
You can’t perform that action at this time.
0 commit comments