Skip to content

Text correction of timer.rst #8074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions docs/source/api/timer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ This function is used to end timer.

* ``timer`` timer struct.

timerSetConfig
timerGetConfig
**************

This function is used to configure initialized timer (timerBegin() called).
This function is used to get configuration of initialized timer (timerBegin() called).

.. code-block:: arduino

Expand All @@ -62,6 +62,18 @@ This function is used to configure initialized timer (timerBegin() called).
This function will return ``configuration`` as uint32_t number.
This can be translated by inserting it to struct ``timer_cfg_t.val``.

timerSetConfig
**************

This function is used to configure initialized timer (timerBegin() called).

.. code-block:: arduino

void timerSetConfig(hw_timer_t *timer, uint32_t config);

* ``timer`` timer struct.
* ``config`` configuration as uint32_t number. Use configuration struct ``timer_cfg_t`` and pass ``timer_cfg_t.val`` as ``config`` paramater.

timerAttachInterrupt
********************

Expand Down Expand Up @@ -372,4 +384,4 @@ Repeat timer example:
Watchdog timer example:

.. literalinclude:: ../../../libraries/ESP32/examples/Timer/WatchdogTimer/WatchdogTimer.ino
:language: arduino
:language: arduino