1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>nand_correct_data</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="MTD NAND Driver Programming Interface"><link rel="up" href="pubfunctions.html" title="Chapter 10. Public Functions Provided"><link rel="prev" href="API---nand-correct-data.html" title="__nand_correct_data"><link rel="next" href="intfunctions.html" title="Chapter 11. Internal Functions Provided"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">nand_correct_data</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API---nand-correct-data.html">Prev</a> </td><th width="60%" align="center">Chapter 10. Public Functions Provided</th><td width="20%" align="right"> <a accesskey="n" href="intfunctions.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-nand-correct-data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>nand_correct_data — 2 [NAND Interface] Detect and correct bit error(s) 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">nand_correct_data </b>(</code></td><td>struct mtd_info * <var class="pdparam">mtd</var>, </td></tr><tr><td> </td><td>unsigned char * <var class="pdparam">buf</var>, </td></tr><tr><td> </td><td>unsigned char * <var class="pdparam">read_ecc</var>, </td></tr><tr><td> </td><td>unsigned char * <var class="pdparam">calc_ecc</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1102828956"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>mtd</code></em></span></dt><dd><p> 4 MTD block structure 5 </p></dd><dt><span class="term"><em class="parameter"><code>buf</code></em></span></dt><dd><p> 6 raw data read from the chip 7 </p></dd><dt><span class="term"><em class="parameter"><code>read_ecc</code></em></span></dt><dd><p> 8 ECC from the chip 9 </p></dd><dt><span class="term"><em class="parameter"><code>calc_ecc</code></em></span></dt><dd><p> 10 the ECC calculated from raw data 11 </p></dd></dl></div></div><div class="refsect1"><a name="idp1102833516"></a><h2>Description</h2><p> 12 Detect and correct a 1 bit error for 256/512 byte block 13</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API---nand-correct-data.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pubfunctions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="intfunctions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">__nand_correct_data</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 11. Internal Functions Provided</td></tr></table></div></body></html> 14