NandFlashModel_TranslateAccess
Default mainpageat91libmemoriesnandflashNandFlashModel_TranslateAccess
Description Source Call Graph
NandFlashModel_TranslateAccess
Translates address/size access of a NandFlashModel to block, page and offset values.
 
Syntax / parameters
unsigned char NandFlashModel_TranslateAccess (const struct NandFlashModel *model, unsigned int address, unsigned int size, unsigned short *block, unsigned short *page, unsigned short *offset)

Name Type Default Description
model const struct NandFlashModel *
  Pointer to a NandFlashModel instance.
address unsigned int
  Access address.
size unsigned int
  Access size in bytes.
block unsigned short *
  Stores the first accessed block number.
page unsigned short *
  Stores the first accessed page number inside the first block.
offset unsigned short *
  Stores the byte offset inside the first accessed page.
 
Return value unsigned char
   
Description
Translates address/size access of a NandFlashModel to block, page and offset values.
The values are stored in the provided variables if their pointer is not 0. Returns 0 if the access is correct; otherwise returns NandCommon_ERROR_OUTOFBOUNDS.
 
Source
The documentation for this Member was generated from the following files:
  • NandFlashModel.c