]> Git Repo - pico-vscode.git/blob - web/docs/group__pico__async__context.html
81c69e08950af433dba51e865b18eeea57aa7f55
[pico-vscode.git] / web / docs / group__pico__async__context.html
1 <!-- HTML header for doxygen 1.8.20-->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5         <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6         <meta http-equiv="X-UA-Compatible" content="IE=9"/>
7         <meta name="generator" content="Doxygen 1.9.4"/>
8         <meta name="viewport" content="width=device-width, initial-scale=1"/>
9         <title>Raspberry Pi Pico SDK: pico_async_context</title>
10         <!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
11         <script type="text/javascript" src="jquery.js"></script>
12         <script type="text/javascript" src="dynsections.js"></script>
13         <link href="navtree.css" rel="stylesheet" type="text/css"/>
14 <script type="text/javascript" src="resize.js"></script>
15 <script type="text/javascript" src="navtreedata.js"></script>
16 <script type="text/javascript" src="navtree.js"></script>
17         <link href="search/search.css" rel="stylesheet" type="text/css"/>
18 <script type="text/javascript" src="search/searchdata.js"></script>
19 <script type="text/javascript" src="search/search.js"></script>
20     <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
21         <link href="doxygen.css" rel="stylesheet" type="text/css" />
22         <link href="normalise.css" rel="stylesheet" type="text/css"/>
23 <link href="main.css" rel="stylesheet" type="text/css"/>
24 <link href="styles.css" rel="stylesheet" type="text/css"/>
25 </head>
26 <body>
27         <div class="navigation-mobile">
28                 <div class="logo--mobile">
29                         <a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
30                 </div>
31                 <div class="navigation-toggle">
32                         <span class="line-1"></span>
33                         <span class="line-2">
34                                 <p>Menu Toggle</p>
35                         </span>
36                         <span class="line-3"></span>
37                 </div>
38         </div>
39         <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
40                 <div class="logo">
41                         <a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
42                         <span style="display: inline-block; margin-top: 10px;">
43                                 v1.5.1
44                         </span>
45                 </div>
46                 <div class="navigation-footer">
47                         <img src="logo-mobile.svg" alt="Raspberry Pi">
48                         <a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
49                 </div>
50 <!--            <div class="search">
51                         <form>
52                                 <input type="search" name="search" id="search" placeholder="Search">
53                                 <input type="submit" value="Search">
54                         </form>
55                 </div> -->
56 <!-- Generated by Doxygen 1.9.4 -->
57 <script type="text/javascript">
58 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
59 var searchBox = new SearchBox("searchBox", "search",'Search','.html');
60 /* @license-end */
61 </script>
62 <script type="text/javascript" src="menudata.js"></script>
63 <script type="text/javascript" src="menu.js"></script>
64 <script type="text/javascript">
65 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
66 $(function() {
67   initMenu('',true,false,'search.php','Search');
68   $(document).ready(function() { init_search(); });
69 });
70 /* @license-end */
71 </script>
72 <div id="main-nav"></div>
73 </div><!-- top -->
74 <div id="side-nav" class="ui-resizable side-nav-resizable">
75   <div id="nav-tree">
76     <div id="nav-tree-contents">
77       <div id="nav-sync" class="sync"></div>
78     </div>
79   </div>
80   <div id="splitbar" style="-moz-user-select:none;" 
81        class="ui-resizable-handle">
82   </div>
83 </div>
84 <script type="text/javascript">
85 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
86 $(document).ready(function(){initNavTree('group__pico__async__context.html',''); initResizable(); });
87 /* @license-end */
88 </script>
89 <div id="doc-content">
90 <!-- window showing the filter options -->
91 <div id="MSearchSelectWindow"
92      onmouseover="return searchBox.OnSearchSelectShow()"
93      onmouseout="return searchBox.OnSearchSelectHide()"
94      onkeydown="return searchBox.OnSearchSelectKey(event)">
95 </div>
96
97 <!-- iframe showing the search results (closed by default) -->
98 <div id="MSearchResultsWindow">
99 <iframe src="javascript:void(0)" frameborder="0" 
100         name="MSearchResults" id="MSearchResults">
101 </iframe>
102 </div>
103
104 <div class="header">
105   <div class="summary">
106 <a href="#groups">Modules</a> &#124;
107 <a href="#nested-classes">Data Structures</a> &#124;
108 <a href="#typedef-members">Typedefs</a> &#124;
109 <a href="#func-members">Functions</a>  </div>
110   <div class="headertitle"><div class="title">pico_async_context<div class="ingroups"><a class="el" href="group__high__level.html">High Level APIs</a></div></div></div>
111 </div><!--header-->
112 <div class="contents">
113 <table class="memberdecls">
114 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="groups" name="groups"></a>
115 Modules</h2></td></tr>
116 <tr class="memitem:group__async__context__freertos"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__async__context__freertos.html">async_context_freertos</a></td></tr>
117 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
118 <tr class="memitem:group__async__context__poll"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__async__context__poll.html">async_context_poll</a></td></tr>
119 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
120 <tr class="memitem:group__async__context__threadsafe__background"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__async__context__threadsafe__background.html">async_context_threadsafe_background</a></td></tr>
121 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
122 </table><table class="memberdecls">
123 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
124 Data Structures</h2></td></tr>
125 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structasync__work__on__timeout.html">async_work_on_timeout</a></td></tr>
126 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A "timeout" instance used by an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a>.  <a href="structasync__work__on__timeout.html#details">More...</a><br /></td></tr>
127 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
128 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structasync__when__pending__worker.html">async_when_pending_worker</a></td></tr>
129 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A "worker" instance used by an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a>.  <a href="structasync__when__pending__worker.html#details">More...</a><br /></td></tr>
130 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
131 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structasync__context__type.html">async_context_type</a></td></tr>
132 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implementation of an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> type, providing methods common to that type.  <a href="structasync__context__type.html#details">More...</a><br /></td></tr>
133 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
134 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structasync__context.html">async_context</a></td></tr>
135 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Base structure type of all async_contexts. For details about its use, see <a class="el" href="group__pico__async__context.html">pico_async_context</a>.  <a href="structasync__context.html#details">More...</a><br /></td></tr>
136 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
137 </table><table class="memberdecls">
138 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
139 Typedefs</h2></td></tr>
140 <tr class="memitem:ga74aa4914d98b190d2d4d84d7ff6b469e"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structasync__work__on__timeout.html">async_work_on_timeout</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#ga74aa4914d98b190d2d4d84d7ff6b469e">async_at_time_worker_t</a></td></tr>
141 <tr class="memdesc:ga74aa4914d98b190d2d4d84d7ff6b469e"><td class="mdescLeft">&#160;</td><td class="mdescRight">A "timeout" instance used by an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a>.  <a href="group__pico__async__context.html#ga74aa4914d98b190d2d4d84d7ff6b469e">More...</a><br /></td></tr>
142 <tr class="separator:ga74aa4914d98b190d2d4d84d7ff6b469e"><td class="memSeparator" colspan="2">&#160;</td></tr>
143 <tr class="memitem:ga975e8fa20352873b7ac76b06a497eb2b"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structasync__when__pending__worker.html">async_when_pending_worker</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#ga975e8fa20352873b7ac76b06a497eb2b">async_when_pending_worker_t</a></td></tr>
144 <tr class="memdesc:ga975e8fa20352873b7ac76b06a497eb2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">A "worker" instance used by an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a>.  <a href="group__pico__async__context.html#ga975e8fa20352873b7ac76b06a497eb2b">More...</a><br /></td></tr>
145 <tr class="separator:ga975e8fa20352873b7ac76b06a497eb2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
146 <tr class="memitem:ga1dd6a1433c144f4c4ea28d54176d9fc7"><td class="memItemLeft" align="right" valign="top"><a id="ga1dd6a1433c144f4c4ea28d54176d9fc7" name="ga1dd6a1433c144f4c4ea28d54176d9fc7"></a>
147 typedef struct <a class="el" href="structasync__context__type.html">async_context_type</a>&#160;</td><td class="memItemRight" valign="bottom"><b>async_context_type_t</b></td></tr>
148 <tr class="memdesc:ga1dd6a1433c144f4c4ea28d54176d9fc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implementation of an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> type, providing methods common to that type. <br /></td></tr>
149 <tr class="separator:ga1dd6a1433c144f4c4ea28d54176d9fc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
150 </table><table class="memberdecls">
151 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
152 Functions</h2></td></tr>
153 <tr class="memitem:ga404d5e6a8ef79159c692dc040f2ded44"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#ga404d5e6a8ef79159c692dc040f2ded44">async_context_acquire_lock_blocking</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context)</td></tr>
154 <tr class="memdesc:ga404d5e6a8ef79159c692dc040f2ded44"><td class="mdescLeft">&#160;</td><td class="mdescRight">Acquire the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> lock.  <a href="group__pico__async__context.html#ga404d5e6a8ef79159c692dc040f2ded44">More...</a><br /></td></tr>
155 <tr class="separator:ga404d5e6a8ef79159c692dc040f2ded44"><td class="memSeparator" colspan="2">&#160;</td></tr>
156 <tr class="memitem:gada9eb6dbc0442ba9cbb44a41526f3b9f"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#gada9eb6dbc0442ba9cbb44a41526f3b9f">async_context_release_lock</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context)</td></tr>
157 <tr class="memdesc:gada9eb6dbc0442ba9cbb44a41526f3b9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Release the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> lock.  <a href="group__pico__async__context.html#gada9eb6dbc0442ba9cbb44a41526f3b9f">More...</a><br /></td></tr>
158 <tr class="separator:gada9eb6dbc0442ba9cbb44a41526f3b9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
159 <tr class="memitem:ga032285b9d1a4aa325813cdbcc1f00a75"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#ga032285b9d1a4aa325813cdbcc1f00a75">async_context_lock_check</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context)</td></tr>
160 <tr class="memdesc:ga032285b9d1a4aa325813cdbcc1f00a75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assert if the caller does not own the lock for the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a>.  <a href="group__pico__async__context.html#ga032285b9d1a4aa325813cdbcc1f00a75">More...</a><br /></td></tr>
161 <tr class="separator:ga032285b9d1a4aa325813cdbcc1f00a75"><td class="memSeparator" colspan="2">&#160;</td></tr>
162 <tr class="memitem:gaa4b239c998978b97eabe2aa2ad659720"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#gaa4b239c998978b97eabe2aa2ad659720">async_context_execute_sync</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context, uint32_t(*func)(void *param), void *param)</td></tr>
163 <tr class="memdesc:gaa4b239c998978b97eabe2aa2ad659720"><td class="mdescLeft">&#160;</td><td class="mdescRight">Execute work synchronously on the core the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> belongs to.  <a href="group__pico__async__context.html#gaa4b239c998978b97eabe2aa2ad659720">More...</a><br /></td></tr>
164 <tr class="separator:gaa4b239c998978b97eabe2aa2ad659720"><td class="memSeparator" colspan="2">&#160;</td></tr>
165 <tr class="memitem:gad4ea52957b11c70d908e5af6f0c715ab"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#gad4ea52957b11c70d908e5af6f0c715ab">async_context_add_at_time_worker</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context, <a class="el" href="group__pico__async__context.html#ga74aa4914d98b190d2d4d84d7ff6b469e">async_at_time_worker_t</a> *worker)</td></tr>
166 <tr class="memdesc:gad4ea52957b11c70d908e5af6f0c715ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add an "at time" worker to a context.  <a href="group__pico__async__context.html#gad4ea52957b11c70d908e5af6f0c715ab">More...</a><br /></td></tr>
167 <tr class="separator:gad4ea52957b11c70d908e5af6f0c715ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
168 <tr class="memitem:ga8ef9fba4dd680a576d94c82b40b10fc3"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#ga8ef9fba4dd680a576d94c82b40b10fc3">async_context_add_at_time_worker_at</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context, <a class="el" href="group__pico__async__context.html#ga74aa4914d98b190d2d4d84d7ff6b469e">async_at_time_worker_t</a> *worker, <a class="el" href="structabsolute__time__t.html">absolute_time_t</a> at)</td></tr>
169 <tr class="memdesc:ga8ef9fba4dd680a576d94c82b40b10fc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add an "at time" worker to a context.  <a href="group__pico__async__context.html#ga8ef9fba4dd680a576d94c82b40b10fc3">More...</a><br /></td></tr>
170 <tr class="separator:ga8ef9fba4dd680a576d94c82b40b10fc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
171 <tr class="memitem:gae0792d86734a6e30b2f043b8eba42438"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#gae0792d86734a6e30b2f043b8eba42438">async_context_add_at_time_worker_in_ms</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context, <a class="el" href="group__pico__async__context.html#ga74aa4914d98b190d2d4d84d7ff6b469e">async_at_time_worker_t</a> *worker, uint32_t ms)</td></tr>
172 <tr class="memdesc:gae0792d86734a6e30b2f043b8eba42438"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add an "at time" worker to a context.  <a href="group__pico__async__context.html#gae0792d86734a6e30b2f043b8eba42438">More...</a><br /></td></tr>
173 <tr class="separator:gae0792d86734a6e30b2f043b8eba42438"><td class="memSeparator" colspan="2">&#160;</td></tr>
174 <tr class="memitem:ga58c96cc02b63e12874cae38442c7c4dd"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#ga58c96cc02b63e12874cae38442c7c4dd">async_context_remove_at_time_worker</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context, <a class="el" href="group__pico__async__context.html#ga74aa4914d98b190d2d4d84d7ff6b469e">async_at_time_worker_t</a> *worker)</td></tr>
175 <tr class="memdesc:ga58c96cc02b63e12874cae38442c7c4dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove an "at time" worker from a context.  <a href="group__pico__async__context.html#ga58c96cc02b63e12874cae38442c7c4dd">More...</a><br /></td></tr>
176 <tr class="separator:ga58c96cc02b63e12874cae38442c7c4dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
177 <tr class="memitem:ga9d42179771bcc8c99124c43dcc7b1350"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#ga9d42179771bcc8c99124c43dcc7b1350">async_context_add_when_pending_worker</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context, <a class="el" href="group__pico__async__context.html#ga975e8fa20352873b7ac76b06a497eb2b">async_when_pending_worker_t</a> *worker)</td></tr>
178 <tr class="memdesc:ga9d42179771bcc8c99124c43dcc7b1350"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a "when pending" worker to a context.  <a href="group__pico__async__context.html#ga9d42179771bcc8c99124c43dcc7b1350">More...</a><br /></td></tr>
179 <tr class="separator:ga9d42179771bcc8c99124c43dcc7b1350"><td class="memSeparator" colspan="2">&#160;</td></tr>
180 <tr class="memitem:ga72b40c2505cd08cb542c3f1759b9e1d5"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#ga72b40c2505cd08cb542c3f1759b9e1d5">async_context_remove_when_pending_worker</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context, <a class="el" href="group__pico__async__context.html#ga975e8fa20352873b7ac76b06a497eb2b">async_when_pending_worker_t</a> *worker)</td></tr>
181 <tr class="memdesc:ga72b40c2505cd08cb542c3f1759b9e1d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a "when pending" worker from a context.  <a href="group__pico__async__context.html#ga72b40c2505cd08cb542c3f1759b9e1d5">More...</a><br /></td></tr>
182 <tr class="separator:ga72b40c2505cd08cb542c3f1759b9e1d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
183 <tr class="memitem:ga1ca51536a6f0344cfcbd30bd09fbaec2"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#ga1ca51536a6f0344cfcbd30bd09fbaec2">async_context_set_work_pending</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context, <a class="el" href="group__pico__async__context.html#ga975e8fa20352873b7ac76b06a497eb2b">async_when_pending_worker_t</a> *worker)</td></tr>
184 <tr class="memdesc:ga1ca51536a6f0344cfcbd30bd09fbaec2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mark a "when pending" worker as having work pending.  <a href="group__pico__async__context.html#ga1ca51536a6f0344cfcbd30bd09fbaec2">More...</a><br /></td></tr>
185 <tr class="separator:ga1ca51536a6f0344cfcbd30bd09fbaec2"><td class="memSeparator" colspan="2">&#160;</td></tr>
186 <tr class="memitem:gafdb322c3f1043265624988215d3a8df9"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#gafdb322c3f1043265624988215d3a8df9">async_context_poll</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context)</td></tr>
187 <tr class="memdesc:gafdb322c3f1043265624988215d3a8df9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform any pending work for polling style <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a>.  <a href="group__pico__async__context.html#gafdb322c3f1043265624988215d3a8df9">More...</a><br /></td></tr>
188 <tr class="separator:gafdb322c3f1043265624988215d3a8df9"><td class="memSeparator" colspan="2">&#160;</td></tr>
189 <tr class="memitem:gad2f27b21dbaa264dfe59ef0f59de11db"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#gad2f27b21dbaa264dfe59ef0f59de11db">async_context_wait_until</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context, <a class="el" href="structabsolute__time__t.html">absolute_time_t</a> until)</td></tr>
190 <tr class="memdesc:gad2f27b21dbaa264dfe59ef0f59de11db"><td class="mdescLeft">&#160;</td><td class="mdescRight">sleep until the specified time in an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> callback safe way  <a href="group__pico__async__context.html#gad2f27b21dbaa264dfe59ef0f59de11db">More...</a><br /></td></tr>
191 <tr class="separator:gad2f27b21dbaa264dfe59ef0f59de11db"><td class="memSeparator" colspan="2">&#160;</td></tr>
192 <tr class="memitem:ga6207f562c0b69c7a75cd81a783eb1055"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#ga6207f562c0b69c7a75cd81a783eb1055">async_context_wait_for_work_until</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context, <a class="el" href="structabsolute__time__t.html">absolute_time_t</a> until)</td></tr>
193 <tr class="memdesc:ga6207f562c0b69c7a75cd81a783eb1055"><td class="mdescLeft">&#160;</td><td class="mdescRight">Block until work needs to be done or the specified time has been reached.  <a href="group__pico__async__context.html#ga6207f562c0b69c7a75cd81a783eb1055">More...</a><br /></td></tr>
194 <tr class="separator:ga6207f562c0b69c7a75cd81a783eb1055"><td class="memSeparator" colspan="2">&#160;</td></tr>
195 <tr class="memitem:gaae7ea2fed2b274a63455773d056f6d4c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#gaae7ea2fed2b274a63455773d056f6d4c">async_context_wait_for_work_ms</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context, uint32_t ms)</td></tr>
196 <tr class="memdesc:gaae7ea2fed2b274a63455773d056f6d4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Block until work needs to be done or the specified number of milliseconds have passed.  <a href="group__pico__async__context.html#gaae7ea2fed2b274a63455773d056f6d4c">More...</a><br /></td></tr>
197 <tr class="separator:gaae7ea2fed2b274a63455773d056f6d4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
198 <tr class="memitem:ga604afdcf2e76f1bf99df469edfadf7eb"><td class="memItemLeft" align="right" valign="top">static uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#ga604afdcf2e76f1bf99df469edfadf7eb">async_context_core_num</a> (const <a class="el" href="structasync__context.html">async_context_t</a> *context)</td></tr>
199 <tr class="memdesc:ga604afdcf2e76f1bf99df469edfadf7eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the processor core this <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> belongs to.  <a href="group__pico__async__context.html#ga604afdcf2e76f1bf99df469edfadf7eb">More...</a><br /></td></tr>
200 <tr class="separator:ga604afdcf2e76f1bf99df469edfadf7eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
201 <tr class="memitem:ga66d09e106e04d70971d4fb6f09d5d949"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__async__context.html#ga66d09e106e04d70971d4fb6f09d5d949">async_context_deinit</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context)</td></tr>
202 <tr class="memdesc:ga66d09e106e04d70971d4fb6f09d5d949"><td class="mdescLeft">&#160;</td><td class="mdescRight">End <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> processing, and free any resources.  <a href="group__pico__async__context.html#ga66d09e106e04d70971d4fb6f09d5d949">More...</a><br /></td></tr>
203 <tr class="separator:ga66d09e106e04d70971d4fb6f09d5d949"><td class="memSeparator" colspan="2">&#160;</td></tr>
204 </table>
205 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
206 <p >An <a class="el" href="structasync__context.html">async_context</a> provides a logically single-threaded context for performing work, and responding to asynchronous events. Thus an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> instance is suitable for servicing third-party libraries that are not re-entrant.</p>
207 <p >The "context" in <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> refers to the fact that when calling workers or timeouts within the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> various pre-conditions hold:</p>
208 <ol>
209 <li>
210 That there is a single logical thread of execution; i.e. that the context does not call any worker functions concurrently. </li>
211 <li>
212 That the context always calls workers from the same processor core, as most uses of <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> rely on interaction with IRQs which are themselves core-specific. </li>
213 </ol>
214 <p >THe <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> provides two mechanisms for asynchronous work:</p>
215 <ul>
216 <li><em>when_pending</em> workers, which are processed whenever they have work pending. See <a class="el" href="group__pico__async__context.html#ga9d42179771bcc8c99124c43dcc7b1350">async_context_add_when_pending_worker</a>, <a class="el" href="group__pico__async__context.html#ga72b40c2505cd08cb542c3f1759b9e1d5">async_context_remove_when_pending_worker</a>, and <a class="el" href="group__pico__async__context.html#ga1ca51536a6f0344cfcbd30bd09fbaec2">async_context_set_work_pending</a>, the latter of which can be used from an interrupt handler to signal that servicing work is required to be performed by the worker from the regular <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a>.</li>
217 <li><em>at_time</em> workers, that are executed after at a specific time.</li>
218 </ul>
219 <p >Note: "when pending" workers with work pending are executed before "at time" workers.</p>
220 <p >The <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> provides locking mechanisms, see <a class="el" href="group__pico__async__context.html#ga404d5e6a8ef79159c692dc040f2ded44">async_context_acquire_lock_blocking</a>, <a class="el" href="group__pico__async__context.html#gada9eb6dbc0442ba9cbb44a41526f3b9f">async_context_release_lock</a> and <a class="el" href="group__pico__async__context.html#ga032285b9d1a4aa325813cdbcc1f00a75">async_context_lock_check</a> which can be used by external code to ensure execution of external code does not happen concurrently with worker code. Locked code runs on the calling core, however <a class="el" href="group__pico__async__context.html#gaa4b239c998978b97eabe2aa2ad659720">async_context_execute_sync</a> is provided to synchronously run a function from the core of the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a>.</p>
221 <p >The SDK ships with the following default async_contexts:</p>
222 <p ><a class="el" href="structasync__context__poll.html">async_context_poll</a> - this context is not thread-safe, and the user is responsible for calling <a class="el" href="group__pico__async__context.html#gafdb322c3f1043265624988215d3a8df9">async_context_poll()</a> periodically, and can use <a class="el" href="group__pico__async__context.html#ga6207f562c0b69c7a75cd81a783eb1055" title="Block until work needs to be done or the specified time has been reached.">async_context_wait_for_work_until()</a> to sleep between calls until work is needed if the user has nothing else to do.</p>
223 <p ><a class="el" href="structasync__context__threadsafe__background.html">async_context_threadsafe_background</a> - in order to work in the background, a low priority IRQ is used to handle callbacks. Code is usually invoked from this IRQ context, but may be invoked after any other code that uses the async context in another (non-IRQ) context on the same core. Calling <a class="el" href="group__pico__async__context.html#gafdb322c3f1043265624988215d3a8df9">async_context_poll()</a> is not required, and is a no-op. This context implements <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> locking and is thus safe to call from either core, according to the specific notes on each API.</p>
224 <p ><a class="el" href="structasync__context__freertos.html">async_context_freertos</a> - Work is performed from a separate "async_context" task, however once again, code may also be invoked after a direct use of the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> on the same core that the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> belongs to. Calling <a class="el" href="group__pico__async__context.html#gafdb322c3f1043265624988215d3a8df9">async_context_poll()</a> is not required, and is a no-op. This context implements <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> locking and is thus safe to call from any task, and from either core, according to the specific notes on each API.</p>
225 <p >Each <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> provides bespoke methods of instantiation which are provided in the corresponding headers (e.g. <a class="el" href="async__context__poll_8h_source.html">async_context_poll.h</a>, <a class="el" href="async__context__threadsafe__background_8h_source.html">async_context_threadsafe_background.h</a>, asycn_context_freertos.h). async_contexts are de-initialized by the common async_context_deint() method.</p>
226 <p >Multiple <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> instances can be used by a single application, and they will operate independently. </p>
227 <h2 class="groupheader">Typedef Documentation</h2>
228 <a id="ga74aa4914d98b190d2d4d84d7ff6b469e" name="ga74aa4914d98b190d2d4d84d7ff6b469e"></a>
229 <h2 class="memtitle"><span class="permalink"><a href="#ga74aa4914d98b190d2d4d84d7ff6b469e">&#9670;&nbsp;</a></span>async_at_time_worker_t</h2>
230
231 <div class="memitem">
232 <div class="memproto">
233       <table class="memname">
234         <tr>
235           <td class="memname">typedef struct <a class="el" href="structasync__work__on__timeout.html">async_work_on_timeout</a> <a class="el" href="group__pico__async__context.html#ga74aa4914d98b190d2d4d84d7ff6b469e">async_at_time_worker_t</a></td>
236         </tr>
237       </table>
238 </div><div class="memdoc">
239
240 <p>A "timeout" instance used by an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a>. </p>
241 <p >A "timeout" represents some future action that must be taken at a specific time. Its methods are called from the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> under lock at the given time</p>
242 <dl class="section see"><dt>See also</dt><dd>async_context_add_worker_at </dd>
243 <dd>
244 async_context_add_worker_in_ms </dd></dl>
245
246 </div>
247 </div>
248 <a id="ga975e8fa20352873b7ac76b06a497eb2b" name="ga975e8fa20352873b7ac76b06a497eb2b"></a>
249 <h2 class="memtitle"><span class="permalink"><a href="#ga975e8fa20352873b7ac76b06a497eb2b">&#9670;&nbsp;</a></span>async_when_pending_worker_t</h2>
250
251 <div class="memitem">
252 <div class="memproto">
253       <table class="memname">
254         <tr>
255           <td class="memname">typedef struct <a class="el" href="structasync__when__pending__worker.html">async_when_pending_worker</a> <a class="el" href="group__pico__async__context.html#ga975e8fa20352873b7ac76b06a497eb2b">async_when_pending_worker_t</a></td>
256         </tr>
257       </table>
258 </div><div class="memdoc">
259
260 <p>A "worker" instance used by an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a>. </p>
261 <p >A "worker" represents some external entity that must do work in response to some external stimulus (usually an IRQ). Its methods are called from the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> under lock at the given time</p>
262 <dl class="section see"><dt>See also</dt><dd>async_context_add_worker_at </dd>
263 <dd>
264 async_context_add_worker_in_ms </dd></dl>
265
266 </div>
267 </div>
268 <h2 class="groupheader">Function Documentation</h2>
269 <a id="ga404d5e6a8ef79159c692dc040f2ded44" name="ga404d5e6a8ef79159c692dc040f2ded44"></a>
270 <h2 class="memtitle"><span class="permalink"><a href="#ga404d5e6a8ef79159c692dc040f2ded44">&#9670;&nbsp;</a></span>async_context_acquire_lock_blocking()</h2>
271
272 <div class="memitem">
273 <div class="memproto">
274 <table class="mlabels">
275   <tr>
276   <td class="mlabels-left">
277       <table class="memname">
278         <tr>
279           <td class="memname">static void async_context_acquire_lock_blocking </td>
280           <td>(</td>
281           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
282           <td class="paramname"><em>context</em></td><td>)</td>
283           <td></td>
284         </tr>
285       </table>
286   </td>
287   <td class="mlabels-right">
288 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
289   </tr>
290 </table>
291 </div><div class="memdoc">
292
293 <p>Acquire the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> lock. </p>
294 <p >The owner of the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> lock is the logic owner of the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> and other work related to this <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> will not happen concurrently.</p>
295 <p >This method may be called in a nested fashion by the the lock owner.</p>
296 <dl class="section note"><dt>Note</dt><dd>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> lock is nestable by the same caller, so an internal count is maintained</dd>
297 <dd>
298 for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> or from any other non-IRQ context.</dd></dl>
299 <dl class="params"><dt>Parameters</dt><dd>
300   <table class="params">
301     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a></td></tr>
302   </table>
303   </dd>
304 </dl>
305 <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__async__context.html#gada9eb6dbc0442ba9cbb44a41526f3b9f" title="Release the async_context lock.">async_context_release_lock</a> </dd></dl>
306
307 </div>
308 </div>
309 <a id="gad4ea52957b11c70d908e5af6f0c715ab" name="gad4ea52957b11c70d908e5af6f0c715ab"></a>
310 <h2 class="memtitle"><span class="permalink"><a href="#gad4ea52957b11c70d908e5af6f0c715ab">&#9670;&nbsp;</a></span>async_context_add_at_time_worker()</h2>
311
312 <div class="memitem">
313 <div class="memproto">
314 <table class="mlabels">
315   <tr>
316   <td class="mlabels-left">
317       <table class="memname">
318         <tr>
319           <td class="memname">static bool async_context_add_at_time_worker </td>
320           <td>(</td>
321           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
322           <td class="paramname"><em>context</em>, </td>
323         </tr>
324         <tr>
325           <td class="paramkey"></td>
326           <td></td>
327           <td class="paramtype"><a class="el" href="group__pico__async__context.html#ga74aa4914d98b190d2d4d84d7ff6b469e">async_at_time_worker_t</a> *&#160;</td>
328           <td class="paramname"><em>worker</em>&#160;</td>
329         </tr>
330         <tr>
331           <td></td>
332           <td>)</td>
333           <td></td><td></td>
334         </tr>
335       </table>
336   </td>
337   <td class="mlabels-right">
338 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
339   </tr>
340 </table>
341 </div><div class="memdoc">
342
343 <p>Add an "at time" worker to a context. </p>
344 <p >An "at time" worker will run at or after a specific point in time, and is automatically when (just before) it runs.</p>
345 <p >The time to fire is specified in the next_time field of the worker.</p>
346 <dl class="section note"><dt>Note</dt><dd>for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> or from any other non-IRQ context.</dd></dl>
347 <dl class="params"><dt>Parameters</dt><dd>
348   <table class="params">
349     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> </td></tr>
350     <tr><td class="paramname">worker</td><td>the "at time" worker to add </td></tr>
351   </table>
352   </dd>
353 </dl>
354 <dl class="section return"><dt>Returns</dt><dd>true if the worker was added, false if the worker was already present. </dd></dl>
355
356 </div>
357 </div>
358 <a id="ga8ef9fba4dd680a576d94c82b40b10fc3" name="ga8ef9fba4dd680a576d94c82b40b10fc3"></a>
359 <h2 class="memtitle"><span class="permalink"><a href="#ga8ef9fba4dd680a576d94c82b40b10fc3">&#9670;&nbsp;</a></span>async_context_add_at_time_worker_at()</h2>
360
361 <div class="memitem">
362 <div class="memproto">
363 <table class="mlabels">
364   <tr>
365   <td class="mlabels-left">
366       <table class="memname">
367         <tr>
368           <td class="memname">static bool async_context_add_at_time_worker_at </td>
369           <td>(</td>
370           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
371           <td class="paramname"><em>context</em>, </td>
372         </tr>
373         <tr>
374           <td class="paramkey"></td>
375           <td></td>
376           <td class="paramtype"><a class="el" href="group__pico__async__context.html#ga74aa4914d98b190d2d4d84d7ff6b469e">async_at_time_worker_t</a> *&#160;</td>
377           <td class="paramname"><em>worker</em>, </td>
378         </tr>
379         <tr>
380           <td class="paramkey"></td>
381           <td></td>
382           <td class="paramtype"><a class="el" href="structabsolute__time__t.html">absolute_time_t</a>&#160;</td>
383           <td class="paramname"><em>at</em>&#160;</td>
384         </tr>
385         <tr>
386           <td></td>
387           <td>)</td>
388           <td></td><td></td>
389         </tr>
390       </table>
391   </td>
392   <td class="mlabels-right">
393 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
394   </tr>
395 </table>
396 </div><div class="memdoc">
397
398 <p>Add an "at time" worker to a context. </p>
399 <p >An "at time" worker will run at or after a specific point in time, and is automatically when (just before) it runs.</p>
400 <p >The time to fire is specified by the at parameter.</p>
401 <dl class="section note"><dt>Note</dt><dd>for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> or from any other non-IRQ context.</dd></dl>
402 <dl class="params"><dt>Parameters</dt><dd>
403   <table class="params">
404     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> </td></tr>
405     <tr><td class="paramname">worker</td><td>the "at time" worker to add </td></tr>
406     <tr><td class="paramname">at</td><td>the time to fire at </td></tr>
407   </table>
408   </dd>
409 </dl>
410 <dl class="section return"><dt>Returns</dt><dd>true if the worker was added, false if the worker was already present. </dd></dl>
411
412 </div>
413 </div>
414 <a id="gae0792d86734a6e30b2f043b8eba42438" name="gae0792d86734a6e30b2f043b8eba42438"></a>
415 <h2 class="memtitle"><span class="permalink"><a href="#gae0792d86734a6e30b2f043b8eba42438">&#9670;&nbsp;</a></span>async_context_add_at_time_worker_in_ms()</h2>
416
417 <div class="memitem">
418 <div class="memproto">
419 <table class="mlabels">
420   <tr>
421   <td class="mlabels-left">
422       <table class="memname">
423         <tr>
424           <td class="memname">static bool async_context_add_at_time_worker_in_ms </td>
425           <td>(</td>
426           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
427           <td class="paramname"><em>context</em>, </td>
428         </tr>
429         <tr>
430           <td class="paramkey"></td>
431           <td></td>
432           <td class="paramtype"><a class="el" href="group__pico__async__context.html#ga74aa4914d98b190d2d4d84d7ff6b469e">async_at_time_worker_t</a> *&#160;</td>
433           <td class="paramname"><em>worker</em>, </td>
434         </tr>
435         <tr>
436           <td class="paramkey"></td>
437           <td></td>
438           <td class="paramtype">uint32_t&#160;</td>
439           <td class="paramname"><em>ms</em>&#160;</td>
440         </tr>
441         <tr>
442           <td></td>
443           <td>)</td>
444           <td></td><td></td>
445         </tr>
446       </table>
447   </td>
448   <td class="mlabels-right">
449 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
450   </tr>
451 </table>
452 </div><div class="memdoc">
453
454 <p>Add an "at time" worker to a context. </p>
455 <p >An "at time" worker will run at or after a specific point in time, and is automatically when (just before) it runs.</p>
456 <p >The time to fire is specified by a delay via the ms parameter</p>
457 <dl class="section note"><dt>Note</dt><dd>for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> or from any other non-IRQ context.</dd></dl>
458 <dl class="params"><dt>Parameters</dt><dd>
459   <table class="params">
460     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> </td></tr>
461     <tr><td class="paramname">worker</td><td>the "at time" worker to add </td></tr>
462     <tr><td class="paramname">ms</td><td>the number of milliseconds from now to fire after </td></tr>
463   </table>
464   </dd>
465 </dl>
466 <dl class="section return"><dt>Returns</dt><dd>true if the worker was added, false if the worker was already present. </dd></dl>
467
468 </div>
469 </div>
470 <a id="ga9d42179771bcc8c99124c43dcc7b1350" name="ga9d42179771bcc8c99124c43dcc7b1350"></a>
471 <h2 class="memtitle"><span class="permalink"><a href="#ga9d42179771bcc8c99124c43dcc7b1350">&#9670;&nbsp;</a></span>async_context_add_when_pending_worker()</h2>
472
473 <div class="memitem">
474 <div class="memproto">
475 <table class="mlabels">
476   <tr>
477   <td class="mlabels-left">
478       <table class="memname">
479         <tr>
480           <td class="memname">static bool async_context_add_when_pending_worker </td>
481           <td>(</td>
482           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
483           <td class="paramname"><em>context</em>, </td>
484         </tr>
485         <tr>
486           <td class="paramkey"></td>
487           <td></td>
488           <td class="paramtype"><a class="el" href="group__pico__async__context.html#ga975e8fa20352873b7ac76b06a497eb2b">async_when_pending_worker_t</a> *&#160;</td>
489           <td class="paramname"><em>worker</em>&#160;</td>
490         </tr>
491         <tr>
492           <td></td>
493           <td>)</td>
494           <td></td><td></td>
495         </tr>
496       </table>
497   </td>
498   <td class="mlabels-right">
499 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
500   </tr>
501 </table>
502 </div><div class="memdoc">
503
504 <p>Add a "when pending" worker to a context. </p>
505 <p >An "when pending" worker will run when it is pending (can be set via <a class="el" href="group__pico__async__context.html#ga1ca51536a6f0344cfcbd30bd09fbaec2">async_context_set_work_pending</a>), and is NOT automatically removed when it runs.</p>
506 <p >The time to fire is specified by a delay via the ms parameter</p>
507 <dl class="section note"><dt>Note</dt><dd>for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> or from any other non-IRQ context.</dd></dl>
508 <dl class="params"><dt>Parameters</dt><dd>
509   <table class="params">
510     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> </td></tr>
511     <tr><td class="paramname">worker</td><td>the "when pending" worker to add </td></tr>
512   </table>
513   </dd>
514 </dl>
515 <dl class="section return"><dt>Returns</dt><dd>true if the worker was added, false if the worker was already present. </dd></dl>
516
517 </div>
518 </div>
519 <a id="ga604afdcf2e76f1bf99df469edfadf7eb" name="ga604afdcf2e76f1bf99df469edfadf7eb"></a>
520 <h2 class="memtitle"><span class="permalink"><a href="#ga604afdcf2e76f1bf99df469edfadf7eb">&#9670;&nbsp;</a></span>async_context_core_num()</h2>
521
522 <div class="memitem">
523 <div class="memproto">
524 <table class="mlabels">
525   <tr>
526   <td class="mlabels-left">
527       <table class="memname">
528         <tr>
529           <td class="memname">static uint async_context_core_num </td>
530           <td>(</td>
531           <td class="paramtype">const <a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
532           <td class="paramname"><em>context</em></td><td>)</td>
533           <td></td>
534         </tr>
535       </table>
536   </td>
537   <td class="mlabels-right">
538 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
539   </tr>
540 </table>
541 </div><div class="memdoc">
542
543 <p>Return the processor core this <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> belongs to. </p>
544 <dl class="params"><dt>Parameters</dt><dd>
545   <table class="params">
546     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> </td></tr>
547   </table>
548   </dd>
549 </dl>
550 <dl class="section return"><dt>Returns</dt><dd>the physical core number </dd></dl>
551
552 </div>
553 </div>
554 <a id="ga66d09e106e04d70971d4fb6f09d5d949" name="ga66d09e106e04d70971d4fb6f09d5d949"></a>
555 <h2 class="memtitle"><span class="permalink"><a href="#ga66d09e106e04d70971d4fb6f09d5d949">&#9670;&nbsp;</a></span>async_context_deinit()</h2>
556
557 <div class="memitem">
558 <div class="memproto">
559 <table class="mlabels">
560   <tr>
561   <td class="mlabels-left">
562       <table class="memname">
563         <tr>
564           <td class="memname">static void async_context_deinit </td>
565           <td>(</td>
566           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
567           <td class="paramname"><em>context</em></td><td>)</td>
568           <td></td>
569         </tr>
570       </table>
571   </td>
572   <td class="mlabels-right">
573 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
574   </tr>
575 </table>
576 </div><div class="memdoc">
577
578 <p>End <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> processing, and free any resources. </p>
579 <p >Note the user should clean up any resources associated with workers in the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> themselves.</p>
580 <p >Asynchronous (non-polled) async_contexts guarantee that no callback is being called once this method returns.</p>
581 <dl class="params"><dt>Parameters</dt><dd>
582   <table class="params">
583     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> </td></tr>
584   </table>
585   </dd>
586 </dl>
587
588 </div>
589 </div>
590 <a id="gaa4b239c998978b97eabe2aa2ad659720" name="gaa4b239c998978b97eabe2aa2ad659720"></a>
591 <h2 class="memtitle"><span class="permalink"><a href="#gaa4b239c998978b97eabe2aa2ad659720">&#9670;&nbsp;</a></span>async_context_execute_sync()</h2>
592
593 <div class="memitem">
594 <div class="memproto">
595 <table class="mlabels">
596   <tr>
597   <td class="mlabels-left">
598       <table class="memname">
599         <tr>
600           <td class="memname">static uint32_t async_context_execute_sync </td>
601           <td>(</td>
602           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
603           <td class="paramname"><em>context</em>, </td>
604         </tr>
605         <tr>
606           <td class="paramkey"></td>
607           <td></td>
608           <td class="paramtype">uint32_t(*)(void *param)&#160;</td>
609           <td class="paramname"><em>func</em>, </td>
610         </tr>
611         <tr>
612           <td class="paramkey"></td>
613           <td></td>
614           <td class="paramtype">void *&#160;</td>
615           <td class="paramname"><em>param</em>&#160;</td>
616         </tr>
617         <tr>
618           <td></td>
619           <td>)</td>
620           <td></td><td></td>
621         </tr>
622       </table>
623   </td>
624   <td class="mlabels-right">
625 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
626   </tr>
627 </table>
628 </div><div class="memdoc">
629
630 <p>Execute work synchronously on the core the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> belongs to. </p>
631 <p >This method is intended for code external to the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> (e.g. another thread/task) to execute a function with the same guarantees (single core, logical thread of execution) that <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> workers are called with.</p>
632 <dl class="section note"><dt>Note</dt><dd>you should NOT call this method while holding the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a>'s lock</dd></dl>
633 <dl class="params"><dt>Parameters</dt><dd>
634   <table class="params">
635     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> </td></tr>
636     <tr><td class="paramname">func</td><td>the function to call </td></tr>
637     <tr><td class="paramname">param</td><td>the paramter to pass to the function </td></tr>
638   </table>
639   </dd>
640 </dl>
641 <dl class="section return"><dt>Returns</dt><dd>the return value from func </dd></dl>
642
643 </div>
644 </div>
645 <a id="ga032285b9d1a4aa325813cdbcc1f00a75" name="ga032285b9d1a4aa325813cdbcc1f00a75"></a>
646 <h2 class="memtitle"><span class="permalink"><a href="#ga032285b9d1a4aa325813cdbcc1f00a75">&#9670;&nbsp;</a></span>async_context_lock_check()</h2>
647
648 <div class="memitem">
649 <div class="memproto">
650 <table class="mlabels">
651   <tr>
652   <td class="mlabels-left">
653       <table class="memname">
654         <tr>
655           <td class="memname">static void async_context_lock_check </td>
656           <td>(</td>
657           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
658           <td class="paramname"><em>context</em></td><td>)</td>
659           <td></td>
660         </tr>
661       </table>
662   </td>
663   <td class="mlabels-right">
664 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
665   </tr>
666 </table>
667 </div><div class="memdoc">
668
669 <p>Assert if the caller does not own the lock for the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a>. </p>
670 <dl class="section note"><dt>Note</dt><dd>this method is thread-safe</dd></dl>
671 <dl class="params"><dt>Parameters</dt><dd>
672   <table class="params">
673     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> </td></tr>
674   </table>
675   </dd>
676 </dl>
677
678 </div>
679 </div>
680 <a id="gafdb322c3f1043265624988215d3a8df9" name="gafdb322c3f1043265624988215d3a8df9"></a>
681 <h2 class="memtitle"><span class="permalink"><a href="#gafdb322c3f1043265624988215d3a8df9">&#9670;&nbsp;</a></span>async_context_poll()</h2>
682
683 <div class="memitem">
684 <div class="memproto">
685 <table class="mlabels">
686   <tr>
687   <td class="mlabels-left">
688       <table class="memname">
689         <tr>
690           <td class="memname">static void <a class="el" href="structasync__context__poll.html">async_context_poll</a> </td>
691           <td>(</td>
692           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
693           <td class="paramname"><em>context</em></td><td>)</td>
694           <td></td>
695         </tr>
696       </table>
697   </td>
698   <td class="mlabels-right">
699 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
700   </tr>
701 </table>
702 </div><div class="memdoc">
703
704 <p>Perform any pending work for polling style <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a>. </p>
705 <p >For a polled <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> (e.g. <a class="el" href="group__async__context__poll.html">async_context_poll</a>) the user is responsible for calling this method periodically to perform any required work.</p>
706 <p >This method may immediately perform outstanding work on other context types, but is not required to.</p>
707 <dl class="params"><dt>Parameters</dt><dd>
708   <table class="params">
709     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> </td></tr>
710   </table>
711   </dd>
712 </dl>
713
714 </div>
715 </div>
716 <a id="gada9eb6dbc0442ba9cbb44a41526f3b9f" name="gada9eb6dbc0442ba9cbb44a41526f3b9f"></a>
717 <h2 class="memtitle"><span class="permalink"><a href="#gada9eb6dbc0442ba9cbb44a41526f3b9f">&#9670;&nbsp;</a></span>async_context_release_lock()</h2>
718
719 <div class="memitem">
720 <div class="memproto">
721 <table class="mlabels">
722   <tr>
723   <td class="mlabels-left">
724       <table class="memname">
725         <tr>
726           <td class="memname">static void async_context_release_lock </td>
727           <td>(</td>
728           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
729           <td class="paramname"><em>context</em></td><td>)</td>
730           <td></td>
731         </tr>
732       </table>
733   </td>
734   <td class="mlabels-right">
735 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
736   </tr>
737 </table>
738 </div><div class="memdoc">
739
740 <p>Release the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> lock. </p>
741 <dl class="section note"><dt>Note</dt><dd>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> lock may be called in a nested fashion, so an internal count is maintained. On the outermost release, When the outermost lock is released, a check is made for work which might have been skipped while the lock was held, and any such work may be performed during this call IF the call is made from the same core that the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> belongs to.</dd>
742 <dd>
743 for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> or from any other non-IRQ context.</dd></dl>
744 <dl class="params"><dt>Parameters</dt><dd>
745   <table class="params">
746     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a></td></tr>
747   </table>
748   </dd>
749 </dl>
750 <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__async__context.html#ga404d5e6a8ef79159c692dc040f2ded44" title="Acquire the async_context lock.">async_context_acquire_lock_blocking</a> </dd></dl>
751
752 </div>
753 </div>
754 <a id="ga58c96cc02b63e12874cae38442c7c4dd" name="ga58c96cc02b63e12874cae38442c7c4dd"></a>
755 <h2 class="memtitle"><span class="permalink"><a href="#ga58c96cc02b63e12874cae38442c7c4dd">&#9670;&nbsp;</a></span>async_context_remove_at_time_worker()</h2>
756
757 <div class="memitem">
758 <div class="memproto">
759 <table class="mlabels">
760   <tr>
761   <td class="mlabels-left">
762       <table class="memname">
763         <tr>
764           <td class="memname">static bool async_context_remove_at_time_worker </td>
765           <td>(</td>
766           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
767           <td class="paramname"><em>context</em>, </td>
768         </tr>
769         <tr>
770           <td class="paramkey"></td>
771           <td></td>
772           <td class="paramtype"><a class="el" href="group__pico__async__context.html#ga74aa4914d98b190d2d4d84d7ff6b469e">async_at_time_worker_t</a> *&#160;</td>
773           <td class="paramname"><em>worker</em>&#160;</td>
774         </tr>
775         <tr>
776           <td></td>
777           <td>)</td>
778           <td></td><td></td>
779         </tr>
780       </table>
781   </td>
782   <td class="mlabels-right">
783 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
784   </tr>
785 </table>
786 </div><div class="memdoc">
787
788 <p>Remove an "at time" worker from a context. </p>
789 <dl class="section note"><dt>Note</dt><dd>for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> or from any other non-IRQ context.</dd></dl>
790 <dl class="params"><dt>Parameters</dt><dd>
791   <table class="params">
792     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> </td></tr>
793     <tr><td class="paramname">worker</td><td>the "at time" worker to remove </td></tr>
794   </table>
795   </dd>
796 </dl>
797 <dl class="section return"><dt>Returns</dt><dd>true if the worker was removed, false if the instance not present. </dd></dl>
798
799 </div>
800 </div>
801 <a id="ga72b40c2505cd08cb542c3f1759b9e1d5" name="ga72b40c2505cd08cb542c3f1759b9e1d5"></a>
802 <h2 class="memtitle"><span class="permalink"><a href="#ga72b40c2505cd08cb542c3f1759b9e1d5">&#9670;&nbsp;</a></span>async_context_remove_when_pending_worker()</h2>
803
804 <div class="memitem">
805 <div class="memproto">
806 <table class="mlabels">
807   <tr>
808   <td class="mlabels-left">
809       <table class="memname">
810         <tr>
811           <td class="memname">static bool async_context_remove_when_pending_worker </td>
812           <td>(</td>
813           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
814           <td class="paramname"><em>context</em>, </td>
815         </tr>
816         <tr>
817           <td class="paramkey"></td>
818           <td></td>
819           <td class="paramtype"><a class="el" href="group__pico__async__context.html#ga975e8fa20352873b7ac76b06a497eb2b">async_when_pending_worker_t</a> *&#160;</td>
820           <td class="paramname"><em>worker</em>&#160;</td>
821         </tr>
822         <tr>
823           <td></td>
824           <td>)</td>
825           <td></td><td></td>
826         </tr>
827       </table>
828   </td>
829   <td class="mlabels-right">
830 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
831   </tr>
832 </table>
833 </div><div class="memdoc">
834
835 <p>Remove a "when pending" worker from a context. </p>
836 <dl class="section note"><dt>Note</dt><dd>for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> or from any other non-IRQ context.</dd></dl>
837 <dl class="params"><dt>Parameters</dt><dd>
838   <table class="params">
839     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> </td></tr>
840     <tr><td class="paramname">worker</td><td>the "when pending" worker to remove </td></tr>
841   </table>
842   </dd>
843 </dl>
844 <dl class="section return"><dt>Returns</dt><dd>true if the worker was removed, false if the instance not present. </dd></dl>
845
846 </div>
847 </div>
848 <a id="ga1ca51536a6f0344cfcbd30bd09fbaec2" name="ga1ca51536a6f0344cfcbd30bd09fbaec2"></a>
849 <h2 class="memtitle"><span class="permalink"><a href="#ga1ca51536a6f0344cfcbd30bd09fbaec2">&#9670;&nbsp;</a></span>async_context_set_work_pending()</h2>
850
851 <div class="memitem">
852 <div class="memproto">
853 <table class="mlabels">
854   <tr>
855   <td class="mlabels-left">
856       <table class="memname">
857         <tr>
858           <td class="memname">static void async_context_set_work_pending </td>
859           <td>(</td>
860           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
861           <td class="paramname"><em>context</em>, </td>
862         </tr>
863         <tr>
864           <td class="paramkey"></td>
865           <td></td>
866           <td class="paramtype"><a class="el" href="group__pico__async__context.html#ga975e8fa20352873b7ac76b06a497eb2b">async_when_pending_worker_t</a> *&#160;</td>
867           <td class="paramname"><em>worker</em>&#160;</td>
868         </tr>
869         <tr>
870           <td></td>
871           <td>)</td>
872           <td></td><td></td>
873         </tr>
874       </table>
875   </td>
876   <td class="mlabels-right">
877 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
878   </tr>
879 </table>
880 </div><div class="memdoc">
881
882 <p>Mark a "when pending" worker as having work pending. </p>
883 <p >The worker will be run from the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> at a later time.</p>
884 <dl class="section note"><dt>Note</dt><dd>this method may be called from any context including IRQs</dd></dl>
885 <dl class="params"><dt>Parameters</dt><dd>
886   <table class="params">
887     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> </td></tr>
888     <tr><td class="paramname">worker</td><td>the "when pending" worker to mark as pending. </td></tr>
889   </table>
890   </dd>
891 </dl>
892
893 </div>
894 </div>
895 <a id="gaae7ea2fed2b274a63455773d056f6d4c" name="gaae7ea2fed2b274a63455773d056f6d4c"></a>
896 <h2 class="memtitle"><span class="permalink"><a href="#gaae7ea2fed2b274a63455773d056f6d4c">&#9670;&nbsp;</a></span>async_context_wait_for_work_ms()</h2>
897
898 <div class="memitem">
899 <div class="memproto">
900 <table class="mlabels">
901   <tr>
902   <td class="mlabels-left">
903       <table class="memname">
904         <tr>
905           <td class="memname">static void async_context_wait_for_work_ms </td>
906           <td>(</td>
907           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
908           <td class="paramname"><em>context</em>, </td>
909         </tr>
910         <tr>
911           <td class="paramkey"></td>
912           <td></td>
913           <td class="paramtype">uint32_t&#160;</td>
914           <td class="paramname"><em>ms</em>&#160;</td>
915         </tr>
916         <tr>
917           <td></td>
918           <td>)</td>
919           <td></td><td></td>
920         </tr>
921       </table>
922   </td>
923   <td class="mlabels-right">
924 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
925   </tr>
926 </table>
927 </div><div class="memdoc">
928
929 <p>Block until work needs to be done or the specified number of milliseconds have passed. </p>
930 <dl class="section note"><dt>Note</dt><dd>this method should not be called from a worker callback</dd></dl>
931 <dl class="params"><dt>Parameters</dt><dd>
932   <table class="params">
933     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> </td></tr>
934     <tr><td class="paramname">ms</td><td>the number of milliseconds to return after if no work is required </td></tr>
935   </table>
936   </dd>
937 </dl>
938
939 </div>
940 </div>
941 <a id="ga6207f562c0b69c7a75cd81a783eb1055" name="ga6207f562c0b69c7a75cd81a783eb1055"></a>
942 <h2 class="memtitle"><span class="permalink"><a href="#ga6207f562c0b69c7a75cd81a783eb1055">&#9670;&nbsp;</a></span>async_context_wait_for_work_until()</h2>
943
944 <div class="memitem">
945 <div class="memproto">
946 <table class="mlabels">
947   <tr>
948   <td class="mlabels-left">
949       <table class="memname">
950         <tr>
951           <td class="memname">static void async_context_wait_for_work_until </td>
952           <td>(</td>
953           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
954           <td class="paramname"><em>context</em>, </td>
955         </tr>
956         <tr>
957           <td class="paramkey"></td>
958           <td></td>
959           <td class="paramtype"><a class="el" href="structabsolute__time__t.html">absolute_time_t</a>&#160;</td>
960           <td class="paramname"><em>until</em>&#160;</td>
961         </tr>
962         <tr>
963           <td></td>
964           <td>)</td>
965           <td></td><td></td>
966         </tr>
967       </table>
968   </td>
969   <td class="mlabels-right">
970 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
971   </tr>
972 </table>
973 </div><div class="memdoc">
974
975 <p>Block until work needs to be done or the specified time has been reached. </p>
976 <dl class="section note"><dt>Note</dt><dd>this method should not be called from a worker callback</dd></dl>
977 <dl class="params"><dt>Parameters</dt><dd>
978   <table class="params">
979     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> </td></tr>
980     <tr><td class="paramname">until</td><td>the time to return at if no work is required </td></tr>
981   </table>
982   </dd>
983 </dl>
984
985 </div>
986 </div>
987 <a id="gad2f27b21dbaa264dfe59ef0f59de11db" name="gad2f27b21dbaa264dfe59ef0f59de11db"></a>
988 <h2 class="memtitle"><span class="permalink"><a href="#gad2f27b21dbaa264dfe59ef0f59de11db">&#9670;&nbsp;</a></span>async_context_wait_until()</h2>
989
990 <div class="memitem">
991 <div class="memproto">
992 <table class="mlabels">
993   <tr>
994   <td class="mlabels-left">
995       <table class="memname">
996         <tr>
997           <td class="memname">static void async_context_wait_until </td>
998           <td>(</td>
999           <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> *&#160;</td>
1000           <td class="paramname"><em>context</em>, </td>
1001         </tr>
1002         <tr>
1003           <td class="paramkey"></td>
1004           <td></td>
1005           <td class="paramtype"><a class="el" href="structabsolute__time__t.html">absolute_time_t</a>&#160;</td>
1006           <td class="paramname"><em>until</em>&#160;</td>
1007         </tr>
1008         <tr>
1009           <td></td>
1010           <td>)</td>
1011           <td></td><td></td>
1012         </tr>
1013       </table>
1014   </td>
1015   <td class="mlabels-right">
1016 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
1017   </tr>
1018 </table>
1019 </div><div class="memdoc">
1020
1021 <p>sleep until the specified time in an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> callback safe way </p>
1022 <dl class="section note"><dt>Note</dt><dd>for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> or from any other non-IRQ context.</dd></dl>
1023 <dl class="params"><dt>Parameters</dt><dd>
1024   <table class="params">
1025     <tr><td class="paramname">context</td><td>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context.">async_context</a> </td></tr>
1026     <tr><td class="paramname">until</td><td>the time to sleep until </td></tr>
1027   </table>
1028   </dd>
1029 </dl>
1030
1031 </div>
1032 </div>
1033 </div><!-- contents -->
1034 </div><!-- doc-content -->
1035
1036         <script src="main.js"></script>
1037 </body>
1038 </html>
This page took 0.086457 seconds and 2 git commands to generate.