📄 protocol_8c.html
字号:
</td>
<td>
<p>
Description: Formats the acknowledge packet and transmits it<p>
Inputs: Void<p>
Returns: Void </td>
</tr>
</table>
<p>
Here is the call graph for this function:<p><center><img src="protocol_8c_a27_cgraph.png" border="0" usemap="#protocol_8c_a27_cgraph_map" alt=""></center>
<map name="protocol_8c_a27_cgraph_map">
<area href="protocol_8h.html#a98" shape="rect" coords="193,8,331,34" alt="">
</map>
<a class="anchor" name="a28" doxytag="protocol.c::protocol_verify_packet"></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="cypdef_8h.html#a1">UINT8</a> protocol_verify_packet </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Description: Gets packet data and makes sure the bytes are protocol perfect(otherwise it will return NO_PACKET). It checks and fixes packets with checksums by testing each column of bits (See comments and comment block in code source). It then compares checksums with the calculated checksum.<p>
Inputs: Void<p>
Returns:<ul>
<li>0x00-0x07 - Packet type (See <a class="el" href="protocol_8h.html">protocol.h</a> for types of packets)</li><li>NO_PACKET - no packet or bad packet </li></ul>
</td>
</tr>
</table>
<p>
Here is the call graph for this function:<p><center><img src="protocol_8c_a28_cgraph.png" border="0" usemap="#protocol_8c_a28_cgraph_map" alt=""></center>
<map name="protocol_8c_a28_cgraph_map">
<area href="protocol_8h.html#a99" shape="rect" coords="213,7,368,34" alt="">
<area href="protocol_8h.html#a98" shape="rect" coords="221,58,360,85" alt="">
</map>
<a class="anchor" name="a29" doxytag="protocol.c::protocol_get_tx_pkt"></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* protocol_get_tx_pkt </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Description: Returns a pointer to the radio transmit packet<p>
Inputs: Void<p>
Returns: Void * </td>
</tr>
</table>
<a class="anchor" name="a30" doxytag="protocol.c::protocol_get_rx_pkt"></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* protocol_get_rx_pkt </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Description: Returns a pointer to the radio receive packet<p>
Inputs: Void<p>
Returns: Void * </td>
</tr>
</table>
<a class="anchor" name="a31" doxytag="protocol.c::protocol_get_next_channel"></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 protocol_get_next_channel </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Description: Performs the channel selection algorithm. Every sixth channel will be used.<p>
Inputs: Void<p>
Returns: Void </td>
</tr>
</table>
<a class="anchor" name="a32" doxytag="protocol.c::protocol_init_channel"></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 protocol_init_channel </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Description: Initialize the channel selection algorithm to the top channel in the channel subset<p>
Inputs: Void<p>
Returns: Void </td>
</tr>
</table>
<a class="anchor" name="a33" doxytag="protocol.c::protocol_calculate_network_id"></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 protocol_calculate_network_id </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Description: Figures device parameters using algorithms to find PN code, channel, pin, and checksum seed (based off the MID).<p>
Inputs: Void<p>
Returns: Void </td>
</tr>
</table>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="a2" doxytag="protocol.c::sys_params"></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="struct__SYS__PARAMETERS.html">SYS_PARAMETERS</a> <a class="el" href="protocol_8c.html#a2">sys_params</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
To set/retrieve radio parameters. Such as PN code, channel, MID, etc.
<p>
To retrieve radio attributes. In this file it is used to retrieve the channel the radio is on. </td>
</tr>
</table>
<a class="anchor" name="a3" doxytag="protocol.c::rx_packet"></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="union__LS__DATA__PACKET.html">LS_DATA_PACKET</a> <a class="el" href="protocol_8h.html#a86">rx_packet</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Packet for receiving.
<p>
</td>
</tr>
</table>
<a class="anchor" name="a4" doxytag="protocol.c::tx_packet"></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="union__LS__DATA__PACKET.html">LS_DATA_PACKET</a> <a class="el" href="protocol_8h.html#a87">tx_packet</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Packet for transmitting.
<p>
</td>
</tr>
</table>
<a class="anchor" name="a5" doxytag="protocol.c::cmd_packet"></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="union__LS__CONTROL__PACKET.html">LS_CONTROL_PACKET</a> <a class="el" href="protocol_8c.html#a5">cmd_packet</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Command packet, used to transmit control packets.
<p>
</td>
</tr>
</table>
<a class="anchor" name="a6" doxytag="protocol.c::tx_length"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -