Skip to content

Commit fb60efd

Browse files
authored
Change pinMode OUTPUT to INPUT_OUTPUT (espressif#6602)
* Change OUTPUT to INPUT_OUTPUT To match the official Arduino API.
1 parent 12045d3 commit fb60efd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cores/esp32/esp32-hal-gpio.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ extern "C" {
4242

4343
//GPIO FUNCTIONS
4444
#define INPUT 0x01
45-
#define OUTPUT 0x02
45+
// Changed OUTPUT from 0x02 to behave the same as Arduino pinMode(pin,OUTPUT)
46+
// where you can read the state of pin even when it is set as OUTPUT
47+
#define OUTPUT 0x03
4648
#define PULLUP 0x04
4749
#define INPUT_PULLUP 0x05
4850
#define PULLDOWN 0x08

0 commit comments

Comments
 (0)