<< Previous | Next >> | |
|
int flash_read( FlashDescriptor * fd, word sector, word offset, unsigned long buffer, word length );
Description
- Reads data from the flash memory and stores it in
buffer
.
NOTE fd
must have already been initialized withflash_init
before calling this function. See theflash_init
description for further restrictions.Parameters
- fd
- The
FlashDescriptor
of the flash memory to read from.
- sector
- The sector of the flash memory to read from.
- offset
- The displacement, in bytes, from the beginning of the sector to start reading at.
- buffer
- The physical address of the destination buffer. TIP: A logical address can be changed to a physical with the function
paddr
.
- length
- The number of bytes to read.
Return value
0
: Success.Library
- FLASH.LIB
See also
- flash_erasechip, flash_erasesector, flash_gettype, flash_init, flash_readsector, flash_sector2xwindow, flash_writesector, paddr
Dynamic C Functions | << Previous | Next >> | rabbit.com |