Skip to content

Commit d9bd370

Browse files
committed
revert IS_PIN_ANALOG
1 parent d72508e commit d9bd370

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libraries/Firmata/Boards.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,8 @@ writePort(port, value, bitmask): Write an 8 bit port.
786786
#define TOTAL_PINS 32
787787
#define VERSION_BLINK_PIN LED_BUILTIN
788788
#define IS_PIN_DIGITAL(p) ((p) >= 2 && (p) < TOTAL_PINS)
789-
#define IS_PIN_ANALOG(p) ( (2 <= (p) && (p) <= 5) || (28 <= (p) && (p) <= 31) )
789+
#define IS_PIN_ANALOG(p) ((p) == PIN_A0 || (p) == PIN_A1 || (p) == PIN_A2 || (p) == PIN_A3 || \
790+
(p) == PIN_A4 || (p) == PIN_A5 || (p) == PIN_A6 || (p) == PIN_A7)
790791
#define IS_PIN_PWM(p) digitalPinHasPWM(p)
791792
#define IS_PIN_SERVO(p) IS_PIN_DIGITAL(p)
792793
#define IS_PIN_I2C(p) ((p) == PIN_WIRE_SDA || (p) == PIN_WIRE_SCL)

0 commit comments

Comments
 (0)