1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

allow to set pin to OUTPUT_OPEN_DRAIN in analogWriteMode (#7841)

* allow to set pin to OUTPUT_OPEN_DRAIN in analogWrite

* remove parameter with default value

* Update core_esp8266_wiring_pwm.cpp

* update documentation accordingly
This commit is contained in:
Michael Kluge
2021-01-27 08:56:43 +01:00
committed by GitHub
parent 53e5688453
commit f2d83ba43d
3 changed files with 14 additions and 1 deletions

View File

@ -109,6 +109,9 @@ PWM range may be changed by calling ``analogWriteRange(new_range)`` or
``analogWriteResolution(bits)``. ``new_range`` may be from 15...65535
or ``bits`` may be from 4...16.
The function ``analogWriteMode(pin, value, openDrain)`` allows to sets
the pin mode to ``OUTPUT_OPEN_DRAIN`` instead of ``OUTPUT``.
**NOTE:** The default ``analogWrite`` range was 1023 in releases before
3.0, but this lead to incompatibility with external libraries which
depended on the Arduino core default of 256. Existing applications which