<< Previous | Next >>

WriteFlash2

int WriteFlash2( unsigned long flashDst, void * rootSrc,
unsigned len );

Description

Write len bytes from rootSrc to physical address flashDst on the 2nd flash device. The source must be in root. The flashDst address plus the sum of numbytes[] area must be within memory quadrant(s) already mapped to the second flash.

This function is not reentrant.

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.

Parameters

flashDst
Physical address of the flash destination

rootSrc
Pointer to the root source

len
Number of bytes to write

Return value

 0: Success.
-1: Attempt to write non-2nd flash area, nothing written.
-2: rootsrc not in root.
-3: Time out while writing flash.
-4: Attempt to write to ID block
-5: Sector erase needed; write aborted

Library

XMEM.LIB


Dynamic C Functions << Previous | Next >> rabbit.com