Skip to content

Input Output with opend drain support #7022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
Rafinha29 opened this issue Jul 21, 2022 · 5 comments · Fixed by #8592
Closed
1 task done

Input Output with opend drain support #7022

Rafinha29 opened this issue Jul 21, 2022 · 5 comments · Fixed by #8592
Assignees
Labels
Area: Peripherals API Relates to peripheral's APIs. Resolution: Expired More info wasn't provided Type: Question Only question

Comments

@Rafinha29
Copy link

Board

ESP32

Device Description

DevkitC

Hardware Configuration

none

Version

latest master (checkout manually)

IDE Name

Arduino IDE

Operating System

Windows 10

Flash frequency

80Mhz

PSRAM enabled

no

Upload speed

921600

Description

I want to use the "Input output with open drain" option for GPIO configuration but its not listed in the options, from https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-gpio.h

//GPIO FUNCTIONS
#define INPUT 0x01
// Changed OUTPUT from 0x02 to behave the same as Arduino pinMode(pin,OUTPUT)
// where you can read the state of pin even when it is set as OUTPUT
#define OUTPUT 0x03
#define PULLUP 0x04
#define INPUT_PULLUP 0x05
#define PULLDOWN 0x08
#define INPUT_PULLDOWN 0x09
#define OPEN_DRAIN 0x10
#define OUTPUT_OPEN_DRAIN 0x12
#define ANALOG 0xC0

Can I pass to the pinMode() function something like "(OUTPUT | OPEN_DRAIN ) ?

Sketch

.

Debug Message

.

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@Rafinha29 Rafinha29 added the Status: Awaiting triage Issue is waiting for triage label Jul 21, 2022
@VojtechBartoska VojtechBartoska added Area: Peripherals API Relates to peripheral's APIs. Type: Question Only question and removed Status: Awaiting triage Issue is waiting for triage labels Jul 25, 2022
@VojtechBartoska
Copy link
Contributor

@P-R-O-C-H-Y can you please help with triaging and possibly answering this one? Thanks.

@P-R-O-C-H-Y
Copy link
Member

Hi @Rafinha29, even the option is not listed in the esp32-hal-gpio.h file, you can call:
pinMode( PIN , (OUTPUT_OPEN_DRAIN | INPUT)); or pinMode( PIN , (OUTPUT | OPEN_DRAIN )); like you mentioned. It should setup the pin as input/output with open drain. Feel free to test it and let us know if that worked for you :)

@P-R-O-C-H-Y P-R-O-C-H-Y added the Resolution: Awaiting response Waiting for response of author label Aug 3, 2022
@VojtechBartoska
Copy link
Contributor

any news @Rafinha29?

@Rafinha29
Copy link
Author

Sorry I didn't have the time to try it yet, finally I used two GPIO

@P-R-O-C-H-Y
Copy link
Member

@Rafinha29 I am closing this as there is no reply from you for a long time. If you still need some help, feel free to reopen this :)

Repository owner moved this from Under investigation to Done in Arduino ESP32 Core Project Roadmap Nov 15, 2022
@P-R-O-C-H-Y P-R-O-C-H-Y added Resolution: Expired More info wasn't provided and removed Resolution: Awaiting response Waiting for response of author labels Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Peripherals API Relates to peripheral's APIs. Resolution: Expired More info wasn't provided Type: Question Only question
Projects
Development

Successfully merging a pull request may close this issue.

3 participants