root / branches / wireless / docs / libdragonfly / html / eeprom_8c.html @ 1578
History | View | Annotate | Download (7.23 KB)
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|---|
2 |
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
3 |
<title>Colony: eeprom.c File Reference</title> |
4 |
<link href="tabs.css" rel="stylesheet" type="text/css"> |
5 |
<link href="doxygen.css" rel="stylesheet" type="text/css"> |
6 |
</head><body> |
7 |
<!-- Generated by Doxygen 1.5.8 -->
|
8 |
<div class="navigation" id="top"> |
9 |
<div class="tabs"> |
10 |
<ul>
|
11 |
<li><a href="index.html"><span>Main Page</span></a></li> |
12 |
<li><a href="pages.html"><span>Related Pages</span></a></li> |
13 |
<li><a href="modules.html"><span>Modules</span></a></li> |
14 |
<li><a href="annotated.html"><span>Data Structures</span></a></li> |
15 |
<li class="current"><a href="files.html"><span>Files</span></a></li> |
16 |
</ul>
|
17 |
</div>
|
18 |
<div class="tabs"> |
19 |
<ul>
|
20 |
<li><a href="files.html"><span>File List</span></a></li> |
21 |
<li><a href="globals.html"><span>Globals</span></a></li> |
22 |
</ul>
|
23 |
</div>
|
24 |
</div>
|
25 |
<div class="contents"> |
26 |
<h1>eeprom.c File Reference</h1>handles eeprom storage for persistent data |
27 |
<a href="#_details">More...</a> |
28 |
<p>
|
29 |
<code>#include <avr/io.h></code><br> |
30 |
<code>#include "eeprom.h"</code><br> |
31 |
<table border="0" cellpadding="0" cellspacing="0"> |
32 |
<tr><td></td></tr> |
33 |
<tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
34 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="eeprom_8c.html#f6e274233d38dc901aa0a7942bdbf270">eeprom_put_byte</a> (unsigned int uiAddress, unsigned char ucData)</td></tr> |
35 |
|
36 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">store a byte to eeproem <a href="#f6e274233d38dc901aa0a7942bdbf270"></a><br></td></tr> |
37 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="eeprom_8c.html#1136be9e26a943307fadab9901b5e16e">eeprom_get_byte</a> (unsigned int uiAddress, unsigned char *byte)</td></tr> |
38 |
|
39 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">reads a byte from eeprom <a href="#1136be9e26a943307fadab9901b5e16e"></a><br></td></tr> |
40 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned char </td><td class="memItemRight" valign="bottom"><a class="el" href="eeprom_8c.html#bfc8e084d177435cbe1cc30cfedf4327">get_robotid</a> (void)</td></tr> |
41 |
|
42 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">get stored robot ID <a href="#bfc8e084d177435cbe1cc30cfedf4327"></a><br></td></tr> |
43 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned char </td><td class="memItemRight" valign="bottom"><a class="el" href="eeprom_8c.html#de3f83da05149edf008cb5fa23fde7df">get_bom_type</a> (void)</td></tr> |
44 |
|
45 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">get stored robot ID <a href="#de3f83da05149edf008cb5fa23fde7df"></a><br></td></tr> |
46 |
</table>
|
47 |
<hr><a name="_details"></a><h2>Detailed Description</h2> |
48 |
handles eeprom storage for persistent data |
49 |
<p>
|
50 |
Contains functions and definitions for reading and writing to eeprom<p>
|
51 |
<dl class="author" compact><dt><b>Author:</b></dt><dd>Colony Project, Brad Neuman </dd></dl> |
52 |
<hr><h2>Function Documentation</h2> |
53 |
<a class="anchor" name="1136be9e26a943307fadab9901b5e16e"></a><!-- doxytag: member="eeprom.c::eeprom_get_byte" ref="1136be9e26a943307fadab9901b5e16e" args="(unsigned int uiAddress, unsigned char *byte)" --> |
54 |
<div class="memitem"> |
55 |
<div class="memproto"> |
56 |
<table class="memname"> |
57 |
<tr>
|
58 |
<td class="memname">int eeprom_get_byte </td> |
59 |
<td>(</td> |
60 |
<td class="paramtype">unsigned int </td> |
61 |
<td class="paramname"> <em>uiAddress</em>, </td> |
62 |
</tr>
|
63 |
<tr>
|
64 |
<td class="paramkey"></td> |
65 |
<td></td> |
66 |
<td class="paramtype">unsigned char * </td> |
67 |
<td class="paramname"> <em>byte</em></td><td> </td> |
68 |
</tr>
|
69 |
<tr>
|
70 |
<td></td> |
71 |
<td>)</td> |
72 |
<td></td><td></td><td></td> |
73 |
</tr>
|
74 |
</table>
|
75 |
</div>
|
76 |
<div class="memdoc"> |
77 |
|
78 |
<p>
|
79 |
reads a byte from eeprom |
80 |
<p>
|
81 |
Pass it thge address and a pointer to a byte where the byte at the address will be stored<p>
|
82 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if successful (byte is set to the eeprom value at addr), nonzero if there was a problem </dd></dl> |
83 |
|
84 |
</div>
|
85 |
</div><p> |
86 |
<a class="anchor" name="f6e274233d38dc901aa0a7942bdbf270"></a><!-- doxytag: member="eeprom.c::eeprom_put_byte" ref="f6e274233d38dc901aa0a7942bdbf270" args="(unsigned int uiAddress, unsigned char ucData)" --> |
87 |
<div class="memitem"> |
88 |
<div class="memproto"> |
89 |
<table class="memname"> |
90 |
<tr>
|
91 |
<td class="memname">int eeprom_put_byte </td> |
92 |
<td>(</td> |
93 |
<td class="paramtype">unsigned int </td> |
94 |
<td class="paramname"> <em>uiAddress</em>, </td> |
95 |
</tr>
|
96 |
<tr>
|
97 |
<td class="paramkey"></td> |
98 |
<td></td> |
99 |
<td class="paramtype">unsigned char </td> |
100 |
<td class="paramname"> <em>ucData</em></td><td> </td> |
101 |
</tr>
|
102 |
<tr>
|
103 |
<td></td> |
104 |
<td>)</td> |
105 |
<td></td><td></td><td></td> |
106 |
</tr>
|
107 |
</table>
|
108 |
</div>
|
109 |
<div class="memdoc"> |
110 |
|
111 |
<p>
|
112 |
store a byte to eeproem |
113 |
<p>
|
114 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if success, nonzero on failure </dd></dl> |
115 |
|
116 |
</div>
|
117 |
</div><p> |
118 |
<a class="anchor" name="de3f83da05149edf008cb5fa23fde7df"></a><!-- doxytag: member="eeprom.c::get_bom_type" ref="de3f83da05149edf008cb5fa23fde7df" args="(void)" --> |
119 |
<div class="memitem"> |
120 |
<div class="memproto"> |
121 |
<table class="memname"> |
122 |
<tr>
|
123 |
<td class="memname">unsigned char get_bom_type </td> |
124 |
<td>(</td> |
125 |
<td class="paramtype">void </td> |
126 |
<td class="paramname"> </td> |
127 |
<td> ) </td> |
128 |
<td></td> |
129 |
</tr>
|
130 |
</table>
|
131 |
</div>
|
132 |
<div class="memdoc"> |
133 |
|
134 |
<p>
|
135 |
get stored robot ID |
136 |
<p>
|
137 |
checks that EEPROM has been programed with an BOM type and returns it<p>
|
138 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the robot bom type as defined in <a class="el" href="bom_8h.html" title="Definitions for using the BOM.">bom.h</a>, if it is stored. If it returns 0xFF it is probably invalid </dd></dl> |
139 |
|
140 |
</div>
|
141 |
</div><p> |
142 |
<a class="anchor" name="bfc8e084d177435cbe1cc30cfedf4327"></a><!-- doxytag: member="eeprom.c::get_robotid" ref="bfc8e084d177435cbe1cc30cfedf4327" args="(void)" --> |
143 |
<div class="memitem"> |
144 |
<div class="memproto"> |
145 |
<table class="memname"> |
146 |
<tr>
|
147 |
<td class="memname">unsigned char get_robotid </td> |
148 |
<td>(</td> |
149 |
<td class="paramtype">void </td> |
150 |
<td class="paramname"> </td> |
151 |
<td> ) </td> |
152 |
<td></td> |
153 |
</tr>
|
154 |
</table>
|
155 |
</div>
|
156 |
<div class="memdoc"> |
157 |
|
158 |
<p>
|
159 |
get stored robot ID |
160 |
<p>
|
161 |
checks that EEPROM has been programed with an ID and returns it<p>
|
162 |
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the robot id, if it is stored. If it returns 0xFF it is probably invalid </dd></dl> |
163 |
|
164 |
</div>
|
165 |
</div><p> |
166 |
</div>
|
167 |
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Nov 20 21:51:59 2009 for Colony by |
168 |
<a href="http://www.doxygen.org/index.html"> |
169 |
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
170 |
</body>
|
171 |
</html>
|