BMLite_RPi/hcp/doxygen/html/fpc__hcp_8h.html
Andrey Perminov ee1de8e94d Initial commit
Change-Id: If8b9b540c22ba2c72ec05e9f0fac8dc4499ded0b
2020-04-16 15:17:23 -07:00

529 lines
32 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.11"/>
<title>Host Communication Protocol: inc/fpc_hcp.h 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="navtreedata.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 id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Host Communication Protocol
&#160;<span id="projectnumber">2.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<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="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('fpc__hcp_8h.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">fpc_hcp.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Host Communication Protocol interface.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdbool.h&gt;</code><br />
<code>#include &lt;stdint.h&gt;</code><br />
<code>#include &quot;<a class="el" href="fpc__hcp__common_8h_source.html">fpc_hcp_common.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="fpc__com__chain_8h_source.html">fpc_com_chain.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for fpc_hcp.h:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="fpc__hcp_8h__incl.svg" width="514" height="262"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="fpc__hcp_8h__dep__incl.svg" width="112" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
<p><a href="fpc__hcp_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ac8ec0a9f397508976922d1833a9a7626"><td class="memItemLeft" align="right" valign="top"><a class="el" href="fpc__com__result_8h.html#a49b1f9a24f677d396227ea645494070a">fpc_com_result_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__hcp_8h.html#ac8ec0a9f397508976922d1833a9a7626">fpc_hcp_transmit</a> (<a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *packet, <a class="el" href="fpc__com__chain_8h.html#a1530dd4e8729e5f546a96abc5ac0a6de">fpc_com_chain_t</a> *chain)</td></tr>
<tr class="memdesc:ac8ec0a9f397508976922d1833a9a7626"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transmits an application packet through the supplied transmit chain. <a href="#ac8ec0a9f397508976922d1833a9a7626">More...</a><br /></td></tr>
<tr class="separator:ac8ec0a9f397508976922d1833a9a7626"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa964fefb0fc68032f44850ee060b8e9b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="fpc__com__result_8h.html#a49b1f9a24f677d396227ea645494070a">fpc_com_result_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__hcp_8h.html#aa964fefb0fc68032f44850ee060b8e9b">fpc_hcp_receive</a> (<a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *packet, <a class="el" href="fpc__com__chain_8h.html#a1530dd4e8729e5f546a96abc5ac0a6de">fpc_com_chain_t</a> *chain)</td></tr>
<tr class="memdesc:aa964fefb0fc68032f44850ee060b8e9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receives an application packet through the supplied transmit chain. <a href="#aa964fefb0fc68032f44850ee060b8e9b">More...</a><br /></td></tr>
<tr class="separator:aa964fefb0fc68032f44850ee060b8e9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b6886d13174fd6e88bd673ba09cca7d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__hcp_8h.html#a9b6886d13174fd6e88bd673ba09cca7d">fpc_hcp_arg_add</a> (<a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *packet, <a class="el" href="fpc__hcp__common_8h.html#a7470deee2c0eae8f5ac7feb71649df0b">fpc_hcp_arg_t</a> arg, uint16_t size, bool free_data, void *data)</td></tr>
<tr class="memdesc:a9b6886d13174fd6e88bd673ba09cca7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add argument to packet. <a href="#a9b6886d13174fd6e88bd673ba09cca7d">More...</a><br /></td></tr>
<tr class="separator:a9b6886d13174fd6e88bd673ba09cca7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1b7ce8b198acf7c8f6802300e2591ea"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__hcp_8h.html#ae1b7ce8b198acf7c8f6802300e2591ea">fpc_hcp_arg_check</a> (<a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *packet, <a class="el" href="fpc__hcp__common_8h.html#a7470deee2c0eae8f5ac7feb71649df0b">fpc_hcp_arg_t</a> arg)</td></tr>
<tr class="memdesc:ae1b7ce8b198acf7c8f6802300e2591ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if command contains selected argument key. <a href="#ae1b7ce8b198acf7c8f6802300e2591ea">More...</a><br /></td></tr>
<tr class="separator:ae1b7ce8b198acf7c8f6802300e2591ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3860f01dade55ac5f55e85342b8f6d0d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="fpc__hcp__common_8h.html#a4243dac41cd32d44aac72af8e1583b86">fpc_hcp_arg_data_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__hcp_8h.html#a3860f01dade55ac5f55e85342b8f6d0d">fpc_hcp_arg_get</a> (<a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *packet, <a class="el" href="fpc__hcp__common_8h.html#a7470deee2c0eae8f5ac7feb71649df0b">fpc_hcp_arg_t</a> arg)</td></tr>
<tr class="memdesc:a3860f01dade55ac5f55e85342b8f6d0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get Argument with specified key. <a href="#a3860f01dade55ac5f55e85342b8f6d0d">More...</a><br /></td></tr>
<tr class="separator:a3860f01dade55ac5f55e85342b8f6d0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addefbe1e416979abcf59f7bf652e2a77"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__hcp_8h.html#addefbe1e416979abcf59f7bf652e2a77">fpc_hcp_arg_copy_data</a> (<a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *packet, <a class="el" href="fpc__hcp__common_8h.html#a7470deee2c0eae8f5ac7feb71649df0b">fpc_hcp_arg_t</a> arg, uint16_t data_size, uint8_t *data)</td></tr>
<tr class="memdesc:addefbe1e416979abcf59f7bf652e2a77"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy data from an argument with specified key. <a href="#addefbe1e416979abcf59f7bf652e2a77">More...</a><br /></td></tr>
<tr class="separator:addefbe1e416979abcf59f7bf652e2a77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78f14eb8269c8f17ea46f01beab88608"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__hcp_8h.html#a78f14eb8269c8f17ea46f01beab88608">fpc_hcp_free</a> (<a class="el" href="fpc__com__chain_8h.html#a1530dd4e8729e5f546a96abc5ac0a6de">fpc_com_chain_t</a> *chain, <a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *packet)</td></tr>
<tr class="memdesc:a78f14eb8269c8f17ea46f01beab88608"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees the resources held by the packet i.e. the dynamic data held in the arguments. <a href="#a78f14eb8269c8f17ea46f01beab88608">More...</a><br /></td></tr>
<tr class="separator:a78f14eb8269c8f17ea46f01beab88608"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a144fab9621ae9cd7abb8e3660b20265f"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__hcp_8h.html#a144fab9621ae9cd7abb8e3660b20265f">fpc_hcp_get_size</a> (<a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *packet, uint16_t *num_args)</td></tr>
<tr class="memdesc:a144fab9621ae9cd7abb8e3660b20265f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate serialized packet size. <a href="#a144fab9621ae9cd7abb8e3660b20265f">More...</a><br /></td></tr>
<tr class="separator:a144fab9621ae9cd7abb8e3660b20265f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Host Communication Protocol interface. </p>
<p>Definition in file <a class="el" href="fpc__hcp_8h_source.html">fpc_hcp.h</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a9b6886d13174fd6e88bd673ba09cca7d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool fpc_hcp_arg_add </td>
<td>(</td>
<td class="paramtype"><a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *&#160;</td>
<td class="paramname"><em>packet</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="fpc__hcp__common_8h.html#a7470deee2c0eae8f5ac7feb71649df0b">fpc_hcp_arg_t</a>&#160;</td>
<td class="paramname"><em>arg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>free_data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>data</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add argument to packet. </p>
<dl class="section note"><dt>Note</dt><dd>This function does not allocate any memory, it will only set the argument variables.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">packet</td><td>Packet to add to. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>Argument id. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of argument data. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">free_data</td><td>Set to true if data should be owned by the argument, false if user still owns data. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Pointer to argument data. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true = success, false = failure. </dd></dl>
<p>Definition at line <a class="el" href="fpc__hcp_8c_source.html#l00145">145</a> of file <a class="el" href="fpc__hcp_8c_source.html">fpc_hcp.c</a>.</p>
<p>References <a class="el" href="fpc__hcp__common_8h_source.html#l00198">fpc_hcp_arg_data::arg</a>, <a class="el" href="fpc__hcp__common_8h_source.html#l00096">ARG_NONE</a>, <a class="el" href="fpc__hcp__common_8h_source.html#l00216">fpc_hcp_packet::arguments</a>, <a class="el" href="fpc__hcp__common_8h_source.html#l00204">fpc_hcp_arg_data::data</a>, <a class="el" href="fpc__hcp__common_8h_source.html#l00202">fpc_hcp_arg_data::free_data</a>, <a class="el" href="fpc__hcp__common_8h_source.html#l00214">fpc_hcp_packet::num_args</a>, and <a class="el" href="fpc__hcp__common_8h_source.html#l00200">fpc_hcp_arg_data::size</a>.</p>
</div>
</div>
<a class="anchor" id="ae1b7ce8b198acf7c8f6802300e2591ea"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool fpc_hcp_arg_check </td>
<td>(</td>
<td class="paramtype"><a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *&#160;</td>
<td class="paramname"><em>packet</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="fpc__hcp__common_8h.html#a7470deee2c0eae8f5ac7feb71649df0b">fpc_hcp_arg_t</a>&#160;</td>
<td class="paramname"><em>arg</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if command contains selected argument key. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">packet</td><td>The packet to scan. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>Argument to look for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if found, false if not found. </dd></dl>
<p>Definition at line <a class="el" href="fpc__hcp_8c_source.html#l00169">169</a> of file <a class="el" href="fpc__hcp_8c_source.html">fpc_hcp.c</a>.</p>
<p>References <a class="el" href="fpc__hcp_8c_source.html#l00173">fpc_hcp_arg_get()</a>.</p>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="fpc__hcp_8h_ae1b7ce8b198acf7c8f6802300e2591ea_cgraph.svg" width="312" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</p>
</div>
</div>
<a class="anchor" id="addefbe1e416979abcf59f7bf652e2a77"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool fpc_hcp_arg_copy_data </td>
<td>(</td>
<td class="paramtype"><a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *&#160;</td>
<td class="paramname"><em>packet</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="fpc__hcp__common_8h.html#a7470deee2c0eae8f5ac7feb71649df0b">fpc_hcp_arg_t</a>&#160;</td>
<td class="paramname"><em>arg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>data_size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&#160;</td>
<td class="paramname"><em>data</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Copy data from an argument with specified key. </p>
<p>Argument data will be copied to specified data buffer. Remaining bytes in data will be cleared if the argument data size is less than data size when the argument contains data.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">packet</td><td>The packet to operate on. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>The arg to retrieve data from. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">data_size</td><td>Number of bytes to copy. </td></tr>
<tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>Pointer to data buffer.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if argument found, false if not found. </dd></dl>
<p>Definition at line <a class="el" href="fpc__hcp_8c_source.html#l00183">183</a> of file <a class="el" href="fpc__hcp_8c_source.html">fpc_hcp.c</a>.</p>
<p>References <a class="el" href="fpc__hcp__common_8h_source.html#l00204">fpc_hcp_arg_data::data</a>, <a class="el" href="fpc__hcp_8c_source.html#l00173">fpc_hcp_arg_get()</a>, and <a class="el" href="fpc__hcp__common_8h_source.html#l00200">fpc_hcp_arg_data::size</a>.</p>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="fpc__hcp_8h_addefbe1e416979abcf59f7bf652e2a77_cgraph.svg" width="338" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</p>
</div>
</div>
<a class="anchor" id="a3860f01dade55ac5f55e85342b8f6d0d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="fpc__hcp__common_8h.html#a4243dac41cd32d44aac72af8e1583b86">fpc_hcp_arg_data_t</a>* fpc_hcp_arg_get </td>
<td>(</td>
<td class="paramtype"><a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *&#160;</td>
<td class="paramname"><em>packet</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="fpc__hcp__common_8h.html#a7470deee2c0eae8f5ac7feb71649df0b">fpc_hcp_arg_t</a>&#160;</td>
<td class="paramname"><em>arg</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get Argument with specified key. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">packet</td><td>The packet to operate on. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>The arg to retrieve. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to <a class="el" href="fpc__hcp__common_8h.html#a4243dac41cd32d44aac72af8e1583b86" title="Command Argument. ">fpc_hcp_arg_data_t</a> is successful, otherwise NULL. </dd></dl>
<p>Definition at line <a class="el" href="fpc__hcp_8c_source.html#l00173">173</a> of file <a class="el" href="fpc__hcp_8c_source.html">fpc_hcp.c</a>.</p>
<p>References <a class="el" href="fpc__hcp__common_8h_source.html#l00198">fpc_hcp_arg_data::arg</a>, <a class="el" href="fpc__hcp__common_8h_source.html#l00216">fpc_hcp_packet::arguments</a>, and <a class="el" href="fpc__hcp__common_8h_source.html#l00214">fpc_hcp_packet::num_args</a>.</p>
</div>
</div>
<a class="anchor" id="a78f14eb8269c8f17ea46f01beab88608"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fpc_hcp_free </td>
<td>(</td>
<td class="paramtype"><a class="el" href="fpc__com__chain_8h.html#a1530dd4e8729e5f546a96abc5ac0a6de">fpc_com_chain_t</a> *&#160;</td>
<td class="paramname"><em>chain</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *&#160;</td>
<td class="paramname"><em>packet</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Frees the resources held by the packet i.e. the dynamic data held in the arguments. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">chain</td><td>Pointer to the communication chain used to retrieve the packet. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">packet</td><td>Pointer to packet. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="fpc__hcp_8c_source.html#l00198">198</a> of file <a class="el" href="fpc__hcp_8c_source.html">fpc_hcp.c</a>.</p>
<p>References <a class="el" href="fpc__hcp__common_8h_source.html#l00198">fpc_hcp_arg_data::arg</a>, <a class="el" href="fpc__hcp__common_8h_source.html#l00096">ARG_NONE</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00062">fpc_com_chain::argument_free</a>, <a class="el" href="fpc__hcp__common_8h_source.html#l00216">fpc_hcp_packet::arguments</a>, <a class="el" href="fpc__hcp__common_8h_source.html#l00043">CMD_NONE</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00143">fpc_com_chain::context</a>, <a class="el" href="fpc__hcp__common_8h_source.html#l00212">fpc_hcp_packet::id</a>, and <a class="el" href="fpc__hcp__common_8h_source.html#l00214">fpc_hcp_packet::num_args</a>.</p>
</div>
</div>
<a class="anchor" id="a144fab9621ae9cd7abb8e3660b20265f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint16_t fpc_hcp_get_size </td>
<td>(</td>
<td class="paramtype"><a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *&#160;</td>
<td class="paramname"><em>packet</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t *&#160;</td>
<td class="paramname"><em>num_args</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate serialized packet size. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">packet</td><td>Packet to calculate. </td></tr>
<tr><td class="paramdir">[in,out]</td><td class="paramname">num_args</td><td>Will return number of arguments held by the command can be set to NULL. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Serialized size. </dd></dl>
<p>Definition at line <a class="el" href="fpc__hcp_8c_source.html#l00064">64</a> of file <a class="el" href="fpc__hcp_8c_source.html">fpc_hcp.c</a>.</p>
<p>References <a class="el" href="fpc__hcp__common_8h_source.html#l00198">fpc_hcp_arg_data::arg</a>, <a class="el" href="fpc__hcp__common_8h_source.html#l00096">ARG_NONE</a>, <a class="el" href="fpc__hcp_8c_source.html#l00046">ARGUMENT_HEADER_SIZE</a>, <a class="el" href="fpc__hcp__common_8h_source.html#l00216">fpc_hcp_packet::arguments</a>, <a class="el" href="fpc__hcp__common_8h_source.html#l00214">fpc_hcp_packet::num_args</a>, <a class="el" href="fpc__hcp_8c_source.html#l00035">PACKET_HEADER_SIZE</a>, and <a class="el" href="fpc__hcp__common_8h_source.html#l00200">fpc_hcp_arg_data::size</a>.</p>
</div>
</div>
<a class="anchor" id="aa964fefb0fc68032f44850ee060b8e9b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="fpc__com__result_8h.html#a49b1f9a24f677d396227ea645494070a">fpc_com_result_t</a> fpc_hcp_receive </td>
<td>(</td>
<td class="paramtype"><a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *&#160;</td>
<td class="paramname"><em>packet</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="fpc__com__chain_8h.html#a1530dd4e8729e5f546a96abc5ac0a6de">fpc_com_chain_t</a> *&#160;</td>
<td class="paramname"><em>chain</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Receives an application packet through the supplied transmit chain. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">packet</td><td>Pointer to pre-allocated packet struct. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">chain</td><td>The chain to use. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="fpc__com__result_8h.html#a49b1f9a24f677d396227ea645494070a">fpc_com_result_t</a> </dd></dl>
<p>Definition at line <a class="el" href="fpc__hcp_8c_source.html#l00117">117</a> of file <a class="el" href="fpc__hcp_8c_source.html">fpc_hcp.c</a>.</p>
<p>References <a class="el" href="fpc__com__chain_8h_source.html#l00083">fpc_com_chain::app_mtu_buffer</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00081">fpc_com_chain::app_mtu_size</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00151">FPC_COM_CHAIN_RX</a>, <a class="el" href="fpc__com__result_8h_source.html#l00035">FPC_COM_RESULT_INVALID_ARGUMENT</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00038">fpc_com_chain_private::hcp_packet</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00052">fpc_com_chain::initialized</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00103">fpc_com_chain::link_overhead_get</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00121">fpc_com_chain::phy_mtu_buffer</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00119">fpc_com_chain::phy_mtu_size</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00129">fpc_com_chain::private_vars</a>, <a class="el" href="fpc__hcp_8c_source.html#l00211">recieve_chunks()</a>, and <a class="el" href="fpc__com__chain_8h_source.html#l00095">fpc_com_chain::tsp_overhead_get</a>.</p>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="fpc__hcp_8h_aa964fefb0fc68032f44850ee060b8e9b_cgraph.svg" width="459" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</p>
</div>
</div>
<a class="anchor" id="ac8ec0a9f397508976922d1833a9a7626"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="fpc__com__result_8h.html#a49b1f9a24f677d396227ea645494070a">fpc_com_result_t</a> fpc_hcp_transmit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="fpc__hcp__common_8h.html#ac2c1c83c186c5de07d8a6da8ed84a895">fpc_hcp_packet_t</a> *&#160;</td>
<td class="paramname"><em>packet</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="fpc__com__chain_8h.html#a1530dd4e8729e5f546a96abc5ac0a6de">fpc_com_chain_t</a> *&#160;</td>
<td class="paramname"><em>chain</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Transmits an application packet through the supplied transmit chain. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">packet</td><td>Application packet to send. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">chain</td><td>The chain to use. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>fpc_com_result_t </dd></dl>
<p>Definition at line <a class="el" href="fpc__hcp_8c_source.html#l00089">89</a> of file <a class="el" href="fpc__hcp_8c_source.html">fpc_hcp.c</a>.</p>
<p>References <a class="el" href="fpc__com__chain_8h_source.html#l00083">fpc_com_chain::app_mtu_buffer</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00081">fpc_com_chain::app_mtu_size</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00150">FPC_COM_CHAIN_TX</a>, <a class="el" href="fpc__com__result_8h_source.html#l00035">FPC_COM_RESULT_INVALID_ARGUMENT</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00038">fpc_com_chain_private::hcp_packet</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00052">fpc_com_chain::initialized</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00103">fpc_com_chain::link_overhead_get</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00121">fpc_com_chain::phy_mtu_buffer</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00119">fpc_com_chain::phy_mtu_size</a>, <a class="el" href="fpc__com__chain_8h_source.html#l00129">fpc_com_chain::private_vars</a>, <a class="el" href="fpc__hcp_8c_source.html#l00355">transmit_chunks()</a>, and <a class="el" href="fpc__com__chain_8h_source.html#l00095">fpc_com_chain::tsp_overhead_get</a>.</p>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="fpc__hcp_8h_ac8ec0a9f397508976922d1833a9a7626_cgraph.svg" width="472" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</p>
</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_bfccd401955b95cf8c75461437045ac0.html">inc</a></li><li class="navelem"><a class="el" href="fpc__hcp_8h.html">fpc_hcp.h</a></li>
<li class="footer">Generated on Tue Mar 24 2020 11:09:44 for Host Communication Protocol by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
</ul>
</div>
</body>
</html>