tinyusb/0.4/fifo_8c.html
2014-03-27 17:27:26 +07:00

168 lines
10 KiB
HTML

<!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"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>tinyusb: tinyusb/common/fifo.c File Reference</title>
<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="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">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">tinyusb
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></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('fifo_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">fifo.c File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;string.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="fifo_8h_source.html">fifo.h</a>&quot;</code><br/>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a75ae9faa24556ee3556e2bd82a4067cb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a75ae9faa24556ee3556e2bd82a4067cb"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>mutex_lock</b>(f)</td></tr>
<tr class="separator:a75ae9faa24556ee3556e2bd82a4067cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8133554857bebdf61cd16ba5b7a7c58d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8133554857bebdf61cd16ba5b7a7c58d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>mutex_unlock</b>(f)</td></tr>
<tr class="separator:a8133554857bebdf61cd16ba5b7a7c58d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a35624814c7f50eb445f8ff27460c03c6"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fifo_8c.html#a35624814c7f50eb445f8ff27460c03c6">is_fifo_initalized</a> (<a class="el" href="structfifo__t.html">fifo_t</a> *f)</td></tr>
<tr class="memdesc:a35624814c7f50eb445f8ff27460c03c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables the IRQ specified in the FIFO's 'irq' field to prevent reads/write issues with interrupts. <a href="#a35624814c7f50eb445f8ff27460c03c6">More...</a><br/></td></tr>
<tr class="separator:a35624814c7f50eb445f8ff27460c03c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad1b3c074f899149ff9736bf80d869f99"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__fifo.html#gad1b3c074f899149ff9736bf80d869f99">fifo_read</a> (<a class="el" href="structfifo__t.html">fifo_t</a> *f, void *p_buffer)</td></tr>
<tr class="memdesc:gad1b3c074f899149ff9736bf80d869f99"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read one byte out of the RX buffer. <a href="group__group__fifo.html#gad1b3c074f899149ff9736bf80d869f99">More...</a><br/></td></tr>
<tr class="separator:gad1b3c074f899149ff9736bf80d869f99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9189952c6b2516777f06cdfcbb45d6b8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__fifo.html#ga9189952c6b2516777f06cdfcbb45d6b8">fifo_write</a> (<a class="el" href="structfifo__t.html">fifo_t</a> *f, void const *p_data)</td></tr>
<tr class="memdesc:ga9189952c6b2516777f06cdfcbb45d6b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write one byte into the RX buffer. <a href="group__group__fifo.html#ga9189952c6b2516777f06cdfcbb45d6b8">More...</a><br/></td></tr>
<tr class="separator:ga9189952c6b2516777f06cdfcbb45d6b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaec337b950afaa3d427e3793b98fe591c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__fifo.html#gaec337b950afaa3d427e3793b98fe591c">fifo_clear</a> (<a class="el" href="structfifo__t.html">fifo_t</a> *f)</td></tr>
<tr class="memdesc:gaec337b950afaa3d427e3793b98fe591c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the fifo read and write pointers and set length to zero. <a href="group__group__fifo.html#gaec337b950afaa3d427e3793b98fe591c">More...</a><br/></td></tr>
<tr class="separator:gaec337b950afaa3d427e3793b98fe591c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><dl class="section author"><dt>Author</dt><dd>hathach (tinyusb.org)</dd></dl>
<h1><a class="anchor" id="LICENSE"></a>
LICENSE</h1>
<p>Software License Agreement (BSD License)</p>
<p>Copyright (c) 2013, hathach (tinyusb.org) All rights reserved.</p>
<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p>
<ol type="1">
<li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li>
<li>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</li>
<li>Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.</li>
</ol>
<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
<p>This file is part of the tinyusb stack. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a35624814c7f50eb445f8ff27460c03c6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static bool is_fifo_initalized </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structfifo__t.html">fifo_t</a> *&#160;</td>
<td class="paramname"><em>f</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Disables the IRQ specified in the FIFO's 'irq' field to prevent reads/write issues with interrupts. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">f</td><td>Pointer to the FIFO that should be protected</td></tr>
</table>
</dd>
</dl>
<p>Re-enables the IRQ specified in the FIFO's 'irq' field</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">f</td><td>Pointer to the FIFO that should be protected </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_f44c0f1c8d3a85cc1de1e7f4648a56e6.html">tinyusb</a></li><li class="navelem"><a class="el" href="dir_2cf369265cdb233771cbf8cc15e70526.html">common</a></li><li class="navelem"><a class="el" href="fifo_8c.html">fifo.c</a></li>
<li class="footer">Generated on Wed Mar 26 2014 16:23:17 for tinyusb by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
</ul>
</div>
</body>
</html>