<< Previous | Next >> | |
|
int WriteFlash2Array( unsigned long flashDst, void * rootSrc[], unsigned numbytes[], int numsources );
Description
- Write a set of scattered information to the 2nd flash in a contiguous block. The sources are given in the
rootSrc
array, and the corresponding number of bytes in each source is given in thenumbytes[]
array. All sources must be in root.numsources
specifies the number of entries in therootSrc
andnumbytes
arrays. TheflashDst
address plus the sum ofnumbytes[]
area must be within memory quadrant(s) already mapped to the second flash.
- This function is not reentrant. It was introduced in Dynamic C version 7.30.
NOTE This function should NOT be used if you are using the second flash device for a flash file system, e.g. if you are writing a TCP/IP-based application!
NOTE This function is extremely dangerous when used with large sector flash. Don't do it.
NOTE The sum of the lengths in numbytes[]
must not exceed 65535 bytes, else not all data will be written.Parameters
- flashDst
- Physical address of the flash destination.
- rootSrc
- Array of pointers to the root sources.
- numbytes
- Array of numbers of bytes to write for each source.
- numsources
- Number of sources specified in
rootSrc[]
andnumbytes[]
.
Return value
0
: Success.
-1
: Attempt to write non-2nd flash area, nothing written.
-2
:rootsrc[]
entry not in root.
-3
: Time-out while writing flash.Library
- XMEM.LIB
Dynamic C Functions | << Previous | Next >> | rabbit.com |