RTEMS: General Purpose Block I/O

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Functions
General Purpose Block I/O
Board Support Packages » ARM » Intel Cyclone V » Contributed Code » QSPI Flash Controller Module

## Functions
ALT_STATUS_CODE | alt_qspi_read (void *dest, uint32_t src, size_t size)
ALT_STATUS_CODE | alt_qspi_write (uint32_t dest, const void *src, size_t size)

## Detailed Description

The functions in this group provide general purpose block read and write flash functions.

## Function Documentation

## ◆ alt_qspi_read()

ALT_STATUS_CODE alt_qspi_read | ( | void * | dest,
|  | uint32_t | src,
|  | size_t | size
| ) |  |

Read a block of data from the specified flash address.

Reads a block of n data bytes from the flash src address into the user supplied dest buffer. The memory address, flash address, and size must be word aligned.

Parameters

  dest | The address of a caller supplied destination buffer large enough to contain the requested block of flash data.
  src | The flash device address to start reading data from.
  size | The requested number of data bytes to read from the flash device.

Return values

  ALT_E_SUCCESS | Indicates successful completion.
  ALT_E_ERROR | Indicates an error occurred.

## ◆ alt_qspi_write()

ALT_STATUS_CODE alt_qspi_write | ( | uint32_t | dest,
|  | const void * | src,
|  | size_t | size
| ) |  |

Write a block of data to the specified flash address.

Writes a block of n data bytes to the flash dest address from the designated src buffer. The applicable destination flash address range should have been erased prior to calling this function. The flash address, memory address, and size must be word aligned.

Parameters

  dest | The destination flash address to begin writing data to.
  src | The source address to start writing data from.
  size | The requested number of data bytes to write to the flash device.

Return values

  ALT_E_SUCCESS | Indicates successful completion.
  ALT_E_ERROR | Indicates an error occurred.