root / trunk / docs / libdragonfly / group__usb.html @ 1067
History | View | Annotate | Download (10.7 KB)
1 | 41 | bcoltin | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|---|---|---|
2 | 241 | bcoltin | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
3 | 41 | bcoltin | <title>libdragonfly: USB Input / Output</title> |
4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
||
5 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
||
6 | </head><body> |
||
7 | 948 | justin | <!-- Generated by Doxygen 1.5.3 -->
|
8 | 869 | justin | <div class="tabs"> |
9 | <ul>
|
||
10 | <li><a href="index.html"><span>Main Page</span></a></li> |
||
11 | <li><a href="modules.html"><span>Modules</span></a></li> |
||
12 | <li><a href="annotated.html"><span>Data Structures</span></a></li> |
||
13 | <li><a href="files.html"><span>Files</span></a></li> |
||
14 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
||
15 | </ul>
|
||
16 | 241 | bcoltin | </div>
|
17 | 41 | bcoltin | <h1>USB Input / Output</h1>Functions for USB input / output. |
18 | <a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0"> |
||
19 | <tr><td></td></tr> |
||
20 | <tr><td colspan="2"><br><h2>Defines</h2></td></tr> |
||
21 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g378065b4d75b008228ee41cc335474a7"></a><!-- doxytag: member="usb::USB_BAUD" ref="g378065b4d75b008228ee41cc335474a7" args="" --> |
||
22 | #define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__usb.html#g378065b4d75b008228ee41cc335474a7">USB_BAUD</a> 115200</td></tr> |
||
23 | |||
24 | <tr><td class="mdescLeft"> </td><td class="mdescRight">the USB baud rate <br></td></tr> |
||
25 | <tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
||
26 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__usb.html#gddfbdb66f507ffcd08b4496531ed0a3d">usb_init</a> (void)</td></tr> |
||
27 | |||
28 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize the USB. <a href="#gddfbdb66f507ffcd08b4496531ed0a3d"></a><br></td></tr> |
||
29 | <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__usb.html#g3ee898cfe59d05c428c56021c2ccf946">usb_putc</a> (char c)</td></tr> |
||
30 | |||
31 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Print a character to USB. <a href="#g3ee898cfe59d05c428c56021c2ccf946"></a><br></td></tr> |
||
32 | <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__usb.html#g053a5d887edfe8e8be543ec53a3f60ae">usb_getc</a> (void)</td></tr> |
||
33 | |||
34 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Read a character from USB. <a href="#g053a5d887edfe8e8be543ec53a3f60ae"></a><br></td></tr> |
||
35 | <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__usb.html#g6b1209b19e7fd2bbedc7407e0218453c">usb_getc_nb</a> (char *c)</td></tr> |
||
36 | |||
37 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Read a character from USB without blocking. <a href="#g6b1209b19e7fd2bbedc7407e0218453c"></a><br></td></tr> |
||
38 | <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__usb.html#g6e101f68856f272f67923c4fb35a99e0">usb_puts</a> (char *s)</td></tr> |
||
39 | |||
40 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Print a string to USB. <a href="#g6e101f68856f272f67923c4fb35a99e0"></a><br></td></tr> |
||
41 | <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__usb.html#gcd371dedbff10f0c52dca4b3b7af9e3d">usb_puti</a> (int value)</td></tr> |
||
42 | |||
43 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Print an integer to USB. <a href="#gcd371dedbff10f0c52dca4b3b7af9e3d"></a><br></td></tr> |
||
44 | </table>
|
||
45 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
||
46 | Functions for USB input / output. |
||
47 | <p>
|
||
48 | Low level functions for USB input and output. <hr><h2>Function Documentation</h2> |
||
49 | 241 | bcoltin | <a class="anchor" name="g053a5d887edfe8e8be543ec53a3f60ae"></a><!-- doxytag: member="serial.h::usb_getc" ref="g053a5d887edfe8e8be543ec53a3f60ae" args="(void)" --> |
50 | <div class="memitem"> |
||
51 | <div class="memproto"> |
||
52 | <table class="memname"> |
||
53 | 41 | bcoltin | <tr>
|
54 | 241 | bcoltin | <td class="memname">int usb_getc </td> |
55 | <td>(</td> |
||
56 | <td class="paramtype">void </td> |
||
57 | <td class="paramname"> </td> |
||
58 | <td> ) </td> |
||
59 | <td width="100%"></td> |
||
60 | 41 | bcoltin | </tr>
|
61 | </table>
|
||
62 | 241 | bcoltin | </div>
|
63 | <div class="memdoc"> |
||
64 | 41 | bcoltin | |
65 | <p>
|
||
66 | Read a character from USB. |
||
67 | <p>
|
||
68 | Returns the first character in the buffer received from USB. This function blocks execution until a character has been received. xbee_init must be called before this function may be used.<p>
|
||
69 | 241 | bcoltin | <dl class="return" compact><dt><b>Returns:</b></dt><dd>the first character in the usb buffer</dd></dl> |
70 | <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__usb.html#gddfbdb66f507ffcd08b4496531ed0a3d" title="Initialize the USB.">usb_init</a>, <a class="el" href="group__usb.html#g6b1209b19e7fd2bbedc7407e0218453c" title="Read a character from USB without blocking.">usb_getc_nb</a> </dd></dl> |
||
71 | |||
72 | </div>
|
||
73 | </div><p> |
||
74 | <a class="anchor" name="g6b1209b19e7fd2bbedc7407e0218453c"></a><!-- doxytag: member="serial.h::usb_getc_nb" ref="g6b1209b19e7fd2bbedc7407e0218453c" args="(char *c)" --> |
||
75 | <div class="memitem"> |
||
76 | <div class="memproto"> |
||
77 | <table class="memname"> |
||
78 | 41 | bcoltin | <tr>
|
79 | 241 | bcoltin | <td class="memname">int usb_getc_nb </td> |
80 | <td>(</td> |
||
81 | <td class="paramtype">char * </td> |
||
82 | <td class="paramname"> <em>c</em> </td> |
||
83 | <td> ) </td> |
||
84 | <td width="100%"></td> |
||
85 | 41 | bcoltin | </tr>
|
86 | </table>
|
||
87 | 241 | bcoltin | </div>
|
88 | <div class="memdoc"> |
||
89 | 41 | bcoltin | |
90 | <p>
|
||
91 | Read a character from USB without blocking. |
||
92 | <p>
|
||
93 | Non blocking version of usb_getc. If a character is present in the buffer, it is returned, otherwise -1 is returned immediately. usb_init must be called before this function can be used.<p>
|
||
94 | <dl compact><dt><b>Parameters:</b></dt><dd> |
||
95 | <table border="0" cellspacing="2" cellpadding="0"> |
||
96 | <tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>the received character. This will be set if a character has been received.</td></tr> |
||
97 | </table>
|
||
98 | </dl>
|
||
99 | 241 | bcoltin | <dl class="return" compact><dt><b>Returns:</b></dt><dd>-1 if no character is available, 0 otherwise</dd></dl> |
100 | <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__usb.html#gddfbdb66f507ffcd08b4496531ed0a3d" title="Initialize the USB.">usb_init</a>, <a class="el" href="group__usb.html#g053a5d887edfe8e8be543ec53a3f60ae" title="Read a character from USB.">usb_getc</a> </dd></dl> |
||
101 | |||
102 | </div>
|
||
103 | </div><p> |
||
104 | <a class="anchor" name="gddfbdb66f507ffcd08b4496531ed0a3d"></a><!-- doxytag: member="serial.h::usb_init" ref="gddfbdb66f507ffcd08b4496531ed0a3d" args="(void)" --> |
||
105 | <div class="memitem"> |
||
106 | <div class="memproto"> |
||
107 | <table class="memname"> |
||
108 | 41 | bcoltin | <tr>
|
109 | 241 | bcoltin | <td class="memname">void usb_init </td> |
110 | <td>(</td> |
||
111 | <td class="paramtype">void </td> |
||
112 | <td class="paramname"> </td> |
||
113 | <td> ) </td> |
||
114 | <td width="100%"></td> |
||
115 | 41 | bcoltin | </tr>
|
116 | </table>
|
||
117 | 241 | bcoltin | </div>
|
118 | <div class="memdoc"> |
||
119 | 41 | bcoltin | |
120 | <p>
|
||
121 | Initialize the USB. |
||
122 | <p>
|
||
123 | 241 | bcoltin | Initializes communication over the USB serial port. This must be called before any other usb function may be used. |
124 | </div>
|
||
125 | </div><p> |
||
126 | <a class="anchor" name="g3ee898cfe59d05c428c56021c2ccf946"></a><!-- doxytag: member="serial.h::usb_putc" ref="g3ee898cfe59d05c428c56021c2ccf946" args="(char c)" --> |
||
127 | <div class="memitem"> |
||
128 | <div class="memproto"> |
||
129 | <table class="memname"> |
||
130 | 41 | bcoltin | <tr>
|
131 | 241 | bcoltin | <td class="memname">int usb_putc </td> |
132 | <td>(</td> |
||
133 | <td class="paramtype">char </td> |
||
134 | <td class="paramname"> <em>c</em> </td> |
||
135 | <td> ) </td> |
||
136 | <td width="100%"></td> |
||
137 | 41 | bcoltin | </tr>
|
138 | </table>
|
||
139 | 241 | bcoltin | </div>
|
140 | <div class="memdoc"> |
||
141 | 41 | bcoltin | |
142 | <p>
|
||
143 | Print a character to USB. |
||
144 | <p>
|
||
145 | Sends a character over USB.<p>
|
||
146 | <dl compact><dt><b>Parameters:</b></dt><dd> |
||
147 | <table border="0" cellspacing="2" cellpadding="0"> |
||
148 | <tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>the character to send </td></tr> |
||
149 | </table>
|
||
150 | </dl>
|
||
151 | 241 | bcoltin | <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 for success, nonzero for failure </dd></dl> |
152 | |||
153 | </div>
|
||
154 | </div><p> |
||
155 | <a class="anchor" name="gcd371dedbff10f0c52dca4b3b7af9e3d"></a><!-- doxytag: member="serial.h::usb_puti" ref="gcd371dedbff10f0c52dca4b3b7af9e3d" args="(int value)" --> |
||
156 | <div class="memitem"> |
||
157 | <div class="memproto"> |
||
158 | <table class="memname"> |
||
159 | 41 | bcoltin | <tr>
|
160 | 241 | bcoltin | <td class="memname">int usb_puti </td> |
161 | <td>(</td> |
||
162 | <td class="paramtype">int </td> |
||
163 | <td class="paramname"> <em>value</em> </td> |
||
164 | <td> ) </td> |
||
165 | <td width="100%"></td> |
||
166 | 41 | bcoltin | </tr>
|
167 | </table>
|
||
168 | 241 | bcoltin | </div>
|
169 | <div class="memdoc"> |
||
170 | 41 | bcoltin | |
171 | <p>
|
||
172 | Print an integer to USB. |
||
173 | <p>
|
||
174 | Prints an integer, converted to ASCII, to usb. usb_init must be called before this function can be used.<p>
|
||
175 | <dl compact><dt><b>Parameters:</b></dt><dd> |
||
176 | <table border="0" cellspacing="2" cellpadding="0"> |
||
177 | <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>the integer to print</td></tr> |
||
178 | </table>
|
||
179 | </dl>
|
||
180 | 241 | bcoltin | <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if successful, nonzero otherwise</dd></dl> |
181 | <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__usb.html#gddfbdb66f507ffcd08b4496531ed0a3d" title="Initialize the USB.">usb_init</a>, <a class="el" href="group__usb.html#g3ee898cfe59d05c428c56021c2ccf946" title="Print a character to USB.">usb_putc</a> </dd></dl> |
||
182 | |||
183 | </div>
|
||
184 | </div><p> |
||
185 | <a class="anchor" name="g6e101f68856f272f67923c4fb35a99e0"></a><!-- doxytag: member="serial.h::usb_puts" ref="g6e101f68856f272f67923c4fb35a99e0" args="(char *s)" --> |
||
186 | <div class="memitem"> |
||
187 | <div class="memproto"> |
||
188 | <table class="memname"> |
||
189 | 41 | bcoltin | <tr>
|
190 | 241 | bcoltin | <td class="memname">int usb_puts </td> |
191 | <td>(</td> |
||
192 | <td class="paramtype">char * </td> |
||
193 | <td class="paramname"> <em>s</em> </td> |
||
194 | <td> ) </td> |
||
195 | <td width="100%"></td> |
||
196 | 41 | bcoltin | </tr>
|
197 | </table>
|
||
198 | 241 | bcoltin | </div>
|
199 | <div class="memdoc"> |
||
200 | 41 | bcoltin | |
201 | <p>
|
||
202 | Print a string to USB. |
||
203 | <p>
|
||
204 | Sends a sequence of characters over USB.<p>
|
||
205 | <dl compact><dt><b>Parameters:</b></dt><dd> |
||
206 | <table border="0" cellspacing="2" cellpadding="0"> |
||
207 | <tr><td valign="top"></td><td valign="top"><em>s</em> </td><td>the string to send </td></tr> |
||
208 | </table>
|
||
209 | </dl>
|
||
210 | 241 | bcoltin | <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 for success, nonzero for failure </dd></dl> |
211 | |||
212 | </div>
|
||
213 | </div><p> |
||
214 | 948 | justin | <hr size="1"><address style="text-align: right;"><small>Generated on Wed Nov 5 19:59:43 2008 for libdragonfly by |
215 | 41 | bcoltin | <a href="http://www.doxygen.org/index.html"> |
216 | 948 | justin | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> |
217 | 41 | bcoltin | </body>
|
218 | </html> |