Document tasks.
This commit is contained in:
@ -170,8 +170,9 @@ adc ( pin# -- n ) Analog read pin, result 0-1023
|
|||||||
|
|
||||||
<h5>System</h5>
|
<h5>System</h5>
|
||||||
<pre>
|
<pre>
|
||||||
MS ( n -- )
|
MS ( n -- ) Pause for some number of milliseconds.
|
||||||
TERMINATE ( n -- ) Call system exit
|
MS-TICKS ( -- n ) Time since start in milliseconds.
|
||||||
|
TERMINATE ( n -- ) Call system exit.
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h5>Files</h5>
|
<h5>Files</h5>
|
||||||
@ -356,8 +357,28 @@ esp_intr_free ( handle -- 0/err )
|
|||||||
timer_isr_register ( group timer xt arg ret -- 0/err )
|
timer_isr_register ( group timer xt arg ret -- 0/err )
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<h5 id="tasks">Tasks</h5>
|
||||||
|
These words are inside the <code>TASKS</code> vocabulary.
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
PAUSE ( -- ) Yield to other tasks.
|
||||||
|
MS ( n -- ) Pause for some number of milliseconds (yields to other tasks).
|
||||||
|
TASK ( xt dsz rsz "name" -- ) Create a new task with dsz size data stack
|
||||||
|
and rsz size return stack running xt.
|
||||||
|
START-TASK ( task -- ) Activate a task.
|
||||||
|
.TASKS ( -- ) List running tasks.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
tasks
|
||||||
|
: hi begin ." Time is: " ms-ticks . cr 1000 ms again ;
|
||||||
|
' hi 100 100 task my-counter
|
||||||
|
my-counter start-task
|
||||||
|
</pre>
|
||||||
|
|
||||||
<h5 id="timers">Timers</h5>
|
<h5 id="timers">Timers</h5>
|
||||||
These words are inside the <code>TIMERS</code> vocabulary.
|
These words are inside the <code>TIMERS</code> vocabulary.
|
||||||
|
<br/><b>NOTE: These are low level ESP32 timers. For a periodic background
|
||||||
|
operation, you'll probably want to use <a href="#tasks">TASKS</a>.</b>
|
||||||
|
|
||||||
<p>High Level words:</p>
|
<p>High Level words:</p>
|
||||||
<pre>
|
<pre>
|
||||||
|
|||||||
Reference in New Issue
Block a user