Specifications

Include
<sys/alt_flash.h>
Description
The alt_write_flash_block() function writes one block of data of flash. The data to be written is at
address data. length bytes are written to the flash fd, into the block starting at offset block_offset from
the beginning of the flash address space. The data starts at offset data_offset from the beginning of the
flash address space.
No check is performed on any of the parameters.
For more information, refer to “Using Flash Devices” in the "Developing Programs Using the Hardware
Abstraction Layer" chapter.
Call this function only when operating in single-threaded mode.
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() on page 14-52
close()
Prototype
int close (int fd)
Commonly Called By
C/C++ programs
Device drivers
Thread-safe
See description.
Available from ISR
No.
Include
<unistd.h>
14-54
close()
NII5V2
2015.05.14
Altera Corporation
HAL API Reference
Send Feedback