summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/library/pyb.Pin.rst13
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/library/pyb.Pin.rst b/docs/library/pyb.Pin.rst
index 3d019cd8e..6465653f7 100644
--- a/docs/library/pyb.Pin.rst
+++ b/docs/library/pyb.Pin.rst
@@ -98,11 +98,11 @@ Class methods
Methods
-------
-.. method:: Pin.init(mode, pull=Pin.PULL_NONE, af=-1)
+.. method:: Pin.init(mode, pull=Pin.PULL_NONE, \*, value=None, alt=-1)
Initialise the pin:
- - ``mode`` can be one of:
+ - *mode* can be one of:
- ``Pin.IN`` - configure the pin for input;
- ``Pin.OUT_PP`` - configure the pin for output, with push-pull control;
@@ -111,14 +111,17 @@ Methods
- ``Pin.AF_OD`` - configure the pin for alternate function, open-drain;
- ``Pin.ANALOG`` - configure the pin for analog.
- - ``pull`` can be one of:
+ - *pull* can be one of:
- ``Pin.PULL_NONE`` - no pull up or down resistors;
- ``Pin.PULL_UP`` - enable the pull-up resistor;
- ``Pin.PULL_DOWN`` - enable the pull-down resistor.
- - when mode is ``Pin.AF_PP`` or ``Pin.AF_OD``, then af can be the index or name
- of one of the alternate functions associated with a pin.
+ - *value* if not None will set the port output value before enabling the pin.
+
+ - *alt* can be used when mode is ``Pin.AF_PP`` or ``Pin.AF_OD`` to set the
+ index or name of one of the alternate functions associated with a pin.
+ This arg was previously called *af* which can still be used if needed.
Returns: ``None``.