Skip to content

Commit 01ea7b3

Browse files
committed
esp32/machine_timer.c: Add find free timer id.
``id`` of -2 selects the ``id`` of a free timer. Check the timer `id` range. Check if the timer is already in use. Signed-off-by: IhorNehrutsa <[email protected]>
1 parent 2762fe6 commit 01ea7b3

File tree

14 files changed

+50
-21
lines changed

14 files changed

+50
-21
lines changed

docs/library/machine.Timer.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Constructors
3232

3333
Construct a new timer object of the given ``id``. ``id`` of -1 constructs a
3434
virtual timer (if supported by a board).
35+
``id`` of -2 selects the ``id`` of a free timer (Supported at ESP32 port).
3536
``id`` shall not be passed as a keyword argument.
3637

3738
See ``init`` for parameters of initialisation.

lib/berkeley-db-1.xx

Submodule berkeley-db-1.xx updated 212 files

lib/libffi

Submodule libffi updated 324 files

lib/lwip

Submodule lwip updated 572 files

lib/mbedtls

lib/micropython-lib

Submodule micropython-lib updated 237 files

lib/nxp_driver

Submodule nxp_driver updated 3170 files

lib/pico-sdk

Submodule pico-sdk updated 1050 files

0 commit comments

Comments
 (0)