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

📄 board_8c.html

📁 MP3播放器源代码, VS1003B
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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>VLSI Solution Oy Evaluation MP3 Player Source Code Documentation</title><link href="doxygen.css" rel="stylesheet" type="text/css"><img src="vlsi_small.gif" hspace="20" bordercolor="#ffffff"  alt="VLSI Solution Oy"><b>VLSI Solution Oy Evaluation MP3 Player Source Code Documentation</b><p></p></head><body><!-- Generated by Doxygen 1.3.7 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div><h1>board.c File Reference</h1>Board related utility functions such as delay().  <a href="#_details">More...</a><p><code>#include "<a class="el" href="board_8h-source.html">board.h</a>"</code><br><code>#include "<a class="el" href="lcd_8h-source.html">lcd.h</a>"</code><br><p>Include dependency graph for board.c:<p><center><img src="board_8c__incl.png" border="0" usemap="#board.c_map" alt="Include dependency graph"></center><map name="board.c_map"><area href="board_8h.html" shape="rect" coords="71,93,121,117" alt=""><area href="lcd_8h.html" shape="rect" coords="172,93,209,117" alt=""><area href="lcdfonts_8h.html" shape="rect" coords="246,18,310,42" alt=""></map><p><a href="board_8c-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Classes</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>union &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="unionTemp.html">Temp</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generic temp variable for non-reentrant main routines.  <a href="unionTemp.html#_details">More...</a><br><br></td></tr><tr><td colspan=2><br><h2>Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>unsigned char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="board_8c.html#a1">SPIGetChar</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send 8 ones to SPI bus and receive the result byte.  <a href="#a1"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="board_8c.html#a2">SPI8Clocks</a> (unsigned char nClocks)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send nClocks x 8 clock transitions with MOSI=1 (0xff).  <a href="#a2"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="board_8c.html#a3">Delay</a> (int milliseconds)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Busy loop delay function.  <a href="#a3"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="board_8c.html#a4">InitBoard</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Startup initialization of the microcontroller board.  <a href="#a4"></a><br><br></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="unionTemp.html">Temp</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="board_8c.html#a0">temp</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generic temp variable for non-reentrant main routines.  <a href="#a0"></a><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Board related utility functions such as delay(). <p><p>Definition in file <a class="el" href="board_8c-source.html">board.c</a>.<hr><h2>Function Documentation</h2><a class="anchor" name="a3" doxytag="board.c::Delay" ></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 Delay           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>milliseconds</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>Busy loop delay function. <p>Creates n times 1 ms hardware delays <p>Definition at line <a class="el" href="board_8c-source.html#l00036">36</a> of file <a class="el" href="board_8c-source.html">board.c</a>.<p>References <a class="el" href="board_8h-source.html#l00210">InitiateDelay</a>, and <a class="el" href="board_8h-source.html#l00221">WaitOutDelay</a>.<p>Referenced by <a class="el" href="mmc_8c-source.html#l00246">InitMMC()</a>, <a class="el" href="lcd_8c-source.html#l00185">LcdPrintGenericResult()</a>, <a class="el" href="player_8c-source.html#l00265">LoadPatch()</a>, <a class="el" href="mmc_8c-source.html#l00019">MmcCommand()</a>, <a class="el" href="vs10xx_8c-source.html#l00069">Mp3Reset()</a>, <a class="el" href="vs10xx_8c-source.html#l00035">Mp3SoftReset()</a>, <a class="el" href="mmc_8c-source.html#l00217">RebootMMC()</a>, <a class="el" href="record_8c-source.html#l00101">Record()</a>, and <a class="el" href="vs10xx_8c-source.html#l00112">VsSineTest()</a>.<p><pre class="fragment"><div>00036                             {00037   <span class="keywordflow">for</span> (;milliseconds;milliseconds--){  <span class="comment">/* for n times do: */</span>00038     <a class="code" href="board_8h.html#a40">InitiateDelay</a> (1000);00039     <a class="code" href="board_8h.html#a41">WaitOutDelay</a>(); <span class="comment">/* 1 ms delay */</span>00040     }00041 }</div></pre>    </td>  </tr></table><a class="anchor" name="a4" doxytag="board.c::InitBoard" ></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 InitBoard           </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>Startup initialization of the microcontroller board. <p><p>Definition at line <a class="el" href="board_8c-source.html#l00044">44</a> of file <a class="el" href="board_8c-source.html">board.c</a>.<p>References <a class="el" href="board_8h-source.html#l00210">InitiateDelay</a>, <a class="el" href="board_8h-source.html#l00162">MMC_OFF</a>, and <a class="el" href="board_8h-source.html#l00038">Mp3PutInReset</a>.<p>Referenced by <a class="el" href="player_8c-source.html#l00765">main()</a>.<p><pre class="fragment"><div>00045 {00046   AUXR   = 0x11;           <span class="comment">/* Take full memory into use */</span>00047   00048   <a class="code" href="board_8h.html#a1">Mp3PutInReset</a>();00049 00050   <span class="comment">//  MP3_XRESET = 0;          /* Put the MP3 chip into reset */</span>00051 00052   <a class="code" href="board_8h.html#a28">MMC_OFF</a> = 1;             <span class="comment">/* Turn mmc power off        */</span>00053 00054 00055   SPCON  = 0xF2;    <span class="comment">/* Set slow spi clock        */</span>00056   CKCON0 = 0x01;    <span class="comment">/* CPU x 2, timer2 x 1       */</span>00057   IEN0   = 0;       <span class="comment">/* Disable all interrupts    */</span>00058   00059   BDRCON = 0x1F;    <span class="comment">/* Set uart for  115200,8n1  */</span>00060   PCON   = 0x80;    <span class="comment">/* Double Baud Rate */</span>00061   BRL    = 248;      <span class="comment">/* 248 for 115200 */</span>00062   SCON   = 0x50;    <span class="comment">/* Serial Port Control Register */</span>00063   TI     = 1;

⌨️ 快捷键说明

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