Skip to content

Commit bdc5b8a

Browse files
author
blue-2357
committed
Fix wrong bitmask returned for pins above 31
1 parent e364f03 commit bdc5b8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp32/Arduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
#define _BV(b) (1UL << (b))
106106

107107
#define digitalPinToPort(pin) (((pin)>31)?1:0)
108-
#define digitalPinToBitMask(pin) (1UL << (((pin)>31)?((pin)-31):(pin)))
108+
#define digitalPinToBitMask(pin) (1UL << (((pin)>31)?((pin)-32):(pin)))
109109
#define digitalPinToTimer(pin) (0)
110110
#define analogInPinToBit(P) (P)
111111
#define portOutputRegister(port) ((volatile uint32_t*)((port)?GPIO_OUT1_REG:GPIO_OUT_REG))

0 commit comments

Comments
 (0)