update nand flash simulator

align the nand flash simulator against the PR #65

Tests:
Total Test time (real) =   6.33 sec
~/work/git_repos/github/eclipse/levelx_rahmanih/test/cmake
3/3 Test #1: default_build_coverage::levelx_nand_flash_test ........   Passed   44.06 sec

100% tests passed, 0 tests failed out of 3
This commit is contained in:
Haithem Rahmani
2026-02-10 09:28:48 +01:00
parent 04e385f3d5
commit 4782f22568
+7 -2
View File
@@ -278,11 +278,16 @@ UINT ecc_status = LX_SUCCESS;
break; break;
} }
} }
if (spare_buffer)
{
#ifdef LX_NAND_ENABLE_CONTROL_BLOCK_FOR_DRIVER_INTERFACE #ifdef LX_NAND_ENABLE_CONTROL_BLOCK_FOR_DRIVER_INTERFACE
status = _lx_nand_flash_simulator_extra_bytes_get(nand_flash, block, page + i, spare_buffer + i * SPARE_BYTES_PER_PAGE, SPARE_BYTES_PER_PAGE); status = _lx_nand_flash_simulator_extra_bytes_get(nand_flash, block, page + i, spare_buffer + i * SPARE_BYTES_PER_PAGE, SPARE_BYTES_PER_PAGE);
#else #else
status = _lx_nand_flash_simulator_extra_bytes_get(block, page + i, spare_buffer + i * SPARE_BYTES_PER_PAGE, SPARE_BYTES_PER_PAGE); status = _lx_nand_flash_simulator_extra_bytes_get(block, page + i, spare_buffer + i * SPARE_BYTES_PER_PAGE, SPARE_BYTES_PER_PAGE);
#endif #endif
}
} }
return (ecc_status); return (ecc_status);
} }