Statistics
| Revision:

root / branches / wireless / docs / libwireless / html / xbee_8h_source.html @ 1823

History | View | Annotate | Download (8.95 KB)

1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<head>
4
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
<title>libwireless: xbee.h Source File</title>
6
<link href="tabs.css" rel="stylesheet" type="text/css"/>
7
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
8
</head>
9
<body>
10
<!-- Generated by Doxygen 1.6.3 -->
11
<div class="navigation" id="top">
12
  <div class="tabs">
13
    <ul>
14
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
15
      <li><a href="modules.html"><span>Modules</span></a></li>
16
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
17
      <li class="current"><a href="files.html"><span>Files</span></a></li>
18
    </ul>
19
  </div>
20
  <div class="tabs">
21
    <ul>
22
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
23
      <li><a href="globals.html"><span>Globals</span></a></li>
24
    </ul>
25
  </div>
26
<h1>xbee.h</h1><a href="xbee_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
27
<a name="l00038"></a>00038 <span class="preprocessor">#ifndef XBEE_H</span>
28
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define XBEE_H</span>
29
<a name="l00040"></a>00040 <span class="preprocessor"></span>
30
<a name="l00041"></a>00041 <span class="comment">// need this for C99 int types</span>
31
<a name="l00042"></a>00042 <span class="preprocessor">#ifndef STDINT_H</span>
32
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define STDINT_H</span>
33
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#include &lt;stdint.h&gt;</span>
34
<a name="l00045"></a>00045 <span class="preprocessor">#endif</span>
35
<a name="l00046"></a>00046 <span class="preprocessor"></span>
36
<a name="l00047"></a>00047 
37
<a name="l00061"></a>00061 <span class="preprocessor">#ifndef XBEE_BAUD</span>
38
<a name="l00062"></a>00062 <span class="preprocessor"></span>
39
<a name="l00063"></a><a class="code" href="group__xbee__const.html#ga7125fc8f3df24a2db8e074983206b054">00063</a> <span class="preprocessor">#define XBEE_BAUD 9600 //115200</span>
40
<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
41
<a name="l00065"></a>00065 <span class="preprocessor"></span> 
42
<a name="l00070"></a><a class="code" href="group__xbee__const.html#gae6bb9bb274d6750f954762454807a5a7">00070</a> <span class="preprocessor">#define XBEE_PAN_DEFAULT 0xFFFF</span>
43
<a name="l00071"></a>00071 <span class="preprocessor"></span>
44
<a name="l00072"></a><a class="code" href="group__xbee__const.html#ga35f8b9d8e01e788f1e29928cba29f215">00072</a> <span class="preprocessor">#define XBEE_CHANNEL_DEFAULT 0</span>
45
<a name="l00073"></a>00073 <span class="preprocessor"></span>
46
<a name="l00074"></a><a class="code" href="group__xbee__const.html#ga93bbd21f7965e1697350f950cedff5c4">00074</a> <span class="preprocessor">#define XBEE_BROADCAST 0xFFFF</span>
47
<a name="l00075"></a>00075 <span class="preprocessor"></span>
48
<a name="l00076"></a><a class="code" href="group__xbee__const.html#gabca7356c2b8183fd41b5ca9a82dd962b">00076</a> <span class="preprocessor">#define XBEE_OPTIONS_NONE 0x00</span>
49
<a name="l00077"></a>00077 <span class="preprocessor"></span>
50
<a name="l00078"></a><a class="code" href="group__xbee__const.html#gacf9509013302590dca5ce3db63c64609">00078</a> <span class="preprocessor">#define XBEE_OPTIONS_DISABLE_RESPONSE 0x01</span>
51
<a name="l00079"></a>00079 <span class="preprocessor"></span>
52
<a name="l00080"></a><a class="code" href="group__xbee__const.html#ga57382f888360b5b19f0de3b6f1f7c5a3">00080</a> <span class="preprocessor">#define XBEE_OPTIONS_BROADCAST_ALL_PANS 0x04</span>
53
<a name="l00081"></a>00081 <span class="preprocessor"></span>
54
<a name="l00082"></a><a class="code" href="group__xbee__const.html#ga7840d8b64c8bec12d8b8d32e845a638a">00082</a> <span class="preprocessor">#define XBEE_TX_STATUS 0x89</span>
55
<a name="l00083"></a>00083 <span class="preprocessor"></span>
56
<a name="l00084"></a><a class="code" href="group__xbee__const.html#gac2b1262a3a1eb4a9f7ead366af71c32c">00084</a> <span class="preprocessor">#define XBEE_RX 0x81</span>
57
<a name="l00085"></a>00085 <span class="preprocessor"></span>
58
<a name="l00090"></a>00090 <span class="comment">// TODO: add comments for all of these definitions</span>
59
<a name="l00091"></a>00091 
60
<a name="l00092"></a>00092 <span class="comment">/*Frame Types*/</span>
61
<a name="l00093"></a>00093 <span class="preprocessor">#define XBEE_FRAME_START 0x7E</span>
62
<a name="l00094"></a>00094 <span class="preprocessor"></span><span class="preprocessor">#define XBEE_FRAME_STATUS 0x8A</span>
63
<a name="l00095"></a>00095 <span class="preprocessor"></span><span class="preprocessor">#define XBEE_FRAME_AT_COMMAND 0x08</span>
64
<a name="l00096"></a>00096 <span class="preprocessor"></span><span class="preprocessor">#define XBEE_FRAME_AT_COMMAND_RESPONSE 0x88</span>
65
<a name="l00097"></a>00097 <span class="preprocessor"></span><span class="preprocessor">#define XBEE_FRAME_TX_REQUEST_64 0x00</span>
66
<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor">#define XBEE_FRAME_TX_REQUEST_16 0x01</span>
67
<a name="l00099"></a>00099 <span class="preprocessor"></span><span class="preprocessor">#define XBEE_FRAME_TX_STATUS XBEE_TX_STATUS</span>
68
<a name="l00100"></a>00100 <span class="preprocessor"></span><span class="preprocessor">#define XBEE_FRAME_RX_64 0x80</span>
69
<a name="l00101"></a>00101 <span class="preprocessor"></span><span class="preprocessor">#define XBEE_FRAME_RX_16 XBEE_RX</span>
70
<a name="l00102"></a>00102 <span class="preprocessor"></span> <span class="comment">// end const group</span>
71
<a name="l00106"></a>00106  
72
<a name="l00114"></a>00114 int8_t <a class="code" href="group__xbee.html#ga31a4df97d6865a40123337045109b9f1" title="Initialize the XBee library.">xbee_init</a>(<span class="keywordtype">void</span>);
73
<a name="l00116"></a>00116 int8_t <a class="code" href="group__xbee.html#ga3fe446135ba896e6438a4fcd67154119" title="Uninitialize the XBee library.">xbee_terminate</a>(<span class="keywordtype">void</span>);
74
<a name="l00118"></a>00118 int8_t <a class="code" href="group__xbee.html#ga5805e267e3b6f4b7bdad7aa6dc65ee04" title="Send an array of bytes to the xbee in API mode.">xbee_send</a>(uint8_t* buf, uint16_t size);
75
<a name="l00120"></a>00120 int8_t <a class="code" href="group__xbee.html#gae75ee9a54a5811b8bc302dc2d70f0215" title="Send byte to the xbee in API mode.">xbee_sendc</a>(uint8_t byte);
76
<a name="l00122"></a>00122 int8_t <a class="code" href="group__xbee.html#ga2eb96c49811a1d9f2ccd1e1186915077" title="Add a buffer to the checksum value.">xbee_checksum_add</a>(uint8_t *buf, uint8_t len, uint8_t* sum);
77
<a name="l00124"></a>00124 int8_t <a class="code" href="group__xbee.html#ga2a39ffce83d65d22aeefb41dfce2112f" title="Send a frame header to the xbee.">xbee_send_header</a>(uint16_t len);
78
<a name="l00126"></a>00126 int8_t <a class="code" href="group__xbee.html#gaae54f7208cfa786cb56d4d78ab3ceffe" title="Send a packet to the XBee.">xbee_send_packet</a>(uint8_t* packet, uint8_t len, uint16_t dest, uint8_t options, uint8_t frame);
79
<a name="l00128"></a>00128 int8_t <a class="code" href="group__xbee.html#gadbcb9cc8cf6afa28e6de8defb33f8196" title="Set the PAN ID for the XBee.">xbee_set_pan</a>(uint16_t <span class="keywordtype">id</span>);
80
<a name="l00130"></a>00130 uint16_t <a class="code" href="group__xbee.html#gaa740c59073c6db9e00a2a2de10a95091" title="Get the XBee&amp;#39;s PAN ID.">xbee_get_pan</a>(<span class="keywordtype">void</span>);
81
<a name="l00132"></a>00132 int8_t <a class="code" href="group__xbee.html#ga4f67630ca81e5eae064bb58c3818d3fd" title="Set the channel the XBee is currently using.">xbee_set_channel</a>(uint8_t channel);
82
<a name="l00134"></a>00134 int8_t <a class="code" href="group__xbee.html#ga319d4bccd5e6b09d2f377d2170104817" title="Get the channel the XBee is currently using.">xbee_get_channel</a>(<span class="keywordtype">void</span>);
83
<a name="l00136"></a>00136 uint16_t <a class="code" href="group__xbee.html#ga24d751120f5cded06a70d156c29261fc" title="Get the XBee&amp;#39;s 16-bit address.">xbee_get_address</a>(<span class="keywordtype">void</span>);
84
<a name="l00138"></a>00138 int8_t <a class="code" href="group__xbee__funcs.html#gacf9354ba8b49419b6286e1318e87aa41" title="Reset XBee.">xbee_reset</a>(<span class="keywordtype">void</span>); <span class="comment">// TODO: implement this function</span>
85
<a name="l00139"></a>00139  <span class="comment">//end xbee_funcs group</span>
86
<a name="l00141"></a>00141  <span class="comment">//end defgroup</span>
87
<a name="l00143"></a>00143 
88
<a name="l00144"></a>00144 <span class="preprocessor">#endif</span>
89
</pre></div></div>
90
<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu May 6 13:17:00 2010 for libwireless by&nbsp;
91
<a href="http://www.doxygen.org/index.html">
92
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
93
</body>
94
</html>