You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2024/05/15 08:20:06 UTC
(mynewt-core) branch master updated: docs/os/core_os/callout: Update docs
This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new ae58577ac docs/os/core_os/callout: Update docs
ae58577ac is described below
commit ae58577ac85720e5f26544cabb8b5bdf666b6282
Author: Wojciech Pietraszewski <wo...@codecoup.pl>
AuthorDate: Mon Apr 29 12:00:55 2024 +0200
docs/os/core_os/callout: Update docs
Removes deprecated part of API from the documentation entry.
---
docs/os/core_os/callout/callout.rst | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/docs/os/core_os/callout/callout.rst b/docs/os/core_os/callout/callout.rst
index c52dc371a..63ff6523f 100644
--- a/docs/os/core_os/callout/callout.rst
+++ b/docs/os/core_os/callout/callout.rst
@@ -9,23 +9,13 @@ Description
Callout is a way of setting up an OS timer. When the timer fires, it is
delivered as an event to task's event queue.
-User would initialize their callout structure using
-:c:func:`os_callout_init()`, or :c:func:`os_callout_func_init()` and
-then arm it with :c:func:`os_callout_reset()`.
+User would initialize their callout structure :c:type:`struct os_callout` using
+:c:func:`os_callout_init()` and then arm it with :c:func:`os_callout_reset()`.
If user wants to cancel the timer before it expires, they can either use
:c:func:`os_callout_reset()` to arm it for later expiry, or stop it altogether
by calling :c:func:`os_callout_stop()`.
-There are 2 different options for data structure to use. First is
-:c:type:`struct os_callout`, which is a bare-bones version. You would
-initialize this with :c:func:`os_callout_init()`.
-
-Second option is :c:type:`struct os_callout_func`. This you can use if you
-expect to have multiple different types of timers in your task, running
-concurrently. The structure contains a function pointer, and you would
-call that function from your task's event processing loop.
-
Time unit when arming the timer is OS ticks. This rate of this ticker
depends on the platform this is running on. You should use OS define
``OS_TICKS_PER_SEC`` to convert wallclock time to OS ticks.