📄 flashmem.ax(2).toc8.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title><i class="i">tffsRawio</i>( ) Subroutines </title></head><body bgcolor="FFFFFF"><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a></a><a href="flashMem.aX%282%29.TOC.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="flashMem.aX%282%29.TOC7.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="flashMem.aX%282%29.TOC9.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p><font face="Helvetica, sans-serif" class="sans"><h2 class="H1"><i><a name="4700"> <i class="i">tffsRawio</i>( ) </a></i></h2></font><h4 class="SH"><a name="4701"> </a>NAME </h4><dl class="margin"><dl class="margin"><dd><a name="4702"><div class="aX"><b class="routine"><i class="routine">tffsRawio</i></b><b>( )</b> - low level I/O access to flash components </div></a></dl></dl><h4 class="SH"><a name="4703"> </a>SYNOPSIS </h4><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="4705">STATUS tffsRawio ( int tffsDriveNo, /* TrueFFS drive number (0 - DRIVES-1) */ int functionNo, /* TrueFFS function code */ int arg0, /* argument 0 */ int arg1, /* argument 1 */ int arg2 /* argument 2 */ )</a></b></pre></dl></dl><h4 class="SH"><a name="4713"> </a>DESCRIPTION </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="4714"> </a>Use the utilities provided by this routine with the utmost care. If you use these routines carelessly, you risk data loss as well as permanent physical damage to the flash device.</p><dd><p class="Body"><a name="4715"> </a>This routine is a gateway to a series of utilities (listed below). Functions such as <b><i>mkTffsboot</i></b><b>( )</b> and <b><i>tffsBootImagePut</i></b><b>( )</b> use these <b><i>tffsRawio</i></b><b>( )</b> utilities to write boot sector information. The functions for physical read, write, and erase are made available with the intention that they be used on erase units allocated to the boot-image region by <b><i>tffsDevFormat</i></b><b>( )</b>. Using these functions elsewhere could be dangerous.</p><dd><p class="Body"><a name="8293"> </a>The <i class="i">arg0</i>, <i class="i">arg1</i>, and <i class="i">arg2</i> parameters to <b><i>tffsRawio</i></b><b>( )</b> are interpreted differently depending on the function number you specify for <i class="i">functionNo</i>. The drive number is determined by the order in which the socket components were registered.<p class="table"><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="8335"> </a><font face="Helvetica, sans-serif" size="-1" class="sans"><i class="textVariable">functionNo</i></font></b></div></th><td width="10"> </td><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="8337"> </a><font face="Helvetica, sans-serif" size="-1" class="sans"><i class="textVariable">arg0</i></font></b></div></th><td width="10"> </td><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="8339"> </a><font face="Helvetica, sans-serif" size="-1" class="sans"><i class="textVariable">arg1</i></font></b></div></th><td width="10"> </td><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="8341"> </a><font face="Helvetica, sans-serif" size="-1" class="sans"><i class="textVariable">arg2</i></font></b></div></th><td width="10"> </td></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="8343"> </a><b class="symbol_UC">TFFS_GET_PHYSICAL_INFO</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8345"> </a>user buffer</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8347"> </a>N/A</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8349"> </a>N/A</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="8351"> </a><b class="symbol_UC">TFFS_PHYSICAL_READ</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8353"> </a>address to read</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8355"> </a>byte count</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8357"> </a> user buffer address</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="8359"> </a><b class="symbol_UC">TFFS_PHYSICAL_WRITE</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8361"> </a>address to write</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8363"> </a>byte count</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8365"> </a> user buffer address</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="8367"> </a><b class="symbol_UC">TFFS_PHYSICAL_ERASE</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8369"> </a>first unit</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8371"> </a>number of units</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8373"> </a>N/A </div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="8375"> </a><b class="symbol_UC">TFFS_ABS_READ</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8377"> </a>sector number</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8379"> </a>number of sectors</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8381"> </a> user buffer address</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="8383"> </a><b class="symbol_UC">TFFS_ABS_WRITE</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8385"> </a>sector number</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8387"> </a>number of sectors</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8389"> </a> user buffer address</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="8391"> </a><b class="symbol_UC">TFFS_ABS_DELETE</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8393"> </a>sector number</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8395"> </a>number of sectors</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8397"> </a>N/A</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="8399"> </a><b class="symbol_UC">TFFS_DEFRAGMENT_VOLUME</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8401"> </a>number of sectors</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8403"> </a>user buffer address</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="8405"> </a>N/A</div></td><td width="10"> </td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></p><dd><p class="Body"><a name="4727"> </a><b>TFFS_GET_PHYSICAL_INFO</b> writes the flash type, erasable block size, and media size to the user buffer specified in <i class="i">arg0</i>.</p><dd><p class="Body"><a name="4728"> </a><b>TFFS_PHYSICAL_READ</b> reads <i class="i">arg1</i> bytes from <i class="i">arg0</i> and writes them to the buffer specified by <i class="i">arg2</i>.</p><dd><p class="Body"><a name="4729"> </a><b>TFFS_PHYSICAL_WRITE</b> copies <i class="i">arg1</i> bytes from the <i class="i">arg2</i> buffer and writes them to the flash memory location specified by <i class="i">arg0</i>.</p><dd><p class="Body"><a name="4730"> </a><b>TFFS_PHYSICAL_ERASE</b> erases <i class="i">arg1</i> erase units, starting at the erase unit specified in <i class="i">arg0</i>.</p><dd><p class="Body"><a name="4731"> </a><b>TFFS_ABS_READ</b> reads <i class="i">arg1</i> sectors, starting at sector <i class="i">arg0</i>, and writes them to the user buffer specified in <i class="i">arg2</i>.</p><dd><p class="Body"><a name="4732"> </a><b>TFFS_ABS_WRITE</b> takes data from the <i class="i">arg2</i> user buffer and writes <i class="i">arg1</i> sectors of it to the flash location starting at sector <i class="i">arg0</i>.</p><dd><p class="Body"><a name="4733"> </a><b>TFFS_ABS_DELETE</b> deletes <i class="i">arg1</i> sectors of data starting at sector <i class="i">arg0</i>.</p><dd><p class="Body"><a name="4734"> </a><b>TFFS_DEFRAGMENT_VOLUME</b> calls the defragmentation routine with the minimum number of sectors to be reclaimed, <i class="i">arg0</i>, and writes the actual number reclaimed in the user buffer by <i class="i">arg1</i>. Calling this function through some low priority task will make writes more deterministic. No validation is done of the user specified address fields, so the functions assume they are writable. If the address is invalid, you could see bus errors or segmentation faults. </p></dl></dl><h4 class="SH"><a name="4735"> </a>RETURNS </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="4736"> </a>OK, or ERROR if it failed. </p></dl></dl><h4 class="SH"><a name="4737"> </a>SEE ALSO </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="8547"> </a>tffsDrv</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="flashMem.aX%282%29.TOC.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="flashMem.aX%282%29.TOC7.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="flashMem.aX%282%29.TOC9.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 + -