📄 main_8c.html
字号:
<!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>WirelessUSB(TM) LS PRoC DVK RS232 Slave Application: main.c File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
<h1>main.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
The main RS232 Master control code.
<p>
<code>#include "<a class="el" href="protocol_8h.html">protocol.h</a>"</code><br>
<code>#include "<a class="el" href="rs232_8h.html">rs232.h</a>"</code><br>
<code>#include "radio.h"</code><br>
<code>#include "<a class="el" href="mfgtest_8h.html">mfgtest.h</a>"</code><br>
<code>#include "lcd.h"</code><br>
<code>#include "stdlib.h"</code><br>
<p>
Include dependency graph for main.c:<p><center><img src="main_8c__incl.png" border="0" usemap="#main.c_map" alt="Include dependency graph"></center>
<map name="main.c_map">
<area href="protocol_8h.html" shape="rect" coords="200,231,280,258" alt="">
<area href="ls__config_8h.html" shape="rect" coords="192,157,277,183" alt="">
<area href="isr_8h.html" shape="rect" coords="133,82,178,109" alt="">
<area href="timer_8h.html" shape="rect" coords="202,82,266,109" alt="">
<area href="cypdef_8h.html" shape="rect" coords="276,7,348,34" alt="">
<area href="rs232_8h.html" shape="rect" coords="328,157,394,183" alt="">
<area href="flash_8h.html" shape="rect" coords="290,82,352,109" alt="">
<area href="mfgtest_8h.html" shape="rect" coords="450,231,528,258" alt="">
</map>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a0">BIND_CHECK_COUNT</a> 100</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a1">MIN_POLL_GAP</a> 3</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a2">MAX_NUM_TRANSMIT</a> 5</td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cypdef_8h.html#a1">UINT8</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a9">button_pressed</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a10">main</a> ()</td></tr>
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cypdef_8h.html#a1">UINT8</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a3">button_up</a> = TRUE</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cypdef_8h.html#a1">UINT8</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a4">channel</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cypdef_8h.html#a1">UINT8</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a5">pn_code</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cypdef_8h.html#a1">UINT8</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a6">local_bind_state</a> = 0xFF</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="struct__SYS__PARAMETERS.html">SYS_PARAMETERS</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a7">sys_params</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="cypdef_8h.html#a1">UINT8</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a8">bind_state</a></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="a0" doxytag="main.c::BIND_CHECK_COUNT"></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 BIND_CHECK_COUNT 100 </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
For checking bind button activity.
<p>
</td>
</tr>
</table>
<a class="anchor" name="a1" doxytag="main.c::MIN_POLL_GAP"></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 MIN_POLL_GAP 3 </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
For initializing and resetting poll_gap.
<p>
</td>
</tr>
</table>
<a class="anchor" name="a2" doxytag="main.c::MAX_NUM_TRANSMIT"></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 MAX_NUM_TRANSMIT 5 </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Maximum number of transmits.
<p>
</td>
</tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="a9" doxytag="main.c::button_pressed"></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> button_pressed </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: Check to see if the button is pressed<p>
Inputs: void<p>
Returns:<ul>
<li>1 - Button pressed</li><li>0 - Button not pressed </li></ul>
</td>
</tr>
</table>
<a class="anchor" name="a10" doxytag="main.c::main"></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 main </td>
<td class="md" valign="top">( </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: RS232 Master main routine initializes the interrupt service routine, timer, platform board, serial peripheral interface, protocol, and RS232. Then runs the main control loop that is always listening for valid data packets, and checking the the platform board for a bind button press. It also displays channel, PN code, and bind state through the LCD.<p>
Inputs: Void<p>
Returns: Void </td>
</tr>
</table>
<p>
Here is the call graph for this function:<p><center><img src="main_8c_a10_cgraph.png" border="0" usemap="#main_8c_a10_cgraph_map" alt=""></center>
<map name="main_8c_a10_cgraph_map">
<area href="rs232_8c.html#a14" shape="rect" coords="164,8,233,34" alt="">
<area href="rs232_8c.html#a17" shape="rect" coords="116,58,281,85" alt="">
<area href="rs232_8c.html#a15" shape="rect" coords="141,109,256,136" alt="">
<area href="rs232_8c.html#a16" shape="rect" coords="110,160,286,186" alt="">
<area href="main_8c.html#a9" shape="rect" coords="142,210,254,237" alt="">
<area href="isr_8c.html#a0" shape="rect" coords="168,261,229,288" alt="">
<area href="protocol_8c.html#a14" shape="rect" coords="152,312,245,338" alt="">
<area href="protocol_8c.html#a16" shape="rect" coords="337,388,422,414" alt="">
<area href="protocol_8h.html#a94" shape="rect" coords="130,413,266,440" alt="">
<area href="timer_8c.html#a11" shape="rect" coords="110,464,286,490" alt="">
<area href="timer_8h.html#a13" shape="rect" coords="120,514,277,541" alt="">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -