Nios® V Processor Software Developer Handbook

ID 743810
Date 2/14/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

12.1.1.33. alt_get_flash_info()

Prototype

int alt_get_flash_info(alt_flash_fd* fd, 


flash_region** info,

int* number_of_regions)

Commonly Called By

C/C++ programs

Device drivers

Thread-safe

No.

Available from ISR

No.

Include

<sys/alt_flash.h>

Description

The alt_get_flash_info() function gets the details of the erase region of a flash part. The flash part is specified by the descriptor fd, a pointer to the start of the flash_region structures is returned in the info parameter, and the number of flash regions are returned in number of regions.

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 upon success. A negative return value indicates failure.