Skip to content

Commit 0a7234c

Browse files
committed
Changes test of GPIO number in attachInterrupt()
1 parent 8abd2a3 commit 0a7234c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp32/esp32-hal-gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ extern void __attachInterruptFunctionalArg(uint8_t pin, voidFuncPtrArg userFunc,
168168
static bool interrupt_initialized = false;
169169

170170
// makes sure that pin -1 (255) will never work -- this follows Arduino standard
171-
if (pin >= NUM_DIGITAL_PINS) return;
171+
if (pin >= SOC_GPIO_PIN_COUNT) return;
172172

173173
if(!interrupt_initialized) {
174174
esp_err_t err = gpio_install_isr_service((int)ARDUINO_ISR_FLAG);

0 commit comments

Comments
 (0)