From 4517b9c8fcae62d9adad15e204a1789fab7a69cd Mon Sep 17 00:00:00 2001 From: Patrick Grawehr Date: Mon, 21 Feb 2022 09:24:14 +0100 Subject: [PATCH] The M5Core2 and M5Tough have 40 pins (#6315) Summary The M5Core2 and the very similar M5Tough have 40 digital pins See reference here: https://docs.m5stack.com/en/core/core2 as well as the constant declarations in the bottom part of the file. Impact Without this, Code that needs the total number of pins (e.g. firmata) doesn't show the higher pin numbers correctly. --- variants/m5stack_core2/pins_arduino.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variants/m5stack_core2/pins_arduino.h b/variants/m5stack_core2/pins_arduino.h index 2bba712e..895c7c0d 100644 --- a/variants/m5stack_core2/pins_arduino.h +++ b/variants/m5stack_core2/pins_arduino.h @@ -4,7 +4,7 @@ #include #define EXTERNAL_NUM_INTERRUPTS 16 -#define NUM_DIGITAL_PINS 20 +#define NUM_DIGITAL_PINS 40 #define NUM_ANALOG_INPUTS 16 #define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)