Skip to content

Commit 89c745f

Browse files
authored
Merge pull request #66 from rahmanih/update_nand_simulator
Updated the nand flash simulator
2 parents c27eb52 + 4782f22 commit 89c745f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

common/src/lx_nand_flash_simulator.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,16 @@ UINT ecc_status = LX_SUCCESS;
278278
break;
279279
}
280280
}
281+
282+
if (spare_buffer)
283+
{
284+
281285
#ifdef LX_NAND_ENABLE_CONTROL_BLOCK_FOR_DRIVER_INTERFACE
282-
status = _lx_nand_flash_simulator_extra_bytes_get(nand_flash, block, page + i, spare_buffer + i * SPARE_BYTES_PER_PAGE, SPARE_BYTES_PER_PAGE);
286+
status = _lx_nand_flash_simulator_extra_bytes_get(nand_flash, block, page + i, spare_buffer + i * SPARE_BYTES_PER_PAGE, SPARE_BYTES_PER_PAGE);
283287
#else
284-
status = _lx_nand_flash_simulator_extra_bytes_get(block, page + i, spare_buffer + i * SPARE_BYTES_PER_PAGE, SPARE_BYTES_PER_PAGE);
288+
status = _lx_nand_flash_simulator_extra_bytes_get(block, page + i, spare_buffer + i * SPARE_BYTES_PER_PAGE, SPARE_BYTES_PER_PAGE);
285289
#endif
290+
}
286291
}
287292
return (ecc_status);
288293
}

0 commit comments

Comments
 (0)