⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 source_8h.html

📁 BlueLab3 bluetooth API 说明文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!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>BlueLab: source.h File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.8 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</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></div><h1>source.h File Reference</h1>Operations on sources of 8-bit data. <a href="#_details">More...</a><p><h2>Defines</h2><ul><li>#define <a class="el" href="source_8h.html#a0">SourceEmpty</a>(s)&nbsp;&nbsp;&nbsp;do { <a class="el" href="source___8h.html#a0">Source</a> _x=(s); SourceDrop(_x, SourceSize(_x)); } while(0)</ul><h2>Functions</h2><ul><li><a class="el" href="csrtypes_8h.html#a4">uint16</a> <a class="el" href="source_8h.html#a1">SourceSize</a> (<a class="el" href="source___8h.html#a0">Source</a> source)<dl class="el"><dd class="mdescRight">Reports the number of bytes available in the source.  <a href="#a1"></a><br></dl><li>void <a class="el" href="source_8h.html#a2">SourceDrop</a> (<a class="el" href="source___8h.html#a0">Source</a> source, <a class="el" href="csrtypes_8h.html#a4">uint16</a> amount)<dl class="el"><dd class="mdescRight">Discards the indicated number of bytes from the front of the source.  <a href="#a2"></a><br></dl><li>const <a class="el" href="csrtypes_8h.html#a8">uint8</a> * <a class="el" href="source_8h.html#a3">SourceMap</a> (<a class="el" href="source___8h.html#a0">Source</a> source)<dl class="el"><dd class="mdescRight">Map the source into the address map, returning a pointer to the first byte in the source.  <a href="#a3"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a4">uint16</a> <a class="el" href="source_8h.html#a4">SourceBoundary</a> (<a class="el" href="source___8h.html#a0">Source</a> source)<dl class="el"><dd class="mdescRight">Return how many bytes in this source are before the next packet boundary (for non packet-based sources returns the same as SourceSize.).  <a href="#a4"></a><br></dl><li>const <a class="el" href="csrtypes_8h.html#a4">uint16</a> * <a class="el" href="source_8h.html#a5">SourceMapHeader</a> (<a class="el" href="source___8h.html#a0">Source</a> source)<dl class="el"><dd class="mdescRight">Map the first header associated with a source into the address map, returning a pointer to the first word in the header.  <a href="#a5"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a4">uint16</a> <a class="el" href="source_8h.html#a6">SourceSizeHeader</a> (<a class="el" href="source___8h.html#a0">Source</a> source)<dl class="el"><dd class="mdescRight">Reports the number of words available in the first header associated with source.  <a href="#a6"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="source_8h.html#a7">SourceConfigure</a> (<a class="el" href="source___8h.html#a0">Source</a> source, <a class="el" href="vm__if_8h.html#a59">vm_source_config_key</a> key, <a class="el" href="csrtypes_8h.html#a4">uint16</a> value)<dl class="el"><dd class="mdescRight">Configure a particular source.  <a href="#a7"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="source_8h.html#a8">SourceConfigureHidSensorAgilentAN2051</a> (<a class="el" href="source___8h.html#a0">Source</a> source, const <a class="el" href="struct_h_i_d___a_g_i_l_e_n_t___a_n2051___c_o_n_f_i_g.html">HID_AGILENT_AN2051_CONFIG</a> *config)<dl class="el"><dd class="mdescRight">Select and configure the Agilent AN2051 sensor for the hid source.  <a href="#a8"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="source_8h.html#a9">SourceConfigureHidSensorUART</a> (<a class="el" href="source___8h.html#a0">Source</a> source)<dl class="el"><dd class="mdescRight">Select the UART HID sensor for the hid source.  <a href="#a9"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="source_8h.html#a10">SourceConfigureHidSensorMatrix</a> (<a class="el" href="source___8h.html#a0">Source</a> source, const <a class="el" href="struct_h_i_d___m_a_t_r_i_x___c_o_n_f_i_g.html">HID_MATRIX_CONFIG</a> *config)<dl class="el"><dd class="mdescRight">Select and configure the HID matrix sensor for the hid source.  <a href="#a10"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="source_8h.html#a11">SourceConfigureHidSensorAgilentADNS3030</a> (<a class="el" href="source___8h.html#a0">Source</a> source, const <a class="el" href="struct_h_i_d___a_g_i_l_e_n_t___a_d_n_s3030___c_o_n_f_i_g.html">HID_AGILENT_ADNS3030_CONFIG</a> *config)<dl class="el"><dd class="mdescRight">Select and configure the Agilent ADNS3030 sensor for the hid source.  <a href="#a11"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="source_8h.html#a12">SourceConfigureHidSensorAvagoADNS5030</a> (<a class="el" href="source___8h.html#a0">Source</a> source, const <a class="el" href="struct_h_i_d___a_v_a_g_o___a_d_n_s5030___c_o_n_f_i_g.html">HID_AVAGO_ADNS5030_CONFIG</a> *config)<dl class="el"><dd class="mdescRight">Select and configure the Avago (was Agilent) ADNS5030 sensor for the hid source.  <a href="#a12"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="source_8h.html#a13">SourceConfigureHidSensorAvagoADNS6030</a> (<a class="el" href="source___8h.html#a0">Source</a> source, const <a class="el" href="struct_h_i_d___a_v_a_g_o___a_d_n_s6030___c_o_n_f_i_g.html">HID_AVAGO_ADNS6030_CONFIG</a> *config)<dl class="el"><dd class="mdescRight">Select and configure the Avago (was Agilent) ADNS6030 sensor for the hid source.  <a href="#a13"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="source_8h.html#a14">SourceConfigureHidSensorAvagoADNS7050</a> (<a class="el" href="source___8h.html#a0">Source</a> source, const <a class="el" href="struct_h_i_d___a_v_a_g_o___a_d_n_s7050___c_o_n_f_i_g.html">HID_AVAGO_ADNS7050_CONFIG</a> *config)<dl class="el"><dd class="mdescRight">Select and configure the Avago (was Agilent) ADNS7050 sensor for the hid source.  <a href="#a14"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="source_8h.html#a15">SourceIsValid</a> (<a class="el" href="source___8h.html#a0">Source</a> source)<dl class="el"><dd class="mdescRight">Return non-zero if a sink is valid, zero otherwise.  <a href="#a15"></a><br></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>Operations on sources of 8-bit data. <p><hr><h2>Define Documentation</h2><a class="anchor" name="a0" doxytag="source.h::SourceEmpty" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define SourceEmpty          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">s&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;do { <a class="el" href="source___8h.html#a0">Source</a> _x=(s); SourceDrop(_x, SourceSize(_x)); } while(0)</td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Discard all bytes that are currently in the source     </td>  </tr></table><hr><h2>Function Documentation</h2><a class="anchor" name="a1" doxytag="source.h::SourceSize" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> <a class="el" href="csrtypes_8h.html#a4">uint16</a> SourceSize           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="source___8h.html#a0">Source</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>source</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Reports the number of bytes available in the source. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>source</em>&nbsp;</td><td>The source to fetch the size of.</td></tr>  </table></dl>Returns zero if the source is invalid.     </td>  </tr></table><a class="anchor" name="a2" doxytag="source.h::SourceDrop" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void SourceDrop           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="source___8h.html#a0">Source</a>&nbsp;</td>          <td class="mdname" nowrap> <em>source</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td></td>          <td class="md" nowrap><a class="el" href="csrtypes_8h.html#a4">uint16</a>&nbsp;</td>          <td class="mdname" nowrap> <em>amount</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Discards the indicated number of bytes from the front of the source. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>source</em>&nbsp;</td><td>The Source to drop the data from. </td></tr>    <tr><td></td><td valign=top><em>amount</em>&nbsp;</td><td>The number of bytes to drop. </td></tr>  </table></dl>    </td>  </tr></table><a class="anchor" name="a3" doxytag="source.h::SourceMap" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> const <a class="el" href="csrtypes_8h.html#a8">uint8</a>* SourceMap           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="source___8h.html#a0">Source</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>source</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Map the source into the address map, returning a pointer to the first byte in the source. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>source</em>&nbsp;</td><td>The source to map into the address map.</td></tr>  </table></dl>The number of accessible bytes is as given by SourceSize. At most one source can be mapped in at any time; pointers previously obtained from SourceMap become invalid when another call to SourceMap is made.<p>Returns NULL if the source is invalid.     </td>  </tr></table><a class="anchor" name="a4" doxytag="source.h::SourceBoundary" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> <a class="el" href="csrtypes_8h.html#a4">uint16</a> SourceBoundary           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="source___8h.html#a0">Source</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>source</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Return how many bytes in this source are before the next packet boundary (for non packet-based sources returns the same as SourceSize.). <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>source</em>&nbsp;</td><td>The source to evaluate.</td></tr>  </table></dl>Returns zero if the source is invalid.     </td>  </tr></table><a class="anchor" name="a5" doxytag="source.h::SourceMapHeader" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> const <a class="el" href="csrtypes_8h.html#a4">uint16</a>* SourceMapHeader           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="source___8h.html#a0">Source</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>source</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -