Skip to content

Commit 6a6cc1f

Browse files
committed
Change OUTPUT to INPUT_OUTPUT
To match the official Arduino API.
1 parent 45b7fa0 commit 6a6cc1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp32/esp32-hal-gpio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ extern "C" {
4242

4343
//GPIO FUNCTIONS
4444
#define INPUT 0x01
45-
#define OUTPUT 0x02
45+
#define OUTPUT 0x03 //Changed from 0x02 to behave the same as Arduino pinMode(pin,OUTPUT) where yo ucan read the state of pin even when it is set as OUTPUT
4646
#define PULLUP 0x04
4747
#define INPUT_PULLUP 0x05
4848
#define PULLDOWN 0x08

0 commit comments

Comments
 (0)