Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years ago.
DigitalOut and open drain
Hi everybody. Is there a way to setup a DigitalOut as OpenDrain mode? I see the OpenDrain mode is available only as DigitalIn. Can someone suggest me the right way?
Regards.
2 Answers
8 years ago.
OpenDrain mode doesnt make sense on a DigitalIn. The API doesnt seem to have a mode option for the DigitalOut class. You could try the DigitalInOut instead and use it as output only: See here. The DigitalInOut supports a mode selection parameter, but I have never tested it to see if it works.
8 years ago.
Use DigitalInOut (https://developer.mbed.org/handbook/DigitalInOut) and set the mode to open drain,