Description
Source
Call Graph
Start Line: 713
unsigned char RawNandFlash_CopyPage(const struct RawNandFlash *raw, unsigned short sourceBlock, unsigned short sourcePage, unsigned short destBlock, unsigned short destPage)
{
unsigned char numTries = NUMCOPYTRIES;
TRACE_DEBUG("RawNandFlash_CopyPage(B#%d:P#%d -> B#%d:P#%d)\n\r",
sourceBlock, sourcePage, destBlock, destPage);
while (numTries) {
if (!CopyPage(raw, sourceBlock, sourcePage, destBlock, destPage)) {
return 0;
}
numTries--;
}
TRACE_ERROR("RawNandFlash_CopyPage: Failed to copy page after %d tries\n\r", NUMCOPYTRIES);
return NandCommon_ERROR_BADBLOCK;
}