mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-14 11:29:26 +01:00
Correct NUM_DIGITAL_PINS to include analog pins
This commit is contained in:
parent
e9ac544f23
commit
c2c3f4623c
@ -56,9 +56,9 @@ extern "C"{
|
|||||||
|
|
||||||
// Number of pins defined in PinDescription array
|
// Number of pins defined in PinDescription array
|
||||||
#define PINS_COUNT (79u)
|
#define PINS_COUNT (79u)
|
||||||
#define NUM_DIGITAL_PINS (54u)
|
#define NUM_DIGITAL_PINS (66u)
|
||||||
#define NUM_ANALOG_INPUTS (12u)
|
#define NUM_ANALOG_INPUTS (12u)
|
||||||
#define analogInputToDigitalPin(p) ((p < NUM_ANALOG_INPUTS) ? (p) + NUM_DIGITAL_PINS : -1)
|
#define analogInputToDigitalPin(p) ((p < 12u) ? (p) + 54u : -1)
|
||||||
|
|
||||||
#define digitalPinToPort(P) ( g_APinDescription[P].pPort )
|
#define digitalPinToPort(P) ( g_APinDescription[P].pPort )
|
||||||
#define digitalPinToBitMask(P) ( g_APinDescription[P].ulPin )
|
#define digitalPinToBitMask(P) ( g_APinDescription[P].ulPin )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user