read_page()
PROTOTYPE
#include <bfs.h>
int read_page(ui32 page, void *dst, void *dev);
DESCRIPTION
read_page() reads corrected data from the NAND page specified by page. dst points to where the data is copied to and is aligned according to the CACHE_LINE_SIZE definition in “bsp.h”. The data is corrected by performing the counterpart of the ECC encoding done in write_page().
dev is a driver-supplied data pointer. The value passed to TargetBFS by the bfsAddNandVol() call is passed back as the last parameter of each driver callback function. It can be used in any way that is convenient for the driver implementation.
read_page() returns 0 on success, -1 for a fatal error (including uncorrectable bit errors), or 1 to report a high number of corrected bit errors. This is a driver-determined limit but a value is often suggested by the data sheet if the part performs HW EC.