Host library for controlling a WiConnect enabled Wi-Fi module.

Dependents:   wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more

Revision:
39:a963f69cb2de
Parent:
34:2616445d0823
diff -r bc2b10351ee3 -r a963f69cb2de doc/mbed/html/join_2example_8cpp-example.html
--- a/doc/mbed/html/join_2example_8cpp-example.html	Thu Nov 27 10:27:18 2014 +0000
+++ b/doc/mbed/html/join_2example_8cpp-example.html	Mon Feb 23 20:30:18 2015 -0800
@@ -125,8 +125,6 @@
 <div class="line"><span class="preprocessor">#define NETWORK_PASSWORD &quot;\&quot;&lt;YOUR NETWORK PASSWORD HERE&gt;\&quot;&quot;</span></div>
 <div class="line"></div>
 <div class="line"></div>
-<div class="line"></div>
-<div class="line"></div>
 <div class="line"><span class="comment">/******************************************************************************</span></div>
 <div class="line"><span class="comment"> * Includes</span></div>
 <div class="line"><span class="comment"> */</span></div>
@@ -150,13 +148,13 @@
 <div class="line"><span class="keyword">static</span> Serial consoleSerial(STDIO_UART_TX, STDIO_UART_RX);</div>
 <div class="line"></div>
 <div class="line"></div>
-<div class="line"></div>
-<div class="line"></div>
 <div class="line"><span class="comment">/******************************************************************************</span></div>
 <div class="line"><span class="comment"> * Starting point of application</span></div>
 <div class="line"><span class="comment"> */</span></div>
 <div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div>
 <div class="line">{</div>
+<div class="line">    <a name="a0"></a><a class="code" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a> result;</div>
+<div class="line">    </div>
 <div class="line">    consoleSerial.baud(115200); <span class="comment">// console terminal to 115200 baud</span></div>
 <div class="line"></div>
 <div class="line">    <span class="comment">//-------------------------------------------------------------------------</span></div>
@@ -173,7 +171,6 @@
 <div class="line">    <span class="comment">// The internal buffer will be dynamically allocated</span></div>
 <div class="line">    Wiconnect wiconnect(serialConfig, 256, NULL, WICONNECT_RESET_PIN);</div>
 <div class="line"></div>
-<div class="line"></div>
 <div class="line">    <span class="comment">//-------------------------------------------------------------------------</span></div>
 <div class="line">    <span class="comment">// STEP 2: Initiate Communication with WiFi Module</span></div>
 <div class="line">    <span class="comment">//-------------------------------------------------------------------------</span></div>
@@ -181,12 +178,12 @@
 <div class="line">    printf(<span class="stringliteral">&quot;Initializing WiConnect Library...\r\n&quot;</span>);</div>
 <div class="line"></div>
 <div class="line">    <span class="comment">// Initialize communication with WiFi module</span></div>
-<div class="line">    <span class="keywordflow">if</span>(wiconnect.init(<span class="keyword">true</span>) != <a name="a0"></a><a class="code" href="group__api__core__types.html#gga325637ed501728bd6c8c7a7982b9ce05af0a2ad8af174aee6b52813d8528328e7">WICONNECT_SUCCESS</a>)</div>
+<div class="line">    <span class="keywordflow">if</span>(<a name="a1"></a><a class="code" href="group__api__core__macro.html#gab27aa3ef76302b5221766abfd4f47e64">WICONNECT_FAILED</a>(result, wiconnect.init(<span class="keyword">true</span>)))</div>
 <div class="line">    {</div>
-<div class="line">        <span class="keywordflow">if</span>(result == <a name="a1"></a><a class="code" href="group__api__core__types.html#gga325637ed501728bd6c8c7a7982b9ce05a62defbdafd472461054dd6bb888c9a1e">WICONNECT_FIRMWARE_OUTDATED</a>)</div>
+<div class="line">        <span class="keywordflow">if</span>(result == <a name="a2"></a><a class="code" href="group__api__core__types.html#gga325637ed501728bd6c8c7a7982b9ce05a62defbdafd472461054dd6bb888c9a1e">WICONNECT_FIRMWARE_OUTDATED</a>)</div>
 <div class="line">        {</div>
-<div class="line">            printf(<span class="stringliteral">&quot;The WiFi firmware is not supported. Run the ota example to update the firmware:\r\n&quot;</span>);</div>
-<div class="line">            printf(<span class="stringliteral">&quot;https://developer.mbed.org/teams/ACKme/code/wiconnect-ota_example&quot;</span>);</div>
+<div class="line">            printf(<span class="stringliteral">&quot;** The WiFi firmware is not supported. Run the ota example to update the firmware:\r\n&quot;</span>);</div>
+<div class="line">            printf(<span class="stringliteral">&quot;https://developer.mbed.org/teams/ACKme/code/wiconnect-ota_example\r\n\r\n&quot;</span>);</div>
 <div class="line">        }</div>
 <div class="line">        <span class="keywordflow">else</span></div>
 <div class="line">        {</div>
@@ -203,7 +200,7 @@
 <div class="line"></div>
 <div class="line">    printf(<span class="stringliteral">&quot;Joining network: %s....\r\n&quot;</span>, NETWORK_SSID);</div>
 <div class="line"></div>
-<div class="line">    <span class="keywordflow">if</span>(wiconnect.join(NETWORK_SSID, NETWORK_PASSWORD) != <a class="code" href="group__api__core__types.html#gga325637ed501728bd6c8c7a7982b9ce05af0a2ad8af174aee6b52813d8528328e7">WICONNECT_SUCCESS</a>)</div>
+<div class="line">    <span class="keywordflow">if</span>(wiconnect.join(NETWORK_SSID, NETWORK_PASSWORD) != <a name="a3"></a><a class="code" href="group__api__core__types.html#gga325637ed501728bd6c8c7a7982b9ce05af0a2ad8af174aee6b52813d8528328e7">WICONNECT_SUCCESS</a>)</div>
 <div class="line">    {</div>
 <div class="line">        printf(<span class="stringliteral">&quot;Failed to send join command\r\n&quot;</span>);</div>
 <div class="line">        <span class="keywordflow">for</span>(;;); <span class="comment">// infinite loop</span></div>