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">
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: async_context_threadsafe_background</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"/>
27 <div class="navigation-mobile">
28 <div class="logo--mobile">
29 <a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
31 <div class="navigation-toggle">
32 <span class="line-1"></span>
36 <span class="line-3"></span>
39 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
41 <a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
42 <span style="display: inline-block; margin-top: 10px;">
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>
50 <!-- <div class="search">
52 <input type="search" name="search" id="search" placeholder="Search">
53 <input type="submit" value="Search">
56 <!-- Generated by Doxygen 1.9.4 -->
57 <script type="text/javascript">
58 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
59 var searchBox = new SearchBox("searchBox", "search",'Search','.html');
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&dn=expat.txt MIT */
67 initMenu('',true,false,'search.php','Search');
68 $(document).ready(function() { init_search(); });
72 <div id="main-nav"></div>
74 <div id="side-nav" class="ui-resizable side-nav-resizable">
76 <div id="nav-tree-contents">
77 <div id="nav-sync" class="sync"></div>
80 <div id="splitbar" style="-moz-user-select:none;"
81 class="ui-resizable-handle">
84 <script type="text/javascript">
85 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
86 $(document).ready(function(){initNavTree('group__async__context__threadsafe__background.html',''); initResizable(); });
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)">
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">
105 <div class="summary">
106 <a href="#func-members">Functions</a> </div>
107 <div class="headertitle"><div class="title">async_context_threadsafe_background<div class="ingroups"><a class="el" href="group__high__level.html">High Level APIs</a> » <a class="el" href="group__pico__async__context.html">pico_async_context</a></div></div></div>
109 <div class="contents">
111 <p><a class="el" href="structasync__context__threadsafe__background.html">async_context_threadsafe_background</a> provides an implementation of <a class="el" href="structasync__context.html">async_context</a> that handles asynchronous work in a low priority IRQ, and there is no need for the user to poll for work
112 <a href="#details">More...</a></p>
113 <table class="memberdecls">
114 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
115 Functions</h2></td></tr>
116 <tr class="memitem:gabf48cafcbfa48c9fbef1aa7a18ded9e5"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__async__context__threadsafe__background.html#gabf48cafcbfa48c9fbef1aa7a18ded9e5">async_context_threadsafe_background_init</a> (<a class="el" href="structasync__context__threadsafe__background.html">async_context_threadsafe_background_t</a> *self, <a class="el" href="structasync__context__threadsafe__background__config.html">async_context_threadsafe_background_config_t</a> *config)</td></tr>
117 <tr class="memdesc:gabf48cafcbfa48c9fbef1aa7a18ded9e5"><td class="mdescLeft"> </td><td class="mdescRight">Initialize an <a class="el" href="structasync__context__threadsafe__background.html">async_context_threadsafe_background</a> instance using the specified configuration. <a href="group__async__context__threadsafe__background.html#gabf48cafcbfa48c9fbef1aa7a18ded9e5">More...</a><br /></td></tr>
118 <tr class="separator:gabf48cafcbfa48c9fbef1aa7a18ded9e5"><td class="memSeparator" colspan="2"> </td></tr>
119 <tr class="memitem:gaf8eafbbac141e7f24e377c708ffa1479"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structasync__context__threadsafe__background__config.html">async_context_threadsafe_background_config_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__async__context__threadsafe__background.html#gaf8eafbbac141e7f24e377c708ffa1479">async_context_threadsafe_background_default_config</a> (void)</td></tr>
120 <tr class="memdesc:gaf8eafbbac141e7f24e377c708ffa1479"><td class="mdescLeft"> </td><td class="mdescRight">Return a copy of the default configuration object used by <a class="el" href="group__async__context__threadsafe__background.html#gab8bc5211f18cbc3a6817b1bf82020f8e">async_context_threadsafe_background_init_with_defaults()</a> <a href="group__async__context__threadsafe__background.html#gaf8eafbbac141e7f24e377c708ffa1479">More...</a><br /></td></tr>
121 <tr class="separator:gaf8eafbbac141e7f24e377c708ffa1479"><td class="memSeparator" colspan="2"> </td></tr>
122 <tr class="memitem:gab8bc5211f18cbc3a6817b1bf82020f8e"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__async__context__threadsafe__background.html#gab8bc5211f18cbc3a6817b1bf82020f8e">async_context_threadsafe_background_init_with_defaults</a> (<a class="el" href="structasync__context__threadsafe__background.html">async_context_threadsafe_background_t</a> *self)</td></tr>
123 <tr class="memdesc:gab8bc5211f18cbc3a6817b1bf82020f8e"><td class="mdescLeft"> </td><td class="mdescRight">Initialize an <a class="el" href="structasync__context__threadsafe__background.html">async_context_threadsafe_background</a> instance with default values. <a href="group__async__context__threadsafe__background.html#gab8bc5211f18cbc3a6817b1bf82020f8e">More...</a><br /></td></tr>
124 <tr class="separator:gab8bc5211f18cbc3a6817b1bf82020f8e"><td class="memSeparator" colspan="2"> </td></tr>
126 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
127 <p ><a class="el" href="structasync__context__threadsafe__background.html">async_context_threadsafe_background</a> provides an implementation of <a class="el" href="structasync__context.html">async_context</a> that handles asynchronous work in a low priority IRQ, and there is no need for the user to poll for work </p>
128 <dl class="section note"><dt>Note</dt><dd>The workers used with 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> MUST be safe to call from an IRQ. </dd></dl>
129 <h2 class="groupheader">Function Documentation</h2>
130 <a id="gaf8eafbbac141e7f24e377c708ffa1479" name="gaf8eafbbac141e7f24e377c708ffa1479"></a>
131 <h2 class="memtitle"><span class="permalink"><a href="#gaf8eafbbac141e7f24e377c708ffa1479">◆ </a></span>async_context_threadsafe_background_default_config()</h2>
133 <div class="memitem">
134 <div class="memproto">
135 <table class="memname">
137 <td class="memname"><a class="el" href="structasync__context__threadsafe__background__config.html">async_context_threadsafe_background_config_t</a> async_context_threadsafe_background_default_config </td>
139 <td class="paramtype">void </td>
140 <td class="paramname"></td><td>)</td>
144 </div><div class="memdoc">
146 <p>Return a copy of the default configuration object used by <a class="el" href="group__async__context__threadsafe__background.html#gab8bc5211f18cbc3a6817b1bf82020f8e">async_context_threadsafe_background_init_with_defaults()</a> </p>
147 <p >The caller can then modify just the settings it cares about, and call <a class="el" href="group__async__context__threadsafe__background.html#gabf48cafcbfa48c9fbef1aa7a18ded9e5">async_context_threadsafe_background_init()</a> </p><dl class="section return"><dt>Returns</dt><dd>the default configuration object </dd></dl>
151 <a id="gabf48cafcbfa48c9fbef1aa7a18ded9e5" name="gabf48cafcbfa48c9fbef1aa7a18ded9e5"></a>
152 <h2 class="memtitle"><span class="permalink"><a href="#gabf48cafcbfa48c9fbef1aa7a18ded9e5">◆ </a></span>async_context_threadsafe_background_init()</h2>
154 <div class="memitem">
155 <div class="memproto">
156 <table class="memname">
158 <td class="memname">bool async_context_threadsafe_background_init </td>
160 <td class="paramtype"><a class="el" href="structasync__context__threadsafe__background.html">async_context_threadsafe_background_t</a> * </td>
161 <td class="paramname"><em>self</em>, </td>
164 <td class="paramkey"></td>
166 <td class="paramtype"><a class="el" href="structasync__context__threadsafe__background__config.html">async_context_threadsafe_background_config_t</a> * </td>
167 <td class="paramname"><em>config</em> </td>
175 </div><div class="memdoc">
177 <p>Initialize an <a class="el" href="structasync__context__threadsafe__background.html">async_context_threadsafe_background</a> instance using the specified configuration. </p>
178 <p >If this method succeeds (returns true), then 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> is available for use and can be de-initialized by calling <a class="el" href="group__pico__async__context.html#ga66d09e106e04d70971d4fb6f09d5d949" title="End async_context processing, and free any resources.">async_context_deinit()</a>.</p>
179 <dl class="params"><dt>Parameters</dt><dd>
180 <table class="params">
181 <tr><td class="paramname">self</td><td>a pointer to <a class="el" href="structasync__context__threadsafe__background.html">async_context_threadsafe_background</a> structure to initialize </td></tr>
182 <tr><td class="paramname">config</td><td>the configuration object specifying characteristics 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> </td></tr>
186 <dl class="section return"><dt>Returns</dt><dd>true if initialization is successful, false otherwise </dd></dl>
190 <a id="gab8bc5211f18cbc3a6817b1bf82020f8e" name="gab8bc5211f18cbc3a6817b1bf82020f8e"></a>
191 <h2 class="memtitle"><span class="permalink"><a href="#gab8bc5211f18cbc3a6817b1bf82020f8e">◆ </a></span>async_context_threadsafe_background_init_with_defaults()</h2>
193 <div class="memitem">
194 <div class="memproto">
195 <table class="mlabels">
197 <td class="mlabels-left">
198 <table class="memname">
200 <td class="memname">static bool async_context_threadsafe_background_init_with_defaults </td>
202 <td class="paramtype"><a class="el" href="structasync__context__threadsafe__background.html">async_context_threadsafe_background_t</a> * </td>
203 <td class="paramname"><em>self</em></td><td>)</td>
208 <td class="mlabels-right">
209 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
212 </div><div class="memdoc">
214 <p>Initialize an <a class="el" href="structasync__context__threadsafe__background.html">async_context_threadsafe_background</a> instance with default values. </p>
215 <p >If this method succeeds (returns true), then 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> is available for use and can be de-initialized by calling <a class="el" href="group__pico__async__context.html#ga66d09e106e04d70971d4fb6f09d5d949" title="End async_context processing, and free any resources.">async_context_deinit()</a>.</p>
216 <dl class="params"><dt>Parameters</dt><dd>
217 <table class="params">
218 <tr><td class="paramname">self</td><td>a pointer to <a class="el" href="structasync__context__threadsafe__background.html">async_context_threadsafe_background</a> structure to initialize </td></tr>
222 <dl class="section return"><dt>Returns</dt><dd>true if initialization is successful, false otherwise </dd></dl>
226 </div><!-- contents -->
227 </div><!-- doc-content -->
229 <script src="main.js"></script>