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
doc/html/sdk_8h_source.html
- Committer:
- dan_ackme
- Date:
- 2014-08-13
- Revision:
- 16:7f1d6d359787
- Parent:
- 14:85a2ed029f37
- Child:
- 17:7268f365676b
File content as of revision 16:7f1d6d359787:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <title>ACKme WiConnect Host Library</title> <link rel="icon" href="favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea" style="font-family:verdana;"> <table border='0' cellpadding='0' cellspacing='0' width="98%"> <tr style="height:20px"><td> </td></tr> <tr style="border-collapse: collapse; padding: 0;"> <td style="width:20px"></td> <td style="padding-right:40px"><img src="ackmelogo.png" alt="ACKme Logo" /></td> <td style="vertical-align:middle; text-align:left; font: bold 25px/100% Verdana, Arial, Helvetica, sans-serif;"> WiConnect Host Library- API Reference Guide</td> <td style="width:20px"></td> </tr> <tr><td> </td></tr> </table> </div><!-- Generated by Doxygen 1.8.7 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Library Overview</span></a></li> <li><a href="modules.html"><span>Library API</span></a></li> <li><a href="examples.html"><span>API Examples</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li><a href="http://wiconnect.ack.me/1.2/general_overview"><span>WiConnect Reference Manual</span></a></li> <li><a href="http://www.ack.me/WiConnect"><span>ACKme Website</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('sdk_8h_source.html','');}); </script> <div id="doc-content"> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Pages</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="headertitle"> <div class="title">sdk.h</div> </div> </div><!--header--> <div class="contents"> <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> </div> <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#pragma once</span></div> <div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div> <div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div> <div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#define MBED_SDK</span></div> <div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div> <div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include "mbed.h"</span></div> <div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div> <div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">namespace </span>wiconnect</div> <div class="line"><a name="l00037"></a><span class="lineno"> 37</span> {</div> <div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div> <div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="group__api__core__macro.html#gad466ede4f07512308e38402d777d8380"> 43</a></span> <span class="preprocessor">#define WICONNECT_ASYNC_TIMER_ENABLED</span></div> <div class="line"><a name="l00044"></a><span class="lineno"> 44</span> </div> <div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="group__api__core__macro.html#gae9cf1249b46e784aa05250e2bcbe2e02"> 48</a></span> <span class="preprocessor">#define WICONNECT_ENABLE_MALLOC</span></div> <div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div> <div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="group__api__core__macro.html#ga53fde64c3e7647a192281a015cd02f48"> 53</a></span> <span class="preprocessor">#define WICONNECT_SERIAL_RX_BUFFER</span></div> <div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div> <div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="group__api__core__macro.html#gae7b6cfdff3a9aef465d5c4434937417d"> 58</a></span> <span class="preprocessor">#define WICONNECT_USE_DEFAULT_STRING_BUFFERS</span></div> <div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div> <div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="group__api__core__macro.html#gaaff0108d684631b2bb88e1f6c255e9ac"> 64</a></span> <span class="preprocessor">#define WICONNECT_DEFAULT_MALLOC malloc</span></div> <div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div> <div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="group__api__core__macro.html#ga0a14e4bc7a0aed9311b552c0ee8fd7ef"> 69</a></span> <span class="preprocessor">#define WICONNECT_DEFAULT_FREE free</span></div> <div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div> <div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="group__api__core__macro.html#ga2e7ffaac225bc56852bb504f531aafa0"> 75</a></span> <span class="preprocessor">#define WICONNECT_DEFAULT_BAUD 115200</span></div> <div class="line"><a name="l00076"></a><span class="lineno"> 76</span> </div> <div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="group__api__core__macro.html#ga7741b7a0fbbf9b7e47898b7d30e5e321"> 80</a></span> <span class="preprocessor">#define WICONNECT_DEFAULT_TIMEOUT 3000 // ms</span></div> <div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div> <div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="group__api__core__macro.html#ga7352d6662e438d0969593df9e657d43f"> 85</a></span> <span class="preprocessor">#define WICONNECT_MAX_QUEUED_COMMANDS 8</span></div> <div class="line"><a name="l00086"></a><span class="lineno"> 86</span> </div> <div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="group__api__core__macro.html#ga9e7032540d999edf0dbae31e51c85962"> 90</a></span> <span class="preprocessor">#define WICONNECT_DEFAULT_COMMAND_PROCESSING_PERIOD 50 // ms</span></div> <div class="line"><a name="l00091"></a><span class="lineno"> 91</span> </div> <div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="group__api__core__macro.html#ga347d0e1228e8174563c6bcf48de18401"> 96</a></span> <span class="preprocessor">#define WICONNECT_DEFAULT_NONBLOCKING false</span></div> <div class="line"><a name="l00097"></a><span class="lineno"> 97</span> </div> <div class="line"><a name="l00098"></a><span class="lineno"> 98</span> </div> <div class="line"><a name="l00099"></a><span class="lineno"> 99</span> </div> <div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment">// ----------------------------------------------------------------------------</span></div> <div class="line"><a name="l00101"></a><span class="lineno"> 101</span> </div> <div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="preprocessor">#define WICONNECT_GPIO_BASE_CLASS : DigitalOut</span></div> <div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="preprocessor">#define WICONNECT_SERIAL_BASE_CLASS : RawSerial</span></div> <div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="preprocessor">#define WICONNECT_PERIODIC_TIMER_BASE_CLASS : Ticker</span></div> <div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="preprocessor">#define WICONNECT_EXTERNAL_INTERRUPT_GPIO_BASE_CLASS : InterruptIn</span></div> <div class="line"><a name="l00106"></a><span class="lineno"> 106</span> </div> <div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="preprocessor">#define WICONNECT_MAX_PIN_IRQ_HANDLERS 3</span></div> <div class="line"><a name="l00108"></a><span class="lineno"> 108</span> </div> <div class="line"><a name="l00109"></a><span class="lineno"> 109</span> </div> <div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="group__api__core__macro.html#gaa1dbeca66111f3a22d0ee6b122d69270"> 114</a></span> <span class="preprocessor">#define PIN_NC NC</span></div> <div class="line"><a name="l00115"></a><span class="lineno"> 115</span> </div> <div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c"> 120</a></span> <span class="keyword">typedef</span> PinName <a class="code" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a>;</div> <div class="line"><a name="l00121"></a><span class="lineno"> 121</span> </div> <div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="classwiconnect_1_1_serial_config.html"> 126</a></span> <span class="keyword">class </span><a class="code" href="classwiconnect_1_1_serial_config.html">SerialConfig</a></div> <div class="line"><a name="l00127"></a><span class="lineno"> 127</span> {</div> <div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <span class="keyword">public</span>:</div> <div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <a class="code" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> rx;</div> <div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <a class="code" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> tx;</div> <div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <a class="code" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> cts;</div> <div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <a class="code" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> rts;</div> <div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keywordtype">int</span> baud;</div> <div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keywordtype">void</span> *serialRxBuffer;</div> <div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keywordtype">int</span> serialRxBufferSize;</div> <div class="line"><a name="l00136"></a><span class="lineno"> 136</span> </div> <div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <a class="code" href="classwiconnect_1_1_serial_config.html">SerialConfig</a>(<a class="code" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> rx, <a class="code" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> tx, <a class="code" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> cts, <a class="code" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> rts, <span class="keywordtype">int</span> baud, <span class="keywordtype">int</span> serialRxBufferSize, <span class="keywordtype">void</span> *serialRxBuffer = NULL)</div> <div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  {</div> <div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  this->rx =rx;</div> <div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  this->tx =tx;</div> <div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  this->cts =cts;</div> <div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  this->rts =rts;</div> <div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  this->baud = baud;</div> <div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  this->serialRxBuffer =serialRxBuffer;</div> <div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  this->serialRxBufferSize =serialRxBufferSize;</div> <div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  }</div> <div class="line"><a name="l00147"></a><span class="lineno"> 147</span> </div> <div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <a class="code" href="classwiconnect_1_1_serial_config.html">SerialConfig</a>(<a class="code" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> rx, <a class="code" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> tx, <span class="keywordtype">int</span> serialRxBufferSize, <span class="keywordtype">void</span> *serialRxBuffer = NULL)</div> <div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  {</div> <div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  this->rx =rx;</div> <div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  this->tx =tx;</div> <div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  this->cts = <a class="code" href="group__api__core__macro.html#gaa1dbeca66111f3a22d0ee6b122d69270">PIN_NC</a>;</div> <div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  this->rts = <a class="code" href="group__api__core__macro.html#gaa1dbeca66111f3a22d0ee6b122d69270">PIN_NC</a>;</div> <div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  this->baud = <a class="code" href="group__api__core__macro.html#ga2e7ffaac225bc56852bb504f531aafa0">WICONNECT_DEFAULT_BAUD</a>;</div> <div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  this->serialRxBuffer =serialRxBuffer;</div> <div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  this->serialRxBufferSize =serialRxBufferSize;</div> <div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  }</div> <div class="line"><a name="l00158"></a><span class="lineno"> 158</span> </div> <div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <a class="code" href="classwiconnect_1_1_serial_config.html">SerialConfig</a>(<a class="code" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> rx, <a class="code" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> tx)</div> <div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  {</div> <div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  this->rx =rx;</div> <div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  this->tx =tx;</div> <div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  this->cts =<a class="code" href="group__api__core__macro.html#gaa1dbeca66111f3a22d0ee6b122d69270">PIN_NC</a>;</div> <div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  this->rts =<a class="code" href="group__api__core__macro.html#gaa1dbeca66111f3a22d0ee6b122d69270">PIN_NC</a>;</div> <div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  this->baud = <a class="code" href="group__api__core__macro.html#ga2e7ffaac225bc56852bb504f531aafa0">WICONNECT_DEFAULT_BAUD</a>;</div> <div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  this->serialRxBuffer =NULL;</div> <div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  this->serialRxBufferSize =0;</div> <div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  }</div> <div class="line"><a name="l00169"></a><span class="lineno"> 169</span> </div> <div class="line"><a name="l00170"></a><span class="lineno"> 170</span> };</div> <div class="line"><a name="l00171"></a><span class="lineno"> 171</span> </div> <div class="line"><a name="l00172"></a><span class="lineno"> 172</span> </div> <div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="group__api__core__macro.html#ga596d1da2fb23f4e748c83d64a47e10b3"> 177</a></span> <span class="preprocessor">#define delayMs(ms) wait_ms(ms)</span></div> <div class="line"><a name="l00178"></a><span class="lineno"> 178</span> </div> <div class="line"><a name="l00179"></a><span class="lineno"> 179</span> </div> <div class="line"><a name="l00180"></a><span class="lineno"> 180</span> </div> <div class="line"><a name="l00181"></a><span class="lineno"> 181</span> </div> <div class="line"><a name="l00182"></a><span class="lineno"> 182</span> }</div> <div class="ttc" id="classwiconnect_1_1_serial_config_html"><div class="ttname"><a href="classwiconnect_1_1_serial_config.html">wiconnect::SerialConfig</a></div><div class="ttdoc">Host<->Wiconnect Module serial configuration. </div><div class="ttdef"><b>Definition:</b> <a href="sdk_8h_source.html#l00126">sdk.h:126</a></div></div> <div class="ttc" id="group__api__core__types_html_ga1cf4dfa71da0b0dc3dc707dacf56cc9c"><div class="ttname"><a href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">wiconnect::Pin</a></div><div class="ttdeci">PinName Pin</div><div class="ttdoc">Pin name on HOST. </div><div class="ttdef"><b>Definition:</b> <a href="sdk_8h_source.html#l00120">sdk.h:120</a></div></div> <div class="ttc" id="group__api__core__macro_html_ga2e7ffaac225bc56852bb504f531aafa0"><div class="ttname"><a href="group__api__core__macro.html#ga2e7ffaac225bc56852bb504f531aafa0">WICONNECT_DEFAULT_BAUD</a></div><div class="ttdeci">#define WICONNECT_DEFAULT_BAUD</div><div class="ttdoc">The default Host<->Wiconnect Module serial BAUD rate. </div><div class="ttdef"><b>Definition:</b> <a href="sdk_8h_source.html#l00075">sdk.h:75</a></div></div> <div class="ttc" id="group__api__core__macro_html_gaa1dbeca66111f3a22d0ee6b122d69270"><div class="ttname"><a href="group__api__core__macro.html#gaa1dbeca66111f3a22d0ee6b122d69270">PIN_NC</a></div><div class="ttdeci">#define PIN_NC</div><div class="ttdoc">Default value for a pin, Not connected. </div><div class="ttdef"><b>Definition:</b> <a href="sdk_8h_source.html#l00114">sdk.h:114</a></div></div> </div><!-- fragment --></div><!-- contents --> </div><!-- doc-content --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="footer">© ACKme Networks 2014</li> </ul> </div> </body> </html>