Skip to content

Commit c847a7e

Browse files
Fix NUM_DIGITAL_PINS
Previously, this was 23, which is the number of the last regular digital pin instead of the number of pins (which is 24, numbered 0 - 23). Additionally, this number did not include the analog pins, which are for the purposes of this constant also digital pins.
1 parent 11b5e2a commit c847a7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

avr/variants/pinoccio/pins_arduino.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#include <avr/pgmspace.h>
2929

30-
#define NUM_DIGITAL_PINS 23
30+
#define NUM_DIGITAL_PINS 32
3131
#define NUM_ANALOG_INPUTS 8
3232
#define analogInputToDigitalPin(p) ((p < 8) ? (p) + 24 : -1)
3333
#define digitalPinHasPWM(p) ((p) == 2 || (p) == 3 || (p) == 4 || (p) == 5 || (p) == 21 || (p) == 22 || (p) == 23)

0 commit comments

Comments
 (0)