Skip to content

Commit 072c5a1

Browse files
docs: Backport PR bbcmicrobit#725 to V1 docs. (bbcmicrobit#735)
Original commit title: docs: fix missing pin methods and improve docs (bbcmicrobit#725) Original commit hash: caa8e1c - ~~fix missing space in directive that caused methods to be omitted.~~ - recast the get_mode() return values as their Python values rather than C names which aren't defined in Python. - ~~remove duplicate class definition for MicroBitAnalogDigitalPin.~~ Cherry-picked from the v2-docs branch. Co-authored-by: Matt Hillsdon <[email protected]>
1 parent 815b08c commit 072c5a1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/pin.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ its own to that.
152152
153153
Returns the pin mode. When a pin is used for a specific function, like
154154
writing a digital value, or reading an analog value, the pin mode
155-
changes. Pins can have one of the following modes: ``MODE_UNUSED``,
156-
``MODE_WRITE_ANALOG``, ``MODE_READ_DIGITAL``, ``MODE_WRITE_DIGITAL``,
157-
``MODE_DISPLAY``, ``MODE_BUTTON``, ``MODE_MUSIC``, ``MODE_AUDIO_PLAY``,
158-
``MODE_TOUCH``, ``MODE_I2C``, ``MODE_SPI``.
155+
changes. Pins can have one of the following modes: ``"unused"``,
156+
``"analog"``, ``"read_digital"``, ``"write_digital"``,
157+
``"display"``, ``"button"``, ``"music"``, ``"audio"``,
158+
``"touch"``, ``"i2c"``, ``"spi"``.
159159

160160
.. py:method:: write_analog(value)
161161

0 commit comments

Comments
 (0)