📄 mmc_8h.html
字号:
00462 <span class="preprocessor"></span> ConsoleWrite(<span class="stringliteral">"!s}"</span>);00463 <span class="preprocessor">#endif</span>00464 <span class="preprocessor"></span> <span class="keywordflow">return</span> 7; <span class="comment">/* failed to execute mmc command */</span>00465 }00466 00467 <a class="code" href="board_8h.html#a29">MMC_XCS</a> = <a class="code" href="board_8h.html#a31">MMC_NOT_SELECTED</a>;00468 00469 <span class="preprocessor">#ifdef MMCDEBUG</span>00470 <span class="preprocessor"></span> ConsoleWrite(<span class="stringliteral">"s}"</span>);00471 <span class="preprocessor">#endif</span>00472 <span class="preprocessor"></span> <span class="keywordflow">return</span> 0; <span class="comment">//ok return</span>00473 }</div></pre><p>Here is the call graph for this function:<p><center><img src="mmc_8h_a2_cgraph.png" border="0" usemap="#mmc_8h_a2_cgraph_map" alt=""></center><map name="mmc_8h_a2_cgraph_map"><area href="mmc_8c.html#a7" shape="rect" coords="142,8,337,32" alt=""><area href="mmc_8c.html#a0" shape="rect" coords="385,57,481,81" alt=""><area href="mmc_8c.html#a4" shape="rect" coords="200,106,280,130" alt=""><area href="board_8c.html#a1" shape="rect" coords="530,9,608,33" alt=""><area href="board_8h.html#a48" shape="rect" coords="532,57,606,81" alt=""><area href="board_8h.html#a49" shape="rect" coords="413,106,453,130" alt=""></map> </td> </tr></table><a class="anchor" name="a4" doxytag="mmc.h::WritePhysicalSector" ></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"> unsigned char WritePhysicalSector </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>Perform MMC block write from <b>*dataBufPtr</b> to sector sectorAddress.l. <p><p>Definition at line <a class="el" href="mmc_8c-source.html#l00502">502</a> of file <a class="el" href="mmc_8c-source.html">mmc.c</a>.<p>References <a class="el" href="unionAddress.html#o1">Address::b</a>, <a class="el" href="buffer_8h-source.html#l00131">Address::B::b0</a>, <a class="el" href="buffer_8h-source.html#l00132">Address::B::b1</a>, <a class="el" href="buffer_8h-source.html#l00133">Address::B::b2</a>, <a class="el" href="buffer_8h-source.html#l00107">DiskBlock::Raw::buf</a>, <a class="el" href="buffer_8c-source.html#l00013">dataBufPtr</a>, <a class="el" href="buffer_8c-source.html#l00010">diskSect</a>, <a class="el" href="buffer_8h-source.html#l00129">Address::l</a>, <a class="el" href="board_8h-source.html#l00075">LED_OFF</a>, <a class="el" href="board_8h-source.html#l00072">LED_ON</a>, <a class="el" href="board_8h-source.html#l00159">MMC_NOT_SELECTED</a>, <a class="el" href="board_8h-source.html#l00156">MMC_SELECTED</a>, <a class="el" href="board_8h-source.html#l00153">MMC_XCS</a>, <a class="el" href="mmc_8c-source.html#l00019">MmcCommand()</a>, <a class="el" href="mmc_8c-source.html#l00102">MmcWaitForData()</a>, <a class="el" href="unionDiskBlock.html#o1">DiskBlock::raw</a>, <a class="el" href="board_8h-source.html#l00066">RED_LED</a>, <a class="el" href="buffer_8c-source.html#l00015">sectorAddress</a>, <a class="el" href="board_8c-source.html#l00026">SPI8Clocks()</a>, <a class="el" href="board_8c-source.html#l00018">SPIGetChar()</a>, <a class="el" href="board_8h-source.html#l00220">SPIPutCharWithoutWaiting</a>, and <a class="el" href="board_8h-source.html#l00214">SPIWait</a>.<p>Referenced by <a class="el" href="storage_8c-source.html#l00183">WriteDiskSector()</a>.<p><pre class="fragment"><div>00502 {00503 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> c; 00504 00505 <span class="preprocessor">#ifdef MMCDEBUG</span>00506 <span class="preprocessor"></span> ConsoleWrite(<span class="stringliteral">"<W"</span>);00507 <span class="preprocessor">#endif </span>00508 <span class="preprocessor"></span>00509 <a class="code" href="board_8h.html#a10">RED_LED</a> = <a class="code" href="board_8h.html#a12">LED_ON</a>;00510 <a class="code" href="buffer_8c.html#a2">sectorAddress</a>.<a class="code" href="unionAddress.html#o0">l</a> = <a class="code" href="buffer_8c.html#a2">sectorAddress</a>.<a class="code" href="unionAddress.html#o0">l</a> * 2; <span class="comment">//convert to bytes (combined with 8bit shift)</span>00511 c=<a class="code" href="mmc_8c.html#a0">MmcCommand</a>(24 | 0x40 ,<a class="code" href="buffer_8c.html#a2">sectorAddress</a>.<a class="code" href="unionAddress.html#o1">b</a>.<a class="code" href="structAddress_1_1B.html#o2">b2</a>,<a class="code" href="buffer_8c.html#a2">sectorAddress</a>.<a class="code" href="unionAddress.html#o1">b</a>.<a class="code" href="structAddress_1_1B.html#o1">b1</a>,00512 <a class="code" href="buffer_8c.html#a2">sectorAddress</a>.<a class="code" href="unionAddress.html#o1">b</a>.<a class="code" href="structAddress_1_1B.html#o0">b0</a>, 0);00513 <a class="code" href="buffer_8c.html#a2">sectorAddress</a>.<a class="code" href="unionAddress.html#o0">l</a> = <a class="code" href="buffer_8c.html#a2">sectorAddress</a>.<a class="code" href="unionAddress.html#o0">l</a> >> 1; <span class="comment">//convert back to blocks</span>00514 <a class="code" href="board_8h.html#a29">MMC_XCS</a> = <a class="code" href="board_8h.html#a30">MMC_SELECTED</a>;00515 00516 00517 <a class="code" href="buffer_8c.html#a1">dataBufPtr</a> = <a class="code" href="buffer_8c.html#a0">diskSect</a>.<a class="code" href="unionDiskBlock.html#o1">raw</a>.<a class="code" href="structDiskBlock_1_1Raw.html#o0">buf</a>;00518 <a class="code" href="board_8h.html#a43">SPIPutCharWithoutWaiting</a>(0xFE);00519 <a class="code" href="board_8h.html#a41">SPIWait</a>();00520 00521 <span class="keywordflow">for</span> (c=0;c<128;c++){00522 <a class="code" href="board_8h.html#a43">SPIPutCharWithoutWaiting</a>(*dataBufPtr++); 00523 <a class="code" href="board_8h.html#a41">SPIWait</a>();00524 <a class="code" href="board_8h.html#a43">SPIPutCharWithoutWaiting</a>(*dataBufPtr++); 00525 <a class="code" href="board_8h.html#a41">SPIWait</a>();00526 <a class="code" href="board_8h.html#a43">SPIPutCharWithoutWaiting</a>(*dataBufPtr++); 00527 <a class="code" href="board_8h.html#a41">SPIWait</a>();00528 <a class="code" href="board_8h.html#a43">SPIPutCharWithoutWaiting</a>(*dataBufPtr++); 00529 <a class="code" href="board_8h.html#a41">SPIWait</a>();00530 }00531 00532 <a class="code" href="mmc_8c.html#a1">MmcWaitForData</a>(); <span class="comment">//Wait for 0xFE token</span>00533 <span class="keywordflow">while</span> (<a class="code" href="board_8c.html#a1">SPIGetChar</a>()==0) 00534 ; <span class="comment">// Wait until MMC not busy. </span>00535 00536 <span class="preprocessor">#ifdef MMCDEBUG</span>00537 <span class="preprocessor"></span> ConsoleWrite(<span class="stringliteral">"W>"</span>);00538 <span class="preprocessor">#endif </span>00539 <span class="preprocessor"></span>00540 00541 <a class="code" href="board_8h.html#a48">SPI8Clocks</a>(16);00542 <a class="code" href="board_8h.html#a29">MMC_XCS</a> = <a class="code" href="board_8h.html#a31">MMC_NOT_SELECTED</a>;00543 <a class="code" href="board_8h.html#a48">SPI8Clocks</a>(16);00544 00545 <a class="code" href="board_8h.html#a10">RED_LED</a> = <a class="code" href="board_8h.html#a13">LED_OFF</a>;00546 00547 }</div></pre><p>Here is the call graph for this function:<p><center><img src="mmc_8h_a4_cgraph.png" border="0" usemap="#mmc_8h_a4_cgraph_map" alt=""></center><map name="mmc_8h_a4_cgraph_map"><area href="mmc_8c.html#a0" shape="rect" coords="204,57,300,81" alt=""><area href="board_8h.html#a48" shape="rect" coords="358,57,433,81" alt=""><area href="board_8c.html#a1" shape="rect" coords="357,105,434,129" alt=""><area href="mmc_8c.html#a1" shape="rect" coords="197,105,306,129" alt=""></map> </td> </tr></table><hr><h2>Variable Documentation</h2><a class="anchor" name="a0" doxytag="mmc.h::storageFlags" ></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"> xdata unsigned char <a class="el" href="storage_8c.html#a0">storageFlags</a> </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Storage status flags. <p><ul><li>Bit 1 (LSB): 1=Device does not support interrupted read</li><li>Bit 2: 1=A sector is seeked and ready for reading</li><li>Bit 3: 1=No storage </li></ul><p>Definition at line <a class="el" href="mmc_8h-source.html#l00008">8</a> of file <a class="el" href="mmc_8h-source.html">mmc.h</a>.<p>Referenced by <a class="el" href="storage_8c-source.html#l00043">InitStorage()</a>, <a class="el" href="storage_8c-source.html#l00071">PrepareToReadDiskSector()</a>, and <a class="el" href="storage_8c-source.html#l00110">ReadDiskSector()</a>. </td> </tr></table><hr><FONT SIZE="-1">All software copyright 2000-2004 <a href="http://www.vlsi.fi/"> VLSI Solution OY.</a>Redistribution of these software modules are limited to promotional use onlyand only with the VS1011 / VS1002 / VS1003 MP3-Evakit evaluation boards. Free orcommercial use of these software modules in MP3 players is ok if theproduct includes MP3 decoder chip(s) from VLSI. You can request the complete(compilable) package from mp3@vlsi.fi</FONT>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -