Skip to content

Commit e6e538d

Browse files
committed
Add apps/examples/async/main.c description
1 parent 304d86a commit e6e538d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

apps/examples/async/main.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,35 @@
2525
*/
2626

2727
/*
28+
* Demonstrate integration of async with HSM.
29+
* HSM topology:
30+
*
31+
* +--------------------------+
32+
* | async_top |
33+
* | +---------+ +---------+ |
34+
* | |async_ryg| |async_gyr| |
35+
* | +---------+ +---------+ |
36+
* +--------------------------+
37+
*
38+
* async_ryg substate prints colored rectangles in the order
39+
* red-yellow-green (ryg)
40+
* The print delay of each rectangle is 500ms
41+
*
42+
* async_ryg substate prints colored rectangles in the order
43+
* green-yellow-red (gyr)
44+
* The print delay of each rectangle is 1000ms
45+
*
46+
* async_top handles user input. Press ENTER to switch between
47+
* async_ryg and async_gyr substates.
48+
*
49+
* Generally the use of async is warranted if the sequence of
50+
* steps is known beforehand like in this case.
51+
* async_ryg calls async_ryg_hnd() to do the printing
52+
* async_gyr calls async_gyr_hnd() to do the printing
53+
*
54+
* The example is built in two flavours:
55+
* async_preemptive and async_cooperative.
56+
* Both builds do the same.
2857
*/
2958

3059
#include <stdio.h>

0 commit comments

Comments
 (0)