Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
0e445870
Commit
0e445870
authored
Feb 01, 2021
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs/library/machine.Pin.rst: Make it clear which methods are not core.
Signed-off-by:
Damien George
<
damien@micropython.org
>
parent
195e7dfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
21 deletions
+37
-21
docs/library/machine.Pin.rst
docs/library/machine.Pin.rst
+37
-21
No files found.
docs/library/machine.Pin.rst
View file @
0e445870
...
@@ -33,8 +33,8 @@ Usage Model::
...
@@ -33,8 +33,8 @@ Usage Model::
# read and print the pin value
# read and print the pin value
print(p2.value())
print(p2.value())
# reconfigure pin #0 in input mode
# reconfigure pin #0 in input mode
with a pull down resistor
p0.
mode(p0.I
N)
p0.
init(p0.IN, p0.PULL_DOW
N)
# configure an irq callback
# configure an irq callback
p0.irq(lambda p:print(p))
p0.irq(lambda p:print(p))
...
@@ -160,25 +160,6 @@ Methods
...
@@ -160,25 +160,6 @@ Methods
Set pin to "0" output level.
Set pin to "0" output level.
.. method:: Pin.mode([mode])
Get or set the pin mode.
See the constructor documentation for details of the ``mode`` argument.
.. method:: Pin.pull([pull])
Get or set the pin pull state.
See the constructor documentation for details of the ``pull`` argument.
.. method:: Pin.drive([drive])
Get or set the pin drive strength.
See the constructor documentation for details of the ``drive`` argument.
Not all ports implement this method.
Availability: WiPy.
.. method:: Pin.irq(handler=None, trigger=(Pin.IRQ_FALLING | Pin.IRQ_RISING), *, priority=1, wake=None, hard=False)
.. method:: Pin.irq(handler=None, trigger=(Pin.IRQ_FALLING | Pin.IRQ_RISING), *, priority=1, wake=None, hard=False)
Configure an interrupt handler to be called when the trigger source of the
Configure an interrupt handler to be called when the trigger source of the
...
@@ -220,6 +201,41 @@ Methods
...
@@ -220,6 +201,41 @@ Methods
This method returns a callback object.
This method returns a callback object.
The following methods are not part of the core Pin API and only implemented on certain ports.
.. method:: Pin.low()
Set pin to "0" output level.
Availability: nrf, rp2, stm32 ports.
.. method:: Pin.high()
Set pin to "1" output level.
Availability: nrf, rp2, stm32 ports.
.. method:: Pin.mode([mode])
Get or set the pin mode.
See the constructor documentation for details of the ``mode`` argument.
Availability: cc3200, stm32 ports.
.. method:: Pin.pull([pull])
Get or set the pin pull state.
See the constructor documentation for details of the ``pull`` argument.
Availability: cc3200, stm32 ports.
.. method:: Pin.drive([drive])
Get or set the pin drive strength.
See the constructor documentation for details of the ``drive`` argument.
Availability: cc3200 port.
Constants
Constants
---------
---------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment