📄 binding3.html
字号:
</dl></dl></dl><dd><div class="Item"><a name="93690"> </a><b class="symbol_lc">initSocket</b> </div><dl class="margin"><dl class="margin"><dl class="margin"><dl class="margin"><dl class="margin"><dd><div class="Indent5"><a name="93691"> </a>See <a href="binding2.html#94715"><i class="title">initSocket</i></a>. </div><br></dl></dl></dl></dl></dl><dd><div class="Item"><a name="93692"> </a><b class="symbol_lc">setWindow</b> </div><dl class="margin"><dl class="margin"><dl class="margin"><dl class="margin"><dl class="margin"><dd><div class="Indent5"><a name="93693"> </a>See <a href="binding2.html#93666"><i class="title">setWindow</i></a>. </div><br></dl></dl></dl></dl></dl><dd><div class="Item"><a name="94970"> </a><b class="symbol_lc">setMappingContext <br></b></div><dl class="margin"><dl class="margin"><dl class="margin"><dl class="margin"><dl class="margin"><dd><div class="Indent5"><a name="94971"> </a>See <a href="binding2.html#93668"><i class="title">setMappingContext</i></a>. </div><br></dl></dl></dl></dl></dl><dd><div class="Item"><a name="94972"> </a><b class="symbol_lc">getAndClearCardChangeIndicator <br></b></div><dl class="margin"><dl class="margin"><dl class="margin"><dl class="margin"><dl class="margin"><dd><div class="Indent5"><a name="94987"> </a>See <a href="binding2.html#93670"><i class="title">getAndClearCardChangeIndicator</i></a>. </div><br></dl></dl></dl></dl></dl><dd><div class="Item"><a name="94992"> </a><b class="symbol_lc">writeProtected</b> </div><dl class="margin"><dl class="margin"><dl class="margin"><dl class="margin"><dl class="margin"><dd><div class="Indent5"><a name="93699"> </a>See <a href="binding2.html#93672"><i class="title">writeProtected</i></a>. </div><br></dl></dl></dl></dl></dl><dd><div class="Item"><a name="96772"> </a><b class="symbol_lc">freeSocket</b> </div><dl class="margin"><dl class="margin"><dl class="margin"><dl class="margin"><dl class="margin"><dd><div class="Indent5"><a name="96768"> </a>See <a href="binding2.html#97795"><i class="title">freeSocket</i></a>. </div><br></dl></dl></dl></dl></dl></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="96495">3.3.3 Writing an <b class="routine"><i class="routine">flDelayLoop</i></b><b>( )</b>Routine<b>( )</b></a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="96496"> </a>TrueFFS uses <b class="routine"><i class="routine">flDelayLoop</i></b><b>( )</b>to handle the timing needs of interacting with the flash hardware. The purpose of this function is simply to wait for the number of cycles requested. This function must be of the form:</p></dl><dl class="margin"><dd><pre class="Code"><b><a name="97874">void flDelayLoop(int)</a></b></pre></dl><dl class="margin"><dd><p class="Body"><a name="97891"> </a>For the <b class="file">mv177 </b>BSP, <b class="routine"><i class="routine">flDelayLoop</i></b><b>( )</b>is defined as followed: </p></dl><dl class="margin"><dd><pre class="Code"><b><a name="96497">void flDelayLoop ( int cycles /* loop count to be consumed */ ) { while (--cycles); }</a></b></pre></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="96471">3.3.4 Writing an <b class="routine"><i class="routine">flFitInSocketWindow</i></b><b>( )</b> Routine </a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="98034"> </a>TrueFFS uses <b class="routine"><i class="routine">flFitInSocketWindow</i></b><b>( )</b>to make sure that <b class="file">chipSize</b> is never larger than <b class="file">windowSize</b>. Your <b class="routine"><i class="routine">flFitInSocketWindow</i></b><b>( )</b> must be of the form:</p></dl><dl class="margin"><dd><pre class="Code"><b><a name="98035">long int flFitInSocketWindow ( long int chipSize, /* size of single physical chip in bytes */ int interleaving, /* flash chip interleaving (1,2,4 etc) */ long int windowSize /* socket window size in bytes */ )</a></b></pre></dl><dl class="margin"><dd><p class="Body"><a name="98057"> </a>If your BSP uses a sliding window or if it maps all the flash into the window, your definition for this function can simply return <b class="symbol_lc">chipSize</b> as its function value. </p><dd><p class="Body"><a name="98072"> </a>If your BSP uses a fixed window that is not large enough to map the entire flash medium into host memory, your <b class="routine"><i class="routine">flFitInSocketWindow</i></b><b>( )</b>function must compare <b class="file">chipSize</b> and the <b class="file">windowSize</b>. If <b class="file">chipSize</b> is smaller than or equal to <b class="file">windowSize</b>, this function can return <b class="file">chipSize</b> as its function value. If <b class="file">chipSize</b> is larger than <b class="file">windowSize</b>, this function should return a size that fits within <b class="file">windowSize</b>. </p><dd><p class="Body"><a name="98088"> </a>The MTD mapping function uses the returned value of the <b class="routine"><i class="routine">flFitInSocketWindow</i></b><b>( )</b>function to adjust the value of <b class="file">FLSocket.chipSize</b>. For an example of a BSP that defines a non-trivial <b class="routine"><i class="routine">flFitInSocketWindow</i></b><b>( )</b>function, look at the mv177<b class="file"> </b>BSP. </p></dl></dl><a name="foot"><hr></a><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a></a><a href="binding.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="binding2.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="binding4.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p></body></html><!---by WRS Documentation (), Wind River Systems, Inc. conversion tool: Quadralay WebWorks Publisher 4.0.11 template: CSS Template, Jan 1998 - Jefro --->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -