In: Electrical Engineering
What is the use of open drain on a GPIO output pin?
In open drain mode, pin can not output excessive level (logical 1) on the line. It can both output low level (logical zero) or be in excessive-impedance state (logically disconnected). In high-impedance, pin does now not have an effect on the sign stage on the road. A pull-up resistor pulls the line to excessive voltage degree while all outputs are in high-impedance. The Open Drain Mode can be enabled/disabled on each output pin individually. To activate this feature, use the DlnGpioPinOpendrainEnable() function. To disable it, use the DlnGpioPinOpendrainDisable() function. If a pin is not assigned to the GPIO module, your settings are saved in the internal memory and will be applied when you assign the pin to the GPIO module. By default, the Open Drain Mode is disabled on all pins.
GPIO Interface functions to control and monitor the Open Drain Mode:
1. DlnGpioPinOpendrainEnable() - Enables the Open Drain mode on a pin.
2. DlnGpioPinOpendrainDisable() - Disables the Open Drain mode on a pin.
3. DlnGpioPinOpendrainIsEnabled() - Determines whether the Open Drain mode in enabled on a pin.