Specifications
Description
The alt_write_flash() function writes data to flash. The data to be written is at address src_addr.
length bytes are written to the flash fd, offset bytes from the beginning of the flash device address
space.
Call this function only when operating in single-threaded mode. This function does not preserve any
unwritten areas of any flash sectors affected by this write.
For more information, refer to “Using Flash Devices” in the "Developing Programs Using the Hardware
Abstraction Layer" chapter.
The only valid values for the fd parameter are those returned from the alt_flash_open_dev function. If
any other value is passed, the behavior of this function is undefined.
Return
The return value is zero on success and nonzero otherwise.
Related Information
• Developing Programs Using the Hardware Abstraction Layer on page 6-1
• alt_flash_close_dev() on page 14-22
• alt_flash_open_dev() on page 14-28
• alt_get_flash_info() on page 14-29
• alt_read_flash() on page 14-47
• alt_write_flash_block() on page 14-53
alt_write_flash_block()
Prototype
int alt_write_flash_block(alt_flash_fd* fd,
int block_offset,
int data_offset,
const void *data,
int length)
Commonly Called By
C/C++ programs
Device drivers
Thread-safe
No.
Available from ISR
No.
NII5V2
2015.05.14
alt_write_flash_block()
14-53
HAL API Reference
Altera Corporation
Send Feedback