<< Previous | Next >>

flash_writesector

int flash_writesector( FlashDescriptor * fd, word sector, unsigned long buffer );

Description

Writes the contents of buffer to sector on the flash memory referenced by fd.

NOTE fd must have already been initialized with flash_init before calling this function. See flash_init description for further restrictions.

Parameters

fd
The FlashDescriptor of the flash memory to write to.

sector
The destination sector.

buffer
The physical address of the source. TIP: A logical address can be changed to a physical address with the function paddr().

Return value

0: Success.

Library

FLASH.LIB

See also

flash_erasechip, flash_erasesector, flash_gettype, flash_init, flash_read, flash_readsector, flash_sector2xwindow


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