Skip to content

Commit

Permalink
docs: Backport PR #725 to V1 docs. (#735)
Browse files Browse the repository at this point in the history
Original commit title: docs: fix missing pin methods and improve docs (#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 <matt.hillsdon@microbit.org>
  • Loading branch information
microbit-carlos and microbit-matt-hillsdon committed Apr 19, 2022
1 parent 815b08c commit 072c5a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/pin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ its own to that.
Returns the pin mode. When a pin is used for a specific function, like
writing a digital value, or reading an analog value, the pin mode
changes. Pins can have one of the following modes: ``MODE_UNUSED``,
``MODE_WRITE_ANALOG``, ``MODE_READ_DIGITAL``, ``MODE_WRITE_DIGITAL``,
``MODE_DISPLAY``, ``MODE_BUTTON``, ``MODE_MUSIC``, ``MODE_AUDIO_PLAY``,
``MODE_TOUCH``, ``MODE_I2C``, ``MODE_SPI``.
changes. Pins can have one of the following modes: ``"unused"``,
``"analog"``, ``"read_digital"``, ``"write_digital"``,
``"display"``, ``"button"``, ``"music"``, ``"audio"``,
``"touch"``, ``"i2c"``, ``"spi"``.

.. py:method:: write_analog(value)
Expand Down

0 comments on commit 072c5a1

Please sign in to comment.