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: pico_cyw43_arch</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__pico__cyw43__arch.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="#groups">Modules</a> |
107 <a href="#define-members">Macros</a> |
108 <a href="#func-members">Functions</a> </div>
109 <div class="headertitle"><div class="title">pico_cyw43_arch<div class="ingroups"><a class="el" href="group__networking.html">Networking Libraries</a></div></div></div>
111 <div class="contents">
113 <p>Architecture for integrating the CYW43 driver (for the wireless on Pico W) and lwIP (for TCP/IP stack) into the SDK. It is also necessary for accessing the on-board LED on Pico W.
114 <a href="#details">More...</a></p>
115 <table class="memberdecls">
116 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="groups" name="groups"></a>
117 Modules</h2></td></tr>
118 <tr class="memitem:group__cyw43__driver"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cyw43__driver.html">cyw43_driver</a></td></tr>
119 <tr class="memdesc:group__cyw43__driver"><td class="mdescLeft"> </td><td class="mdescRight">Driver used for Pico W wireless. <br /></td></tr>
120 <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
121 </table><table class="memberdecls">
122 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
123 Macros</h2></td></tr>
124 <tr class="memitem:ga2058ce9bf936fd1402f36e22335a6914"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#ga2058ce9bf936fd1402f36e22335a6914">cyw43_arch_lwip_check</a>()   cyw43_thread_lock_check()</td></tr>
125 <tr class="memdesc:ga2058ce9bf936fd1402f36e22335a6914"><td class="mdescLeft"> </td><td class="mdescRight">Checks the caller has any locks required for calling into lwIP. <a href="group__pico__cyw43__arch.html#ga2058ce9bf936fd1402f36e22335a6914">More...</a><br /></td></tr>
126 <tr class="separator:ga2058ce9bf936fd1402f36e22335a6914"><td class="memSeparator" colspan="2"> </td></tr>
127 </table><table class="memberdecls">
128 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
129 Functions</h2></td></tr>
130 <tr class="memitem:ga7a05bd21f02a0effadbba1e8266b8771"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#ga7a05bd21f02a0effadbba1e8266b8771">cyw43_arch_init</a> (void)</td></tr>
131 <tr class="memdesc:ga7a05bd21f02a0effadbba1e8266b8771"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the CYW43 architecture. <a href="group__pico__cyw43__arch.html#ga7a05bd21f02a0effadbba1e8266b8771">More...</a><br /></td></tr>
132 <tr class="separator:ga7a05bd21f02a0effadbba1e8266b8771"><td class="memSeparator" colspan="2"> </td></tr>
133 <tr class="memitem:gaf3eb9816b2413128442e4adbfc5114c5"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#gaf3eb9816b2413128442e4adbfc5114c5">cyw43_arch_init_with_country</a> (uint32_t country)</td></tr>
134 <tr class="memdesc:gaf3eb9816b2413128442e4adbfc5114c5"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the CYW43 architecture for use in a specific country. <a href="group__pico__cyw43__arch.html#gaf3eb9816b2413128442e4adbfc5114c5">More...</a><br /></td></tr>
135 <tr class="separator:gaf3eb9816b2413128442e4adbfc5114c5"><td class="memSeparator" colspan="2"> </td></tr>
136 <tr class="memitem:gae8557dfd76b719f39cf182a144dd070b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#gae8557dfd76b719f39cf182a144dd070b">cyw43_arch_deinit</a> (void)</td></tr>
137 <tr class="memdesc:gae8557dfd76b719f39cf182a144dd070b"><td class="mdescLeft"> </td><td class="mdescRight">De-initialize the CYW43 architecture. <a href="group__pico__cyw43__arch.html#gae8557dfd76b719f39cf182a144dd070b">More...</a><br /></td></tr>
138 <tr class="separator:gae8557dfd76b719f39cf182a144dd070b"><td class="memSeparator" colspan="2"> </td></tr>
139 <tr class="memitem:ga092b97e879be5b9aa9121abda23e1337"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structasync__context.html">async_context_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#ga092b97e879be5b9aa9121abda23e1337">cyw43_arch_async_context</a> (void)</td></tr>
140 <tr class="memdesc:ga092b97e879be5b9aa9121abda23e1337"><td class="mdescLeft"> </td><td class="mdescRight">Return the current <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> currently in use by the cyw43_arch code. <a href="group__pico__cyw43__arch.html#ga092b97e879be5b9aa9121abda23e1337">More...</a><br /></td></tr>
141 <tr class="separator:ga092b97e879be5b9aa9121abda23e1337"><td class="memSeparator" colspan="2"> </td></tr>
142 <tr class="memitem:ga546a36df25d7609b83bf6c4972440181"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#ga546a36df25d7609b83bf6c4972440181">cyw43_arch_set_async_context</a> (<a class="el" href="structasync__context.html">async_context_t</a> *context)</td></tr>
143 <tr class="memdesc:ga546a36df25d7609b83bf6c4972440181"><td class="mdescLeft"> </td><td class="mdescRight">Set 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> to be used by the cyw43_arch_init. <a href="group__pico__cyw43__arch.html#ga546a36df25d7609b83bf6c4972440181">More...</a><br /></td></tr>
144 <tr class="separator:ga546a36df25d7609b83bf6c4972440181"><td class="memSeparator" colspan="2"> </td></tr>
145 <tr class="memitem:ga90add164a540ed61daa8aa8df13f36a3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structasync__context.html">async_context_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#ga90add164a540ed61daa8aa8df13f36a3">cyw43_arch_init_default_async_context</a> (void)</td></tr>
146 <tr class="memdesc:ga90add164a540ed61daa8aa8df13f36a3"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the default <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> for the current cyw43_arch type. <a href="group__pico__cyw43__arch.html#ga90add164a540ed61daa8aa8df13f36a3">More...</a><br /></td></tr>
147 <tr class="separator:ga90add164a540ed61daa8aa8df13f36a3"><td class="memSeparator" colspan="2"> </td></tr>
148 <tr class="memitem:gacb76fc7935c64b2a0cb32c0b8af94782"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#gacb76fc7935c64b2a0cb32c0b8af94782">cyw43_arch_poll</a> (void)</td></tr>
149 <tr class="memdesc:gacb76fc7935c64b2a0cb32c0b8af94782"><td class="mdescLeft"> </td><td class="mdescRight">Perform any processing required by the <code>cyw43_driver</code> or the TCP/IP stack. <a href="group__pico__cyw43__arch.html#gacb76fc7935c64b2a0cb32c0b8af94782">More...</a><br /></td></tr>
150 <tr class="separator:gacb76fc7935c64b2a0cb32c0b8af94782"><td class="memSeparator" colspan="2"> </td></tr>
151 <tr class="memitem:gad8d40de29bb275e3b55f4f37ee4d3dc8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#gad8d40de29bb275e3b55f4f37ee4d3dc8">cyw43_arch_wait_for_work_until</a> (<a class="el" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> until)</td></tr>
152 <tr class="memdesc:gad8d40de29bb275e3b55f4f37ee4d3dc8"><td class="mdescLeft"> </td><td class="mdescRight">Sleep until there is cyw43_driver work to be done. <a href="group__pico__cyw43__arch.html#gad8d40de29bb275e3b55f4f37ee4d3dc8">More...</a><br /></td></tr>
153 <tr class="separator:gad8d40de29bb275e3b55f4f37ee4d3dc8"><td class="memSeparator" colspan="2"> </td></tr>
154 <tr class="memitem:ga5fc198cd8f76428160dfc66f58be29c4"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#ga5fc198cd8f76428160dfc66f58be29c4">cyw43_arch_get_country_code</a> (void)</td></tr>
155 <tr class="memdesc:ga5fc198cd8f76428160dfc66f58be29c4"><td class="mdescLeft"> </td><td class="mdescRight">Return the country code used to initialize cyw43_arch. <a href="group__pico__cyw43__arch.html#ga5fc198cd8f76428160dfc66f58be29c4">More...</a><br /></td></tr>
156 <tr class="separator:ga5fc198cd8f76428160dfc66f58be29c4"><td class="memSeparator" colspan="2"> </td></tr>
157 <tr class="memitem:ga6796a9ab5ae2cc6c51c14ecdfcda0b96"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#ga6796a9ab5ae2cc6c51c14ecdfcda0b96">cyw43_arch_enable_sta_mode</a> (void)</td></tr>
158 <tr class="memdesc:ga6796a9ab5ae2cc6c51c14ecdfcda0b96"><td class="mdescLeft"> </td><td class="mdescRight">Enables Wi-Fi STA (Station) mode. <a href="group__pico__cyw43__arch.html#ga6796a9ab5ae2cc6c51c14ecdfcda0b96">More...</a><br /></td></tr>
159 <tr class="separator:ga6796a9ab5ae2cc6c51c14ecdfcda0b96"><td class="memSeparator" colspan="2"> </td></tr>
160 <tr class="memitem:gab8b4763c68c539c8a8d31400a83fd095"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#gab8b4763c68c539c8a8d31400a83fd095">cyw43_arch_disable_sta_mode</a> (void)</td></tr>
161 <tr class="memdesc:gab8b4763c68c539c8a8d31400a83fd095"><td class="mdescLeft"> </td><td class="mdescRight">Disables Wi-Fi STA (Station) mode. <a href="group__pico__cyw43__arch.html#gab8b4763c68c539c8a8d31400a83fd095">More...</a><br /></td></tr>
162 <tr class="separator:gab8b4763c68c539c8a8d31400a83fd095"><td class="memSeparator" colspan="2"> </td></tr>
163 <tr class="memitem:ga1c3d403f299743360ecab36108e4ca7b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#ga1c3d403f299743360ecab36108e4ca7b">cyw43_arch_enable_ap_mode</a> (const char *ssid, const char *password, uint32_t auth)</td></tr>
164 <tr class="memdesc:ga1c3d403f299743360ecab36108e4ca7b"><td class="mdescLeft"> </td><td class="mdescRight">Enables Wi-Fi AP (Access point) mode. <a href="group__pico__cyw43__arch.html#ga1c3d403f299743360ecab36108e4ca7b">More...</a><br /></td></tr>
165 <tr class="separator:ga1c3d403f299743360ecab36108e4ca7b"><td class="memSeparator" colspan="2"> </td></tr>
166 <tr class="memitem:ga88bc0f9768bc9b877adb90b676514dac"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#ga88bc0f9768bc9b877adb90b676514dac">cyw43_arch_disable_ap_mode</a> (void)</td></tr>
167 <tr class="memdesc:ga88bc0f9768bc9b877adb90b676514dac"><td class="mdescLeft"> </td><td class="mdescRight">Disables Wi-Fi AP (Access point) mode. <a href="group__pico__cyw43__arch.html#ga88bc0f9768bc9b877adb90b676514dac">More...</a><br /></td></tr>
168 <tr class="separator:ga88bc0f9768bc9b877adb90b676514dac"><td class="memSeparator" colspan="2"> </td></tr>
169 <tr class="memitem:gaa8be8a816a6f40ba30cf69dd112db9d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#gaa8be8a816a6f40ba30cf69dd112db9d4">cyw43_arch_wifi_connect_blocking</a> (const char *ssid, const char *pw, uint32_t auth)</td></tr>
170 <tr class="memdesc:gaa8be8a816a6f40ba30cf69dd112db9d4"><td class="mdescLeft"> </td><td class="mdescRight">Attempt to connect to a wireless access point, blocking until the network is joined or a failure is detected. <a href="group__pico__cyw43__arch.html#gaa8be8a816a6f40ba30cf69dd112db9d4">More...</a><br /></td></tr>
171 <tr class="separator:gaa8be8a816a6f40ba30cf69dd112db9d4"><td class="memSeparator" colspan="2"> </td></tr>
172 <tr class="memitem:gab2766c44297fb1fb7fe12dc67f044bdb"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#gab2766c44297fb1fb7fe12dc67f044bdb">cyw43_arch_wifi_connect_bssid_blocking</a> (const char *ssid, const uint8_t *bssid, const char *pw, uint32_t auth)</td></tr>
173 <tr class="memdesc:gab2766c44297fb1fb7fe12dc67f044bdb"><td class="mdescLeft"> </td><td class="mdescRight">Attempt to connect to a wireless access point specified by SSID and BSSID, blocking until the network is joined or a failure is detected. <a href="group__pico__cyw43__arch.html#gab2766c44297fb1fb7fe12dc67f044bdb">More...</a><br /></td></tr>
174 <tr class="separator:gab2766c44297fb1fb7fe12dc67f044bdb"><td class="memSeparator" colspan="2"> </td></tr>
175 <tr class="memitem:gae1237b71f7793ba603a4b39da37c7a71"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#gae1237b71f7793ba603a4b39da37c7a71">cyw43_arch_wifi_connect_timeout_ms</a> (const char *ssid, const char *pw, uint32_t auth, uint32_t timeout)</td></tr>
176 <tr class="memdesc:gae1237b71f7793ba603a4b39da37c7a71"><td class="mdescLeft"> </td><td class="mdescRight">Attempt to connect to a wireless access point, blocking until the network is joined, a failure is detected or a timeout occurs. <a href="group__pico__cyw43__arch.html#gae1237b71f7793ba603a4b39da37c7a71">More...</a><br /></td></tr>
177 <tr class="separator:gae1237b71f7793ba603a4b39da37c7a71"><td class="memSeparator" colspan="2"> </td></tr>
178 <tr class="memitem:gac1aa260ffa68c0ee5dcdbbbf9af80286"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#gac1aa260ffa68c0ee5dcdbbbf9af80286">cyw43_arch_wifi_connect_bssid_timeout_ms</a> (const char *ssid, const uint8_t *bssid, const char *pw, uint32_t auth, uint32_t timeout)</td></tr>
179 <tr class="memdesc:gac1aa260ffa68c0ee5dcdbbbf9af80286"><td class="mdescLeft"> </td><td class="mdescRight">Attempt to connect to a wireless access point specified by SSID and BSSID, blocking until the network is joined, a failure is detected or a timeout occurs. <a href="group__pico__cyw43__arch.html#gac1aa260ffa68c0ee5dcdbbbf9af80286">More...</a><br /></td></tr>
180 <tr class="separator:gac1aa260ffa68c0ee5dcdbbbf9af80286"><td class="memSeparator" colspan="2"> </td></tr>
181 <tr class="memitem:ga614a37dcffe6363fd6649684cac1c14e"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#ga614a37dcffe6363fd6649684cac1c14e">cyw43_arch_wifi_connect_async</a> (const char *ssid, const char *pw, uint32_t auth)</td></tr>
182 <tr class="memdesc:ga614a37dcffe6363fd6649684cac1c14e"><td class="mdescLeft"> </td><td class="mdescRight">Start attempting to connect to a wireless access point. <a href="group__pico__cyw43__arch.html#ga614a37dcffe6363fd6649684cac1c14e">More...</a><br /></td></tr>
183 <tr class="separator:ga614a37dcffe6363fd6649684cac1c14e"><td class="memSeparator" colspan="2"> </td></tr>
184 <tr class="memitem:ga471fd4a7626a27ae7e358a664a48c510"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#ga471fd4a7626a27ae7e358a664a48c510">cyw43_arch_wifi_connect_bssid_async</a> (const char *ssid, const uint8_t *bssid, const char *pw, uint32_t auth)</td></tr>
185 <tr class="memdesc:ga471fd4a7626a27ae7e358a664a48c510"><td class="mdescLeft"> </td><td class="mdescRight">Start attempting to connect to a wireless access point specified by SSID and BSSID. <a href="group__pico__cyw43__arch.html#ga471fd4a7626a27ae7e358a664a48c510">More...</a><br /></td></tr>
186 <tr class="separator:ga471fd4a7626a27ae7e358a664a48c510"><td class="memSeparator" colspan="2"> </td></tr>
187 <tr class="memitem:ga33cca1c95fc0d7512e7fef4a59fd7475"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#ga33cca1c95fc0d7512e7fef4a59fd7475">cyw43_arch_gpio_put</a> (uint wl_gpio, bool value)</td></tr>
188 <tr class="memdesc:ga33cca1c95fc0d7512e7fef4a59fd7475"><td class="mdescLeft"> </td><td class="mdescRight">Set a GPIO pin on the wireless chip to a given value. <a href="group__pico__cyw43__arch.html#ga33cca1c95fc0d7512e7fef4a59fd7475">More...</a><br /></td></tr>
189 <tr class="separator:ga33cca1c95fc0d7512e7fef4a59fd7475"><td class="memSeparator" colspan="2"> </td></tr>
190 <tr class="memitem:gac494fc808052b0e7411f945f50ebe6d5"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#gac494fc808052b0e7411f945f50ebe6d5">cyw43_arch_gpio_get</a> (uint wl_gpio)</td></tr>
191 <tr class="memdesc:gac494fc808052b0e7411f945f50ebe6d5"><td class="mdescLeft"> </td><td class="mdescRight">Read the value of a GPIO pin on the wireless chip. <a href="group__pico__cyw43__arch.html#gac494fc808052b0e7411f945f50ebe6d5">More...</a><br /></td></tr>
192 <tr class="separator:gac494fc808052b0e7411f945f50ebe6d5"><td class="memSeparator" colspan="2"> </td></tr>
193 <tr class="memitem:ga6a1c4a2015fb4c2d47d6d05fc72d4cbe"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#ga6a1c4a2015fb4c2d47d6d05fc72d4cbe">cyw43_arch_lwip_begin</a> (void)</td></tr>
194 <tr class="memdesc:ga6a1c4a2015fb4c2d47d6d05fc72d4cbe"><td class="mdescLeft"> </td><td class="mdescRight">Acquire any locks required to call into lwIP. <a href="group__pico__cyw43__arch.html#ga6a1c4a2015fb4c2d47d6d05fc72d4cbe">More...</a><br /></td></tr>
195 <tr class="separator:ga6a1c4a2015fb4c2d47d6d05fc72d4cbe"><td class="memSeparator" colspan="2"> </td></tr>
196 <tr class="memitem:gae0c3d7dd9f5b41e3cf4c2ae970356df4"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#gae0c3d7dd9f5b41e3cf4c2ae970356df4">cyw43_arch_lwip_end</a> (void)</td></tr>
197 <tr class="memdesc:gae0c3d7dd9f5b41e3cf4c2ae970356df4"><td class="mdescLeft"> </td><td class="mdescRight">Release any locks required for calling into lwIP. <a href="group__pico__cyw43__arch.html#gae0c3d7dd9f5b41e3cf4c2ae970356df4">More...</a><br /></td></tr>
198 <tr class="separator:gae0c3d7dd9f5b41e3cf4c2ae970356df4"><td class="memSeparator" colspan="2"> </td></tr>
199 <tr class="memitem:ga263d31bcb5c8d387b37b4f9a578e1c27"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__cyw43__arch.html#ga263d31bcb5c8d387b37b4f9a578e1c27">cyw43_arch_lwip_protect</a> (int(*func)(void *param), void *param)</td></tr>
200 <tr class="memdesc:ga263d31bcb5c8d387b37b4f9a578e1c27"><td class="mdescLeft"> </td><td class="mdescRight">sad Release any locks required for calling into lwIP <a href="group__pico__cyw43__arch.html#ga263d31bcb5c8d387b37b4f9a578e1c27">More...</a><br /></td></tr>
201 <tr class="separator:ga263d31bcb5c8d387b37b4f9a578e1c27"><td class="memSeparator" colspan="2"> </td></tr>
203 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
204 <p >Architecture for integrating the CYW43 driver (for the wireless on Pico W) and lwIP (for TCP/IP stack) into the SDK. It is also necessary for accessing the on-board LED on Pico W. </p>
205 <p >Both the low level <code>cyw43_driver</code> and the lwIP stack require periodic servicing, and have limitations on whether they can be called from multiple cores/threads.</p>
206 <p ><code>pico_cyw43_arch</code> attempts to abstract these complications into several behavioral groups:</p>
208 <li><em>'poll'</em> - This not multi-core/IRQ safe, and requires the user to call <a class="el" href="group__pico__cyw43__arch.html#gacb76fc7935c64b2a0cb32c0b8af94782">cyw43_arch_poll</a> periodically from their main loop</li>
209 <li><em>'thread_safe_background'</em> - This is multi-core/thread/task safe, and maintenance of the driver and TCP/IP stack is handled automatically in the background</li>
210 <li><em>'freertos'</em> - This is multi-core/thread/task safe, and uses a separate FreeRTOS task to handle lwIP and and driver work.</li>
212 <p >As of right now, lwIP is the only supported TCP/IP stack, however the use of <code>pico_cyw43_arch</code> is intended to be independent of the particular TCP/IP stack used (and possibly Bluetooth stack used) in the future. For this reason, the integration of lwIP is handled in the base (<code>pico_cyw43_arch</code>) library based on the #define CYW43_LWIP used by the <code>cyw43_driver</code>.</p>
213 <dl class="section note"><dt>Note</dt><dd>As of version 1.5.0 of the Raspberry Pi Pico SDK, the <code>pico_cyw43_arch</code> library no longer directly implements the distinct behavioral abstractions. This is now handled by the more general <a class="el" href="group__pico__async__context.html">pico_async_context</a> library. The user facing behavior of pico_cyw43_arch has not changed as a result of this implementation detail, however pico_cyw43_arch is now just a thin wrapper which creates an appropriate <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 makes a simple call to add lwIP or cyw43_driver support as appropriate. You are free to perform this context creation and adding of lwIP, cyw43_driver or indeed any other additional future protocol/driver support to your <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>, however for now pico_cyw43_arch does still provide a few cyw43_ specific (i.e. Pico W) APIs for connection management, locking and GPIO interaction.</dd>
215 The connection management APIs at least may be moved to a more generic library in a future release. The locking methods are now backed by their <a class="el" href="group__pico__async__context.html">pico_async_context</a> equivalents, and those methods may be used interchangeably (see <a class="el" href="group__pico__cyw43__arch.html#ga6a1c4a2015fb4c2d47d6d05fc72d4cbe">cyw43_arch_lwip_begin</a>, <a class="el" href="group__pico__cyw43__arch.html#gae0c3d7dd9f5b41e3cf4c2ae970356df4">cyw43_arch_lwip_end</a> and <a class="el" href="group__pico__cyw43__arch.html#ga2058ce9bf936fd1402f36e22335a6914">cyw43_arch_lwip_check</a> for more details).</dd>
217 For examples of creating of your own <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 addition of <code>cyw43_driver</code> and <code>lwIP</code> support, please refer to the specific source files <code>cyw43_arch_poll.c</code>, <code>cyw43_arch_threadsafe_background.c</code> and <code>cyw43_arch_freertos.c</code>.</dd></dl>
218 <p>Whilst you can use the <code>pico_cyw43_arch</code> library directly and specify CYW43_LWIP (and other defines) yourself, several other libraries are made available to the build which aggregate the defines and other dependencies for you:</p>
220 <li><p class="startli"><b>pico_cyw43_arch_lwip_poll</b> - For using the RAW lwIP API (in <code>NO_SYS=1</code> mode) without any background processing or multi-core/thread safety.</p>
221 <p class="startli">The user must call <a class="el" href="group__pico__cyw43__arch.html#gacb76fc7935c64b2a0cb32c0b8af94782">cyw43_arch_poll</a> periodically from their main loop.</p>
222 <p class="startli">This wrapper library:</p><ul>
223 <li>Sets <code>CYW43_LWIP=1</code> to enable lwIP support in <code>pico_cyw43_arch</code> and <code>cyw43_driver</code>.</li>
224 <li>Sets <code>PICO_CYW43_ARCH_POLL=1</code> to select the polling behavior.</li>
225 <li>Adds the <code>pico_lwip</code> as a dependency to pull in lwIP.</li>
228 <li><p class="startli"><b>pico_cyw43_arch_lwip_threadsafe_background</b> - For using the RAW lwIP API (in <code>NO_SYS=1</code> mode) with multi-core/thread safety, and automatic servicing of the <code>cyw43_driver</code> and lwIP in background.</p>
229 <p class="startli">Calls into the <code>cyw43_driver</code> high level API (<a class="el" href="cyw43_8h.html" title="CYW43 driver interface.">cyw43.h</a>) may be made from either core or from lwIP callbacks, however calls into lwIP (which is not thread-safe) other than those made from lwIP callbacks, must be bracketed with <a class="el" href="group__pico__cyw43__arch.html#ga6a1c4a2015fb4c2d47d6d05fc72d4cbe">cyw43_arch_lwip_begin</a> and <a class="el" href="group__pico__cyw43__arch.html#gae0c3d7dd9f5b41e3cf4c2ae970356df4">cyw43_arch_lwip_end</a>. It is fine to bracket calls made from within lwIP callbacks too; you just don't have to.</p>
230 <dl class="section note"><dt>Note</dt><dd>lwIP callbacks happen in a (low priority) IRQ context (similar to an alarm callback), so care should be taken when interacting with other code.</dd></dl>
231 <p>This wrapper library:</p><ul>
232 <li>Sets <code>CYW43_LWIP=1</code> to enable lwIP support in <code>pico_cyw43_arch</code> and <code>cyw43_driver</code> </li>
233 <li>Sets <code>PICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1</code> to select the thread-safe/non-polling behavior.</li>
234 <li>Adds the pico_lwip as a dependency to pull in lwIP.</li>
236 <p class="startli">This library <em>can</em> also be used under the RP2040 port of FreeRTOS with lwIP in <code>NO_SYS=1</code> mode (allowing you to call <code>cyw43_driver</code> APIs from any task, and to call lwIP from lwIP callbacks, or from any task if you bracket the calls with <a class="el" href="group__pico__cyw43__arch.html#ga6a1c4a2015fb4c2d47d6d05fc72d4cbe">cyw43_arch_lwip_begin</a> and <a class="el" href="group__pico__cyw43__arch.html#gae0c3d7dd9f5b41e3cf4c2ae970356df4">cyw43_arch_lwip_end</a>. Again, you should be careful about what you do in lwIP callbacks, as you cannot call most FreeRTOS APIs from within an IRQ context. Unless you have good reason, you should probably use the full FreeRTOS integration (with <code>NO_SYS=0</code>) provided by <code>pico_cyw43_arch_lwip_sys_freertos</code>.</p>
238 <li><p class="startli"><b>pico_cyw43_arch_lwip_sys_freertos</b> - For using the full lwIP API including blocking sockets in OS (<code>NO_SYS=0</code>) mode, along with with multi-core/task/thread safety, and automatic servicing of the <code>cyw43_driver</code> and the lwIP stack.</p>
239 <p class="startli">This wrapper library:</p><ul>
240 <li>Sets <code>CYW43_LWIP=1</code> to enable lwIP support in <code>pico_cyw43_arch</code> and <code>cyw43_driver</code>.</li>
241 <li>Sets <code>PICO_CYW43_ARCH_FREERTOS=1</code> to select the NO_SYS=0 lwip/FreeRTOS integration</li>
242 <li>Sets <code>LWIP_PROVIDE_ERRNO=1</code> to provide error numbers needed for compilation without an OS</li>
243 <li>Adds the <code>pico_lwip</code> as a dependency to pull in lwIP.</li>
244 <li>Adds the lwIP/FreeRTOS code from lwip-contrib (in the contrib directory of lwIP)</li>
246 <p class="startli">Calls into the <code>cyw43_driver</code> high level API (<a class="el" href="cyw43_8h.html" title="CYW43 driver interface.">cyw43.h</a>) may be made from any task or from lwIP callbacks, but not from IRQs. Calls into the lwIP RAW API (which is not thread safe) must be bracketed with <a class="el" href="group__pico__cyw43__arch.html#ga6a1c4a2015fb4c2d47d6d05fc72d4cbe">cyw43_arch_lwip_begin</a> and <a class="el" href="group__pico__cyw43__arch.html#gae0c3d7dd9f5b41e3cf4c2ae970356df4">cyw43_arch_lwip_end</a>. It is fine to bracket calls made from within lwIP callbacks too; you just don't have to.</p>
247 <dl class="section note"><dt>Note</dt><dd>this wrapper library requires you to link FreeRTOS functionality with your application yourself.</dd></dl>
249 <li><p class="startli"><b>pico_cyw43_arch_none</b> - If you do not need the TCP/IP stack but wish to use the on-board LED.</p>
250 <p class="startli">This wrapper library:</p><ul>
251 <li>Sets <code>CYW43_LWIP=0</code> to disable lwIP support in <code>pico_cyw43_arch</code> and <code>cyw43_driver</code> </li>
255 <h2 class="groupheader">Macro Definition Documentation</h2>
256 <a id="ga2058ce9bf936fd1402f36e22335a6914" name="ga2058ce9bf936fd1402f36e22335a6914"></a>
257 <h2 class="memtitle"><span class="permalink"><a href="#ga2058ce9bf936fd1402f36e22335a6914">◆ </a></span>cyw43_arch_lwip_check</h2>
259 <div class="memitem">
260 <div class="memproto">
261 <table class="memname">
263 <td class="memname">void cyw43_arch_lwip_check</td>
265 <td class="paramtype"> </td>
266 <td class="paramname">void</td><td>)</td>
267 <td>   cyw43_thread_lock_check()</td>
270 </div><div class="memdoc">
272 <p>Checks the caller has any locks required for calling into lwIP. </p>
273 <p >The lwIP API is not thread safe. You should surround calls into the lwIP API with calls to <a class="el" href="group__pico__cyw43__arch.html#ga6a1c4a2015fb4c2d47d6d05fc72d4cbe">cyw43_arch_lwip_begin</a> and this method. Note these calls are not necessary (but harmless) when you are calling back into the lwIP API from an lwIP callback.</p>
274 <p >This method will assert in debug mode, if the above conditions are not met (i.e. it is not safe to call into the lwIP API)</p>
275 <dl class="section note"><dt>Note</dt><dd>as of SDK release 1.5.0, this is now equivalent to calling <a class="el" href="group__pico__async__context.html#ga032285b9d1a4aa325813cdbcc1f00a75">async_context_lock_check</a> on 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> associated with cyw43_arch and lwIP.</dd></dl>
276 <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__cyw43__arch.html#ga6a1c4a2015fb4c2d47d6d05fc72d4cbe" title="Acquire any locks required to call into lwIP.">cyw43_arch_lwip_begin</a> </dd>
278 <a class="el" href="group__pico__cyw43__arch.html#ga263d31bcb5c8d387b37b4f9a578e1c27" title="sad Release any locks required for calling into lwIP">cyw43_arch_lwip_protect</a> </dd>
280 <a class="el" href="group__pico__async__context.html#ga032285b9d1a4aa325813cdbcc1f00a75" title="Assert if the caller does not own the lock for the async_context.">async_context_lock_check</a> </dd>
282 <a class="el" href="group__pico__cyw43__arch.html#ga092b97e879be5b9aa9121abda23e1337" title="Return the current async_context currently in use by the cyw43_arch code.">cyw43_arch_async_context</a> </dd></dl>
286 <h2 class="groupheader">Function Documentation</h2>
287 <a id="ga092b97e879be5b9aa9121abda23e1337" name="ga092b97e879be5b9aa9121abda23e1337"></a>
288 <h2 class="memtitle"><span class="permalink"><a href="#ga092b97e879be5b9aa9121abda23e1337">◆ </a></span>cyw43_arch_async_context()</h2>
290 <div class="memitem">
291 <div class="memproto">
292 <table class="memname">
294 <td class="memname"><a class="el" href="structasync__context.html">async_context_t</a> * cyw43_arch_async_context </td>
296 <td class="paramtype">void </td>
297 <td class="paramname"></td><td>)</td>
301 </div><div class="memdoc">
303 <p>Return the current <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> currently in use by the cyw43_arch code. </p>
304 <dl class="section return"><dt>Returns</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>. </dd></dl>
308 <a id="gae8557dfd76b719f39cf182a144dd070b" name="gae8557dfd76b719f39cf182a144dd070b"></a>
309 <h2 class="memtitle"><span class="permalink"><a href="#gae8557dfd76b719f39cf182a144dd070b">◆ </a></span>cyw43_arch_deinit()</h2>
311 <div class="memitem">
312 <div class="memproto">
313 <table class="memname">
315 <td class="memname">void cyw43_arch_deinit </td>
317 <td class="paramtype">void </td>
318 <td class="paramname"></td><td>)</td>
322 </div><div class="memdoc">
324 <p>De-initialize the CYW43 architecture. </p>
325 <p >This method de-initializes the <code>cyw43_driver</code> code and de-initializes the lwIP stack (if it was enabled at build time). Note this method should always be called from the same core (or RTOS task, depending on the environment) as <a class="el" href="group__pico__cyw43__arch.html#ga7a05bd21f02a0effadbba1e8266b8771">cyw43_arch_init</a>.</p>
326 <p >Additionally if the cyw43_arch is using its own <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, then that instance is de-initialized. </p>
330 <a id="ga88bc0f9768bc9b877adb90b676514dac" name="ga88bc0f9768bc9b877adb90b676514dac"></a>
331 <h2 class="memtitle"><span class="permalink"><a href="#ga88bc0f9768bc9b877adb90b676514dac">◆ </a></span>cyw43_arch_disable_ap_mode()</h2>
333 <div class="memitem">
334 <div class="memproto">
335 <table class="memname">
337 <td class="memname">void cyw43_arch_disable_ap_mode </td>
339 <td class="paramtype">void </td>
340 <td class="paramname"></td><td>)</td>
344 </div><div class="memdoc">
346 <p>Disables Wi-Fi AP (Access point) mode. </p>
347 <p >This Disbles the Wi-Fi in <em>Access</em> <em>Point</em> mode. </p>
351 <a id="gab8b4763c68c539c8a8d31400a83fd095" name="gab8b4763c68c539c8a8d31400a83fd095"></a>
352 <h2 class="memtitle"><span class="permalink"><a href="#gab8b4763c68c539c8a8d31400a83fd095">◆ </a></span>cyw43_arch_disable_sta_mode()</h2>
354 <div class="memitem">
355 <div class="memproto">
356 <table class="memname">
358 <td class="memname">void cyw43_arch_disable_sta_mode </td>
360 <td class="paramtype">void </td>
361 <td class="paramname"></td><td>)</td>
365 </div><div class="memdoc">
367 <p>Disables Wi-Fi STA (Station) mode. </p>
368 <p >This disables the Wi-Fi in <em>Station</em> mode, disconnecting any active connection. You should subsequently check the status by calling <a class="el" href="group__cyw43__driver.html#ga71e656d02aabca214ae344f29ae1d033">cyw43_wifi_link_status</a>. </p>
372 <a id="ga1c3d403f299743360ecab36108e4ca7b" name="ga1c3d403f299743360ecab36108e4ca7b"></a>
373 <h2 class="memtitle"><span class="permalink"><a href="#ga1c3d403f299743360ecab36108e4ca7b">◆ </a></span>cyw43_arch_enable_ap_mode()</h2>
375 <div class="memitem">
376 <div class="memproto">
377 <table class="memname">
379 <td class="memname">void cyw43_arch_enable_ap_mode </td>
381 <td class="paramtype">const char * </td>
382 <td class="paramname"><em>ssid</em>, </td>
385 <td class="paramkey"></td>
387 <td class="paramtype">const char * </td>
388 <td class="paramname"><em>password</em>, </td>
391 <td class="paramkey"></td>
393 <td class="paramtype">uint32_t </td>
394 <td class="paramname"><em>auth</em> </td>
402 </div><div class="memdoc">
404 <p>Enables Wi-Fi AP (Access point) mode. </p>
405 <p >This enables the Wi-Fi in <em>Access</em> <em>Point</em> mode such that connections can be made to the device by other Wi-Fi clients </p><dl class="params"><dt>Parameters</dt><dd>
406 <table class="params">
407 <tr><td class="paramname">ssid</td><td>the name for the access point </td></tr>
408 <tr><td class="paramname">password</td><td>the password to use or NULL for no password. </td></tr>
409 <tr><td class="paramname">auth</td><td>the authorization type to use when the password is enabled. Values are <a class="el" href="group__cyw43__ll.html#ga3680993589cb0c98f3ea04f1b63b0158">CYW43_AUTH_WPA_TKIP_PSK</a>, <a class="el" href="group__cyw43__ll.html#ga2268ba0fac688f562463e1a57588a432">CYW43_AUTH_WPA2_AES_PSK</a>, or <a class="el" href="group__cyw43__ll.html#ga7ffceffaf66bb7a121dfdd8ee82c5b48">CYW43_AUTH_WPA2_MIXED_PSK</a> (see <a class="el" href="group__cyw43__ll.html#CYW43_AUTH_">CYW43_AUTH_</a>) </td></tr>
416 <a id="ga6796a9ab5ae2cc6c51c14ecdfcda0b96" name="ga6796a9ab5ae2cc6c51c14ecdfcda0b96"></a>
417 <h2 class="memtitle"><span class="permalink"><a href="#ga6796a9ab5ae2cc6c51c14ecdfcda0b96">◆ </a></span>cyw43_arch_enable_sta_mode()</h2>
419 <div class="memitem">
420 <div class="memproto">
421 <table class="memname">
423 <td class="memname">void cyw43_arch_enable_sta_mode </td>
425 <td class="paramtype">void </td>
426 <td class="paramname"></td><td>)</td>
430 </div><div class="memdoc">
432 <p>Enables Wi-Fi STA (Station) mode. </p>
433 <p >This enables the Wi-Fi in <em>Station</em> mode such that connections can be made to other Wi-Fi Access Points </p>
437 <a id="ga5fc198cd8f76428160dfc66f58be29c4" name="ga5fc198cd8f76428160dfc66f58be29c4"></a>
438 <h2 class="memtitle"><span class="permalink"><a href="#ga5fc198cd8f76428160dfc66f58be29c4">◆ </a></span>cyw43_arch_get_country_code()</h2>
440 <div class="memitem">
441 <div class="memproto">
442 <table class="memname">
444 <td class="memname">uint32_t cyw43_arch_get_country_code </td>
446 <td class="paramtype">void </td>
447 <td class="paramname"></td><td>)</td>
451 </div><div class="memdoc">
453 <p>Return the country code used to initialize cyw43_arch. </p>
454 <dl class="section return"><dt>Returns</dt><dd>the country code (see <a class="el" href="group__cyw43__driver.html#CYW43_COUNTRY_">CYW43_COUNTRY_</a>) </dd></dl>
458 <a id="gac494fc808052b0e7411f945f50ebe6d5" name="gac494fc808052b0e7411f945f50ebe6d5"></a>
459 <h2 class="memtitle"><span class="permalink"><a href="#gac494fc808052b0e7411f945f50ebe6d5">◆ </a></span>cyw43_arch_gpio_get()</h2>
461 <div class="memitem">
462 <div class="memproto">
463 <table class="memname">
465 <td class="memname">bool cyw43_arch_gpio_get </td>
467 <td class="paramtype">uint </td>
468 <td class="paramname"><em>wl_gpio</em></td><td>)</td>
472 </div><div class="memdoc">
474 <p>Read the value of a GPIO pin on the wireless chip. </p>
475 <dl class="section note"><dt>Note</dt><dd>this method does not check for errors setting the GPIO. You can use the lower level cyw43_gpio_get instead if you wish to check for errors.</dd></dl>
476 <dl class="params"><dt>Parameters</dt><dd>
477 <table class="params">
478 <tr><td class="paramname">wl_gpio</td><td>the GPIO number on the wireless chip </td></tr>
482 <dl class="section return"><dt>Returns</dt><dd>true if the GPIO is high, false otherwise </dd></dl>
486 <a id="ga33cca1c95fc0d7512e7fef4a59fd7475" name="ga33cca1c95fc0d7512e7fef4a59fd7475"></a>
487 <h2 class="memtitle"><span class="permalink"><a href="#ga33cca1c95fc0d7512e7fef4a59fd7475">◆ </a></span>cyw43_arch_gpio_put()</h2>
489 <div class="memitem">
490 <div class="memproto">
491 <table class="memname">
493 <td class="memname">void cyw43_arch_gpio_put </td>
495 <td class="paramtype">uint </td>
496 <td class="paramname"><em>wl_gpio</em>, </td>
499 <td class="paramkey"></td>
501 <td class="paramtype">bool </td>
502 <td class="paramname"><em>value</em> </td>
510 </div><div class="memdoc">
512 <p>Set a GPIO pin on the wireless chip to a given value. </p>
513 <dl class="section note"><dt>Note</dt><dd>this method does not check for errors setting the GPIO. You can use the lower level cyw43_gpio_set instead if you wish to check for errors.</dd></dl>
514 <dl class="params"><dt>Parameters</dt><dd>
515 <table class="params">
516 <tr><td class="paramname">wl_gpio</td><td>the GPIO number on the wireless chip </td></tr>
517 <tr><td class="paramname">value</td><td>true to set the GPIO, false to clear it. </td></tr>
524 <a id="ga7a05bd21f02a0effadbba1e8266b8771" name="ga7a05bd21f02a0effadbba1e8266b8771"></a>
525 <h2 class="memtitle"><span class="permalink"><a href="#ga7a05bd21f02a0effadbba1e8266b8771">◆ </a></span>cyw43_arch_init()</h2>
527 <div class="memitem">
528 <div class="memproto">
529 <table class="memname">
531 <td class="memname">int cyw43_arch_init </td>
533 <td class="paramtype">void </td>
534 <td class="paramname"></td><td>)</td>
538 </div><div class="memdoc">
540 <p>Initialize the CYW43 architecture. </p>
541 <p >This method initializes the <code>cyw43_driver</code> code and initializes the lwIP stack (if it was enabled at build time). This method must be called prior to using any other <code>pico_cyw43_arch</code>, <code>cyw43_driver</code> or lwIP functions.</p>
542 <dl class="section note"><dt>Note</dt><dd>this method initializes wireless with a country code of <code>PICO_CYW43_ARCH_DEFAULT_COUNTRY_CODE</code> which defaults to <code>CYW43_COUNTRY_WORLDWIDE</code>. Worldwide settings may not give the best performance; consider setting PICO_CYW43_ARCH_DEFAULT_COUNTRY_CODE to a different value or calling <a class="el" href="group__pico__cyw43__arch.html#gaf3eb9816b2413128442e4adbfc5114c5">cyw43_arch_init_with_country</a></dd></dl>
543 <p>By default this method initializes the cyw43_arch code's own <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> by calling <a class="el" href="group__pico__cyw43__arch.html#ga90add164a540ed61daa8aa8df13f36a3">cyw43_arch_init_default_async_context</a>, however the user can specify use of their own <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> by calling <a class="el" href="group__pico__cyw43__arch.html#ga546a36df25d7609b83bf6c4972440181">cyw43_arch_set_async_context()</a> before calling this method</p>
544 <dl class="section return"><dt>Returns</dt><dd>0 if the initialization is successful, an error code otherwise </dd></dl>
545 <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__base.html#gaddcb20bc9a61ceff479aa87369a862aa" title="Common return codes from pico_sdk methods that return a status.">pico_error_codes</a> </dd></dl>
549 <a id="ga90add164a540ed61daa8aa8df13f36a3" name="ga90add164a540ed61daa8aa8df13f36a3"></a>
550 <h2 class="memtitle"><span class="permalink"><a href="#ga90add164a540ed61daa8aa8df13f36a3">◆ </a></span>cyw43_arch_init_default_async_context()</h2>
552 <div class="memitem">
553 <div class="memproto">
554 <table class="memname">
556 <td class="memname"><a class="el" href="structasync__context.html">async_context_t</a> * cyw43_arch_init_default_async_context </td>
558 <td class="paramtype">void </td>
559 <td class="paramname"></td><td>)</td>
563 </div><div class="memdoc">
565 <p>Initialize the default <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> for the current cyw43_arch type. </p>
566 <p >This method initializes and returns a pointer to the static <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> associated with cyw43_arch. This method is called by <a class="el" href="group__pico__cyw43__arch.html#ga7a05bd21f02a0effadbba1e8266b8771">cyw43_arch_init</a> automatically if a different <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> has not been set by <a class="el" href="group__pico__cyw43__arch.html#ga546a36df25d7609b83bf6c4972440181">cyw43_arch_set_async_context</a></p>
567 <dl class="section return"><dt>Returns</dt><dd>the context or NULL if initialization failed. </dd></dl>
571 <a id="gaf3eb9816b2413128442e4adbfc5114c5" name="gaf3eb9816b2413128442e4adbfc5114c5"></a>
572 <h2 class="memtitle"><span class="permalink"><a href="#gaf3eb9816b2413128442e4adbfc5114c5">◆ </a></span>cyw43_arch_init_with_country()</h2>
574 <div class="memitem">
575 <div class="memproto">
576 <table class="memname">
578 <td class="memname">int cyw43_arch_init_with_country </td>
580 <td class="paramtype">uint32_t </td>
581 <td class="paramname"><em>country</em></td><td>)</td>
585 </div><div class="memdoc">
587 <p>Initialize the CYW43 architecture for use in a specific country. </p>
588 <p >This method initializes the <code>cyw43_driver</code> code and initializes the lwIP stack (if it was enabled at build time). This method must be called prior to using any other <code>pico_cyw43_arch</code>, <code>cyw43_driver</code> or lwIP functions.</p>
589 <p >By default this method initializes the cyw43_arch code's own <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> by calling <a class="el" href="group__pico__cyw43__arch.html#ga90add164a540ed61daa8aa8df13f36a3">cyw43_arch_init_default_async_context</a>, however the user can specify use of their own <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> by calling <a class="el" href="group__pico__cyw43__arch.html#ga546a36df25d7609b83bf6c4972440181">cyw43_arch_set_async_context()</a> before calling this method</p>
590 <dl class="params"><dt>Parameters</dt><dd>
591 <table class="params">
592 <tr><td class="paramname">country</td><td>the country code to use (see <a class="el" href="group__cyw43__driver.html#CYW43_COUNTRY_">CYW43_COUNTRY_</a>) </td></tr>
596 <dl class="section return"><dt>Returns</dt><dd>0 if the initialization is successful, an error code otherwise </dd></dl>
597 <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__base.html#gaddcb20bc9a61ceff479aa87369a862aa" title="Common return codes from pico_sdk methods that return a status.">pico_error_codes</a> </dd></dl>
601 <a id="ga6a1c4a2015fb4c2d47d6d05fc72d4cbe" name="ga6a1c4a2015fb4c2d47d6d05fc72d4cbe"></a>
602 <h2 class="memtitle"><span class="permalink"><a href="#ga6a1c4a2015fb4c2d47d6d05fc72d4cbe">◆ </a></span>cyw43_arch_lwip_begin()</h2>
604 <div class="memitem">
605 <div class="memproto">
606 <table class="mlabels">
608 <td class="mlabels-left">
609 <table class="memname">
611 <td class="memname">cyw43_arch_lwip_begin </td>
613 <td class="paramtype">void </td>
614 <td class="paramname"></td><td>)</td>
619 <td class="mlabels-right">
620 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
623 </div><div class="memdoc">
625 <p>Acquire any locks required to call into lwIP. </p>
626 <p >The lwIP API is not thread safe. You should surround calls into the lwIP API with calls to this method and <a class="el" href="group__pico__cyw43__arch.html#gae0c3d7dd9f5b41e3cf4c2ae970356df4">cyw43_arch_lwip_end</a>. Note these calls are not necessary (but harmless) when you are calling back into the lwIP API from an lwIP callback. If you are using single-core polling only (pico_cyw43_arch_poll) then these calls are no-ops anyway it is good practice to call them anyway where they are necessary.</p>
627 <dl class="section note"><dt>Note</dt><dd>as of SDK release 1.5.0, this is now equivalent to calling <a class="el" href="group__pico__async__context.html#ga404d5e6a8ef79159c692dc040f2ded44">async_context_acquire_lock_blocking</a> on 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> associated with cyw43_arch and lwIP.</dd></dl>
628 <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__cyw43__arch.html#gae0c3d7dd9f5b41e3cf4c2ae970356df4" title="Release any locks required for calling into lwIP.">cyw43_arch_lwip_end</a> </dd>
630 <a class="el" href="group__pico__cyw43__arch.html#ga263d31bcb5c8d387b37b4f9a578e1c27" title="sad Release any locks required for calling into lwIP">cyw43_arch_lwip_protect</a> </dd>
632 <a class="el" href="group__pico__async__context.html#ga404d5e6a8ef79159c692dc040f2ded44" title="Acquire the async_context lock.">async_context_acquire_lock_blocking</a> </dd>
634 <a class="el" href="group__pico__cyw43__arch.html#ga092b97e879be5b9aa9121abda23e1337" title="Return the current async_context currently in use by the cyw43_arch code.">cyw43_arch_async_context</a> </dd></dl>
638 <a id="gae0c3d7dd9f5b41e3cf4c2ae970356df4" name="gae0c3d7dd9f5b41e3cf4c2ae970356df4"></a>
639 <h2 class="memtitle"><span class="permalink"><a href="#gae0c3d7dd9f5b41e3cf4c2ae970356df4">◆ </a></span>cyw43_arch_lwip_end()</h2>
641 <div class="memitem">
642 <div class="memproto">
643 <table class="mlabels">
645 <td class="mlabels-left">
646 <table class="memname">
648 <td class="memname">void cyw43_arch_lwip_end </td>
650 <td class="paramtype">void </td>
651 <td class="paramname"></td><td>)</td>
656 <td class="mlabels-right">
657 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
660 </div><div class="memdoc">
662 <p>Release any locks required for calling into lwIP. </p>
663 <p >The lwIP API is not thread safe. You should surround calls into the lwIP API with calls to <a class="el" href="group__pico__cyw43__arch.html#ga6a1c4a2015fb4c2d47d6d05fc72d4cbe">cyw43_arch_lwip_begin</a> and this method. Note these calls are not necessary (but harmless) when you are calling back into the lwIP API from an lwIP callback. If you are using single-core polling only (pico_cyw43_arch_poll) then these calls are no-ops anyway it is good practice to call them anyway where they are necessary.</p>
664 <dl class="section note"><dt>Note</dt><dd>as of SDK release 1.5.0, this is now equivalent to calling <a class="el" href="group__pico__async__context.html#gada9eb6dbc0442ba9cbb44a41526f3b9f">async_context_release_lock</a> on 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> associated with cyw43_arch and lwIP.</dd></dl>
665 <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__cyw43__arch.html#ga6a1c4a2015fb4c2d47d6d05fc72d4cbe" title="Acquire any locks required to call into lwIP.">cyw43_arch_lwip_begin</a> </dd>
667 <a class="el" href="group__pico__cyw43__arch.html#ga263d31bcb5c8d387b37b4f9a578e1c27" title="sad Release any locks required for calling into lwIP">cyw43_arch_lwip_protect</a> </dd>
669 <a class="el" href="group__pico__async__context.html#gada9eb6dbc0442ba9cbb44a41526f3b9f" title="Release the async_context lock.">async_context_release_lock</a> </dd>
671 <a class="el" href="group__pico__cyw43__arch.html#ga092b97e879be5b9aa9121abda23e1337" title="Return the current async_context currently in use by the cyw43_arch code.">cyw43_arch_async_context</a> </dd></dl>
675 <a id="ga263d31bcb5c8d387b37b4f9a578e1c27" name="ga263d31bcb5c8d387b37b4f9a578e1c27"></a>
676 <h2 class="memtitle"><span class="permalink"><a href="#ga263d31bcb5c8d387b37b4f9a578e1c27">◆ </a></span>cyw43_arch_lwip_protect()</h2>
678 <div class="memitem">
679 <div class="memproto">
680 <table class="mlabels">
682 <td class="mlabels-left">
683 <table class="memname">
685 <td class="memname">int cyw43_arch_lwip_protect </td>
687 <td class="paramtype">int(*)(void *param) </td>
688 <td class="paramname"><em>func</em>, </td>
691 <td class="paramkey"></td>
693 <td class="paramtype">void * </td>
694 <td class="paramname"><em>param</em> </td>
703 <td class="mlabels-right">
704 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
707 </div><div class="memdoc">
709 <p>sad Release any locks required for calling into lwIP </p>
710 <p >The lwIP API is not thread safe. You can use this method to wrap a function with any locking required to call into the lwIP API. If you are using single-core polling only (pico_cyw43_arch_poll) then there are no locks to required, but it is still good practice to use this function.</p>
711 <dl class="params"><dt>Parameters</dt><dd>
712 <table class="params">
713 <tr><td class="paramname">func</td><td>the function ta call with any required locks held </td></tr>
714 <tr><td class="paramname">param</td><td>parameter to pass to <code>func</code> </td></tr>
718 <dl class="section return"><dt>Returns</dt><dd>the return value from <code>func</code> </dd></dl>
719 <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__cyw43__arch.html#ga6a1c4a2015fb4c2d47d6d05fc72d4cbe" title="Acquire any locks required to call into lwIP.">cyw43_arch_lwip_begin</a> </dd>
721 <a class="el" href="group__pico__cyw43__arch.html#gae0c3d7dd9f5b41e3cf4c2ae970356df4" title="Release any locks required for calling into lwIP.">cyw43_arch_lwip_end</a> </dd></dl>
725 <a id="gacb76fc7935c64b2a0cb32c0b8af94782" name="gacb76fc7935c64b2a0cb32c0b8af94782"></a>
726 <h2 class="memtitle"><span class="permalink"><a href="#gacb76fc7935c64b2a0cb32c0b8af94782">◆ </a></span>cyw43_arch_poll()</h2>
728 <div class="memitem">
729 <div class="memproto">
730 <table class="memname">
732 <td class="memname">void cyw43_arch_poll </td>
734 <td class="paramtype">void </td>
735 <td class="paramname"></td><td>)</td>
739 </div><div class="memdoc">
741 <p>Perform any processing required by the <code>cyw43_driver</code> or the TCP/IP stack. </p>
742 <p >This method must be called periodically from the main loop when using a <em>polling</em> style <code>pico_cyw43_arch</code> (e.g. <code>pico_cyw43_arch_lwip_poll</code> ). It may be called in other styles, but it is unnecessary to do so. </p>
746 <a id="ga546a36df25d7609b83bf6c4972440181" name="ga546a36df25d7609b83bf6c4972440181"></a>
747 <h2 class="memtitle"><span class="permalink"><a href="#ga546a36df25d7609b83bf6c4972440181">◆ </a></span>cyw43_arch_set_async_context()</h2>
749 <div class="memitem">
750 <div class="memproto">
751 <table class="memname">
753 <td class="memname">void cyw43_arch_set_async_context </td>
755 <td class="paramtype"><a class="el" href="structasync__context.html">async_context_t</a> * </td>
756 <td class="paramname"><em>context</em></td><td>)</td>
760 </div><div class="memdoc">
762 <p>Set 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> to be used by the cyw43_arch_init. </p>
763 <dl class="section note"><dt>Note</dt><dd>This method must be called before calling cyw43_arch_init or cyw43_arch_init_with_country if you wish to use a custom <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.</dd></dl>
764 <dl class="params"><dt>Parameters</dt><dd>
765 <table class="params">
766 <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> to be used </td></tr>
773 <a id="gad8d40de29bb275e3b55f4f37ee4d3dc8" name="gad8d40de29bb275e3b55f4f37ee4d3dc8"></a>
774 <h2 class="memtitle"><span class="permalink"><a href="#gad8d40de29bb275e3b55f4f37ee4d3dc8">◆ </a></span>cyw43_arch_wait_for_work_until()</h2>
776 <div class="memitem">
777 <div class="memproto">
778 <table class="memname">
780 <td class="memname">void cyw43_arch_wait_for_work_until </td>
782 <td class="paramtype"><a class="el" href="group__timestamp.html#ga8b7f3d602cc053f05bacceeacc257ed8">absolute_time_t</a> </td>
783 <td class="paramname"><em>until</em></td><td>)</td>
787 </div><div class="memdoc">
789 <p>Sleep until there is cyw43_driver work to be done. </p>
790 <p >This method may be called by code that is waiting for an event to come from the cyw43_driver, and has no work to do, but would like to sleep without blocking any background work associated with the cyw43_driver.</p>
791 <dl class="params"><dt>Parameters</dt><dd>
792 <table class="params">
793 <tr><td class="paramname">until</td><td>the time to wait until if there is no work to do. </td></tr>
800 <a id="ga614a37dcffe6363fd6649684cac1c14e" name="ga614a37dcffe6363fd6649684cac1c14e"></a>
801 <h2 class="memtitle"><span class="permalink"><a href="#ga614a37dcffe6363fd6649684cac1c14e">◆ </a></span>cyw43_arch_wifi_connect_async()</h2>
803 <div class="memitem">
804 <div class="memproto">
805 <table class="memname">
807 <td class="memname">int cyw43_arch_wifi_connect_async </td>
809 <td class="paramtype">const char * </td>
810 <td class="paramname"><em>ssid</em>, </td>
813 <td class="paramkey"></td>
815 <td class="paramtype">const char * </td>
816 <td class="paramname"><em>pw</em>, </td>
819 <td class="paramkey"></td>
821 <td class="paramtype">uint32_t </td>
822 <td class="paramname"><em>auth</em> </td>
830 </div><div class="memdoc">
832 <p>Start attempting to connect to a wireless access point. </p>
833 <p >This method tells the CYW43 driver to start connecting to an access point. You should subsequently check the status by calling <a class="el" href="group__cyw43__driver.html#ga71e656d02aabca214ae344f29ae1d033">cyw43_wifi_link_status</a>.</p>
834 <dl class="params"><dt>Parameters</dt><dd>
835 <table class="params">
836 <tr><td class="paramname">ssid</td><td>the network name to connect to </td></tr>
837 <tr><td class="paramname">pw</td><td>the network password or NULL if there is no password required </td></tr>
838 <tr><td class="paramname">auth</td><td>the authorization type to use when the password is enabled. Values are <a class="el" href="group__cyw43__ll.html#ga3680993589cb0c98f3ea04f1b63b0158">CYW43_AUTH_WPA_TKIP_PSK</a>, <a class="el" href="group__cyw43__ll.html#ga2268ba0fac688f562463e1a57588a432">CYW43_AUTH_WPA2_AES_PSK</a>, or <a class="el" href="group__cyw43__ll.html#ga7ffceffaf66bb7a121dfdd8ee82c5b48">CYW43_AUTH_WPA2_MIXED_PSK</a> (see <a class="el" href="group__cyw43__ll.html#CYW43_AUTH_">CYW43_AUTH_</a>)</td></tr>
842 <dl class="section return"><dt>Returns</dt><dd>0 if the scan was started successfully, an error code otherwise </dd></dl>
843 <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__base.html#gaddcb20bc9a61ceff479aa87369a862aa" title="Common return codes from pico_sdk methods that return a status.">pico_error_codes</a> </dd></dl>
847 <a id="gaa8be8a816a6f40ba30cf69dd112db9d4" name="gaa8be8a816a6f40ba30cf69dd112db9d4"></a>
848 <h2 class="memtitle"><span class="permalink"><a href="#gaa8be8a816a6f40ba30cf69dd112db9d4">◆ </a></span>cyw43_arch_wifi_connect_blocking()</h2>
850 <div class="memitem">
851 <div class="memproto">
852 <table class="memname">
854 <td class="memname">int cyw43_arch_wifi_connect_blocking </td>
856 <td class="paramtype">const char * </td>
857 <td class="paramname"><em>ssid</em>, </td>
860 <td class="paramkey"></td>
862 <td class="paramtype">const char * </td>
863 <td class="paramname"><em>pw</em>, </td>
866 <td class="paramkey"></td>
868 <td class="paramtype">uint32_t </td>
869 <td class="paramname"><em>auth</em> </td>
877 </div><div class="memdoc">
879 <p>Attempt to connect to a wireless access point, blocking until the network is joined or a failure is detected. </p>
880 <dl class="params"><dt>Parameters</dt><dd>
881 <table class="params">
882 <tr><td class="paramname">ssid</td><td>the network name to connect to </td></tr>
883 <tr><td class="paramname">pw</td><td>the network password or NULL if there is no password required </td></tr>
884 <tr><td class="paramname">auth</td><td>the authorization type to use when the password is enabled. Values are <a class="el" href="group__cyw43__ll.html#ga3680993589cb0c98f3ea04f1b63b0158">CYW43_AUTH_WPA_TKIP_PSK</a>, <a class="el" href="group__cyw43__ll.html#ga2268ba0fac688f562463e1a57588a432">CYW43_AUTH_WPA2_AES_PSK</a>, or <a class="el" href="group__cyw43__ll.html#ga7ffceffaf66bb7a121dfdd8ee82c5b48">CYW43_AUTH_WPA2_MIXED_PSK</a> (see <a class="el" href="group__cyw43__ll.html#CYW43_AUTH_">CYW43_AUTH_</a>)</td></tr>
888 <dl class="section return"><dt>Returns</dt><dd>0 if the initialization is successful, an error code otherwise </dd></dl>
889 <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__base.html#gaddcb20bc9a61ceff479aa87369a862aa" title="Common return codes from pico_sdk methods that return a status.">pico_error_codes</a> </dd></dl>
893 <a id="ga471fd4a7626a27ae7e358a664a48c510" name="ga471fd4a7626a27ae7e358a664a48c510"></a>
894 <h2 class="memtitle"><span class="permalink"><a href="#ga471fd4a7626a27ae7e358a664a48c510">◆ </a></span>cyw43_arch_wifi_connect_bssid_async()</h2>
896 <div class="memitem">
897 <div class="memproto">
898 <table class="memname">
900 <td class="memname">int cyw43_arch_wifi_connect_bssid_async </td>
902 <td class="paramtype">const char * </td>
903 <td class="paramname"><em>ssid</em>, </td>
906 <td class="paramkey"></td>
908 <td class="paramtype">const uint8_t * </td>
909 <td class="paramname"><em>bssid</em>, </td>
912 <td class="paramkey"></td>
914 <td class="paramtype">const char * </td>
915 <td class="paramname"><em>pw</em>, </td>
918 <td class="paramkey"></td>
920 <td class="paramtype">uint32_t </td>
921 <td class="paramname"><em>auth</em> </td>
929 </div><div class="memdoc">
931 <p>Start attempting to connect to a wireless access point specified by SSID and BSSID. </p>
932 <p >This method tells the CYW43 driver to start connecting to an access point. You should subsequently check the status by calling <a class="el" href="group__cyw43__driver.html#ga71e656d02aabca214ae344f29ae1d033">cyw43_wifi_link_status</a>.</p>
933 <dl class="params"><dt>Parameters</dt><dd>
934 <table class="params">
935 <tr><td class="paramname">ssid</td><td>the network name to connect to </td></tr>
936 <tr><td class="paramname">bssid</td><td>the network BSSID to connect to or NULL if ignored </td></tr>
937 <tr><td class="paramname">pw</td><td>the network password or NULL if there is no password required </td></tr>
938 <tr><td class="paramname">auth</td><td>the authorization type to use when the password is enabled. Values are <a class="el" href="group__cyw43__ll.html#ga3680993589cb0c98f3ea04f1b63b0158">CYW43_AUTH_WPA_TKIP_PSK</a>, <a class="el" href="group__cyw43__ll.html#ga2268ba0fac688f562463e1a57588a432">CYW43_AUTH_WPA2_AES_PSK</a>, or <a class="el" href="group__cyw43__ll.html#ga7ffceffaf66bb7a121dfdd8ee82c5b48">CYW43_AUTH_WPA2_MIXED_PSK</a> (see <a class="el" href="group__cyw43__ll.html#CYW43_AUTH_">CYW43_AUTH_</a>)</td></tr>
942 <dl class="section return"><dt>Returns</dt><dd>0 if the scan was started successfully, an error code otherwise </dd></dl>
943 <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__base.html#gaddcb20bc9a61ceff479aa87369a862aa" title="Common return codes from pico_sdk methods that return a status.">pico_error_codes</a> </dd></dl>
947 <a id="gab2766c44297fb1fb7fe12dc67f044bdb" name="gab2766c44297fb1fb7fe12dc67f044bdb"></a>
948 <h2 class="memtitle"><span class="permalink"><a href="#gab2766c44297fb1fb7fe12dc67f044bdb">◆ </a></span>cyw43_arch_wifi_connect_bssid_blocking()</h2>
950 <div class="memitem">
951 <div class="memproto">
952 <table class="memname">
954 <td class="memname">int cyw43_arch_wifi_connect_bssid_blocking </td>
956 <td class="paramtype">const char * </td>
957 <td class="paramname"><em>ssid</em>, </td>
960 <td class="paramkey"></td>
962 <td class="paramtype">const uint8_t * </td>
963 <td class="paramname"><em>bssid</em>, </td>
966 <td class="paramkey"></td>
968 <td class="paramtype">const char * </td>
969 <td class="paramname"><em>pw</em>, </td>
972 <td class="paramkey"></td>
974 <td class="paramtype">uint32_t </td>
975 <td class="paramname"><em>auth</em> </td>
983 </div><div class="memdoc">
985 <p>Attempt to connect to a wireless access point specified by SSID and BSSID, blocking until the network is joined or a failure is detected. </p>
986 <dl class="params"><dt>Parameters</dt><dd>
987 <table class="params">
988 <tr><td class="paramname">ssid</td><td>the network name to connect to </td></tr>
989 <tr><td class="paramname">bssid</td><td>the network BSSID to connect to or NULL if ignored </td></tr>
990 <tr><td class="paramname">pw</td><td>the network password or NULL if there is no password required </td></tr>
991 <tr><td class="paramname">auth</td><td>the authorization type to use when the password is enabled. Values are <a class="el" href="group__cyw43__ll.html#ga3680993589cb0c98f3ea04f1b63b0158">CYW43_AUTH_WPA_TKIP_PSK</a>, <a class="el" href="group__cyw43__ll.html#ga2268ba0fac688f562463e1a57588a432">CYW43_AUTH_WPA2_AES_PSK</a>, or <a class="el" href="group__cyw43__ll.html#ga7ffceffaf66bb7a121dfdd8ee82c5b48">CYW43_AUTH_WPA2_MIXED_PSK</a> (see <a class="el" href="group__cyw43__ll.html#CYW43_AUTH_">CYW43_AUTH_</a>)</td></tr>
995 <dl class="section return"><dt>Returns</dt><dd>0 if the initialization is successful, an error code otherwise </dd></dl>
996 <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__base.html#gaddcb20bc9a61ceff479aa87369a862aa" title="Common return codes from pico_sdk methods that return a status.">pico_error_codes</a> </dd></dl>
1000 <a id="gac1aa260ffa68c0ee5dcdbbbf9af80286" name="gac1aa260ffa68c0ee5dcdbbbf9af80286"></a>
1001 <h2 class="memtitle"><span class="permalink"><a href="#gac1aa260ffa68c0ee5dcdbbbf9af80286">◆ </a></span>cyw43_arch_wifi_connect_bssid_timeout_ms()</h2>
1003 <div class="memitem">
1004 <div class="memproto">
1005 <table class="memname">
1007 <td class="memname">int cyw43_arch_wifi_connect_bssid_timeout_ms </td>
1009 <td class="paramtype">const char * </td>
1010 <td class="paramname"><em>ssid</em>, </td>
1013 <td class="paramkey"></td>
1015 <td class="paramtype">const uint8_t * </td>
1016 <td class="paramname"><em>bssid</em>, </td>
1019 <td class="paramkey"></td>
1021 <td class="paramtype">const char * </td>
1022 <td class="paramname"><em>pw</em>, </td>
1025 <td class="paramkey"></td>
1027 <td class="paramtype">uint32_t </td>
1028 <td class="paramname"><em>auth</em>, </td>
1031 <td class="paramkey"></td>
1033 <td class="paramtype">uint32_t </td>
1034 <td class="paramname"><em>timeout</em> </td>
1042 </div><div class="memdoc">
1044 <p>Attempt to connect to a wireless access point specified by SSID and BSSID, blocking until the network is joined, a failure is detected or a timeout occurs. </p>
1045 <dl class="params"><dt>Parameters</dt><dd>
1046 <table class="params">
1047 <tr><td class="paramname">ssid</td><td>the network name to connect to </td></tr>
1048 <tr><td class="paramname">bssid</td><td>the network BSSID to connect to or NULL if ignored </td></tr>
1049 <tr><td class="paramname">pw</td><td>the network password or NULL if there is no password required </td></tr>
1050 <tr><td class="paramname">auth</td><td>the authorization type to use when the password is enabled. Values are <a class="el" href="group__cyw43__ll.html#ga3680993589cb0c98f3ea04f1b63b0158">CYW43_AUTH_WPA_TKIP_PSK</a>, <a class="el" href="group__cyw43__ll.html#ga2268ba0fac688f562463e1a57588a432">CYW43_AUTH_WPA2_AES_PSK</a>, or <a class="el" href="group__cyw43__ll.html#ga7ffceffaf66bb7a121dfdd8ee82c5b48">CYW43_AUTH_WPA2_MIXED_PSK</a> (see <a class="el" href="group__cyw43__ll.html#CYW43_AUTH_">CYW43_AUTH_</a>) </td></tr>
1051 <tr><td class="paramname">timeout</td><td>how long to wait in milliseconds for a connection to succeed before giving up</td></tr>
1055 <dl class="section return"><dt>Returns</dt><dd>0 if the initialization is successful, an error code otherwise </dd></dl>
1056 <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__base.html#gaddcb20bc9a61ceff479aa87369a862aa" title="Common return codes from pico_sdk methods that return a status.">pico_error_codes</a> </dd></dl>
1060 <a id="gae1237b71f7793ba603a4b39da37c7a71" name="gae1237b71f7793ba603a4b39da37c7a71"></a>
1061 <h2 class="memtitle"><span class="permalink"><a href="#gae1237b71f7793ba603a4b39da37c7a71">◆ </a></span>cyw43_arch_wifi_connect_timeout_ms()</h2>
1063 <div class="memitem">
1064 <div class="memproto">
1065 <table class="memname">
1067 <td class="memname">int cyw43_arch_wifi_connect_timeout_ms </td>
1069 <td class="paramtype">const char * </td>
1070 <td class="paramname"><em>ssid</em>, </td>
1073 <td class="paramkey"></td>
1075 <td class="paramtype">const char * </td>
1076 <td class="paramname"><em>pw</em>, </td>
1079 <td class="paramkey"></td>
1081 <td class="paramtype">uint32_t </td>
1082 <td class="paramname"><em>auth</em>, </td>
1085 <td class="paramkey"></td>
1087 <td class="paramtype">uint32_t </td>
1088 <td class="paramname"><em>timeout</em> </td>
1096 </div><div class="memdoc">
1098 <p>Attempt to connect to a wireless access point, blocking until the network is joined, a failure is detected or a timeout occurs. </p>
1099 <dl class="params"><dt>Parameters</dt><dd>
1100 <table class="params">
1101 <tr><td class="paramname">ssid</td><td>the network name to connect to </td></tr>
1102 <tr><td class="paramname">pw</td><td>the network password or NULL if there is no password required </td></tr>
1103 <tr><td class="paramname">auth</td><td>the authorization type to use when the password is enabled. Values are <a class="el" href="group__cyw43__ll.html#ga3680993589cb0c98f3ea04f1b63b0158">CYW43_AUTH_WPA_TKIP_PSK</a>, <a class="el" href="group__cyw43__ll.html#ga2268ba0fac688f562463e1a57588a432">CYW43_AUTH_WPA2_AES_PSK</a>, or <a class="el" href="group__cyw43__ll.html#ga7ffceffaf66bb7a121dfdd8ee82c5b48">CYW43_AUTH_WPA2_MIXED_PSK</a> (see <a class="el" href="group__cyw43__ll.html#CYW43_AUTH_">CYW43_AUTH_</a>) </td></tr>
1104 <tr><td class="paramname">timeout</td><td>how long to wait in milliseconds for a connection to succeed before giving up</td></tr>
1108 <dl class="section return"><dt>Returns</dt><dd>0 if the initialization is successful, an error code otherwise </dd></dl>
1109 <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__base.html#gaddcb20bc9a61ceff479aa87369a862aa" title="Common return codes from pico_sdk methods that return a status.">pico_error_codes</a> </dd></dl>
1113 </div><!-- contents -->
1114 </div><!-- doc-content -->
1116 <script src="main.js"></script>