?lang_form? ?lang_select? ?lang_submit? ?lang_endform?
{HEADER END}
{FILE START}

library

?curdirlinks? - Rev 6

?prevdifflink? - Blame - ?getfile?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Procyon AVRlib: Circular Byte-Buffer Structure and Function Library (buffer.c)</title>
<link href="dox.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>Circular Byte-Buffer Structure and Function Library (buffer.c)<br>
<small>
[<a class="el" href="group__general.html">General Libraries</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include "<a class="code" href="buffer_8h.html">buffer.h</a>"</span> 
</pre></div> <dl compact><dt><b>Overview</b></dt><dd>This byte-buffer structure provides an easy and efficient way to store and process a stream of bytes.  You can create as many buffers as you like (within memory limits), and then use this common set of functions to access each buffer.  The buffers are designed for FIFO operation (first in, first out).  This means that the first byte you put in the buffer will be the first one you get when you read out the buffer.  Supported functions include buffer initialize, get byte from front of buffer, add byte to end of buffer, check if buffer is full, and flush buffer.  The buffer uses a circular design so no copying of data is ever necessary. This buffer is not dynamically allocated, it has a user-defined fixed maximum size.  This buffer is used in many places in the avrlib code. </dd></dl>

<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstruct__cBuffer.html">struct_cBuffer</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">cBuffer structure  <a href="structstruct__cBuffer.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga0" doxytag="buffer::cBuffer"></a>
typedef <a class="el" href="structstruct__cBuffer.html">struct_cBuffer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buffer.html#ga0">cBuffer</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">cBuffer structure <br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga1" doxytag="buffer::bufferInit"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buffer.html#ga1">bufferInit</a> (<a class="el" href="structstruct__cBuffer.html">cBuffer</a> *buffer, unsigned char *start, unsigned short size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">initialize a buffer to start at a given address and have given size <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga2" doxytag="buffer::bufferGetFromFront"></a>
unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buffer.html#ga2">bufferGetFromFront</a> (<a class="el" href="structstruct__cBuffer.html">cBuffer</a> *buffer)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the first byte from the front of the buffer <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga3" doxytag="buffer::bufferDumpFromFront"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buffer.html#ga3">bufferDumpFromFront</a> (<a class="el" href="structstruct__cBuffer.html">cBuffer</a> *buffer, unsigned short numbytes)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">dump (discard) the first numbytes from the front of the buffer <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga4" doxytag="buffer::bufferGetAtIndex"></a>
unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buffer.html#ga4">bufferGetAtIndex</a> (<a class="el" href="structstruct__cBuffer.html">cBuffer</a> *buffer, unsigned short index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a byte at the specified index in the buffer (kind of like array access) <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga5" doxytag="buffer::bufferAddToEnd"></a>
unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buffer.html#ga5">bufferAddToEnd</a> (<a class="el" href="structstruct__cBuffer.html">cBuffer</a> *buffer, unsigned char data)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">add a byte to the end of the buffer <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga6" doxytag="buffer::bufferIsNotFull"></a>
unsigned short&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buffer.html#ga6">bufferIsNotFull</a> (<a class="el" href="structstruct__cBuffer.html">cBuffer</a> *buffer)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">check if the buffer is full/not full (returns zero value if full) <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga7" doxytag="buffer::bufferFlush"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buffer.html#ga7">bufferFlush</a> (<a class="el" href="structstruct__cBuffer.html">cBuffer</a> *buffer)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">flush (clear) the contents of the buffer <br></td></tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:09 2006 for Procyon AVRlib by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
</body>
</html>
{FILE END}
{FOOTER START}

Powered by WebSVN v2.8.3