8000 doc for pin in Counter.init, try #2 · tve/micropython@60a505a · GitHub
[go: up one dir, main page]

Skip to content

Commit 60a505a

Browse files
committed
doc for pin in Counter.init, try #2
1 parent 3ac6ce5 commit 60a505a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/library/machine.Counter.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@ Methods
5252

5353
.. method:: Counter.init(pin, direction=Counter.UP, edge=Counter.RISING, limit=None, reset=True)
5454

55-
Initialise a counter by connecting it to an input pin. Optionally specify the
55+
Initialise a counter by connecting it to an input pin.
56+
The input pin can be specified as a pin number (int), a pin name (str), or a Pin object
57+
(however, some ports may limit the choice, the ESP32 in particular).
58+
Optionally specify the
5659
counting direction and whether the rising or falling edge should be counted.
5760
Additional keyword parameters can customize the counter:
58-
- ``pin``: the input pin, either a pin number (int), a pin name (str), or a Pin object
59-
(note, however, that some ports may limit the choice, ESP32 in particular)
6061
- ``direction``: Counter.UP, Counter,DOWN
6162
- ``edge``: Counter.RISING, Counter.FALLING, Counter.BOTH
6263
- ``limit``: when counting up the register is reset to zero at the next edge after

0 commit comments

Comments
 (0)
0