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

📄 main_8c.html

📁 cypress公司PROC开发源码(cywusb6953)
💻 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 Master 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&nbsp;Page</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</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>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="133,231,213,258" alt="">
<area href="ls__config_8h.html" shape="rect" coords="125,157,210,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="233,7,305,34" alt="">
<area href="rs232_8h.html" shape="rect" coords="258,157,325,183" alt="">
<area href="mfgtest_8h.html" shape="rect" coords="384,231,461,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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a0">BIND_CHECK_COUNT</a>&nbsp;&nbsp;&nbsp;10</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a1">MAX_NUM_TRANSMIT</a>&nbsp;&nbsp;&nbsp;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>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a5">button_pressed</a> (void)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a6">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>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a2">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>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a3">channel</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="struct__SYS__PARAMETERS.html">SYS_PARAMETERS</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a4">sys_params</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&nbsp;&nbsp;&nbsp;10          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
For checking bind button activity. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a1" 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&nbsp;&nbsp;&nbsp;5          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Maximum number of transmits. 
<p>
    </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="a5" 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">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </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>
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="a6" 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">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </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>
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 the channel and PN code in 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_a6_cgraph.png" border="0" usemap="#main_8c_a6_cgraph_map" alt=""></center>
<map name="main_8c_a6_cgraph_map">
<area href="rs232_8c.html#a14" shape="rect" coords="168,7,237,34" alt="">
<area href="rs232_8c.html#a17" shape="rect" coords="120,58,285,85" alt="">
<area href="rs232_8c.html#a15" shape="rect" coords="145,109,260,135" alt="">
<area href="rs232_8c.html#a16" shape="rect" coords="109,159,296,186" alt="">
<area href="main_8c.html#a5" shape="rect" coords="146,210,258,237" alt="">
<area href="isr_8c.html#a0" shape="rect" coords="172,261,233,287" alt="">
<area href="protocol_8c.html#a19" shape="rect" coords="134,311,270,338" alt="">
<area href="protocol_8c.html#a20" shape="rect" coords="134,362,270,389" alt="">
<area href="protocol_8h.html#a95" shape="rect" coords="129,413,276,439" alt="">
<area href="protocol_8c.html#a16" shape="rect" coords="156,463,249,490" alt="">
<area href="timer_8c.html#a3" shape="rect" coords="164,514,241,541" alt="">
</map>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="a2" doxytag="main.c::button_up"></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> <a class="el" href="main_8c.html#a2">button_up</a> = TRUE          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Button state. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a3" doxytag="main.c::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"><a class="el" href="cypdef_8h.html#a1">UINT8</a> <a class="el" href="main_8c.html#a3">channel</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Channel the radio is on, to display in LCD module. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a4" doxytag="main.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>
      &nbsp;
    </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>
<html>

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=Generator content="Microsoft Word 10 (filtered)">
<title>Cypress Semiconductor Corporation</title>

<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"MS Mincho";
	panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
	{font-family:"\@MS Mincho";
	panose-1:2 2 6 9 4 2 5 8 3 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:#1A419D;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:#1A419D;
	text-decoration:underline;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=EN-US link="#1A419D" vlink="#1A419D">

<div class=Section1>

<div>

<div align=center>

<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 width="100%"
 style='width:100.0%;border-collapse:collapse;border:none'>
 <tr>
  <td width="100%" style='width:100.0%;border:none;border-top:solid windowtext 1.0pt;
  padding:0in 5.4pt 0in 5.4pt'>
  <p class=MsoNormal align=center style='text-align:center'><b><span
  style='font-size:13.0pt;font-family:Arial;color:blue'><a
  href="http://www.cypress.com/">Cypress Semiconductor Corporation</a></span></b><b><span
  style='font-size:13.0pt;font-family:Arial'>牋 </span></b><b><span
  style='font-size:16.0pt;font-family:Symbol'>

⌨️ 快捷键说明

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